Skip to content
Snippets Groups Projects
Commit 8c0131ca authored by Lasse Birnbaum Jensen's avatar Lasse Birnbaum Jensen
Browse files

Changed regex to be able to use certificates with different file encodings.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1053 44740490-163a-0410-bde0-09ae8108e29a
parent eab8b39f
No related branches found
No related tags found
No related merge requests found
...@@ -1451,7 +1451,7 @@ class SimpleSAML_Utilities { ...@@ -1451,7 +1451,7 @@ class SimpleSAML_Utilities {
$ret['PEM'] = $data; $ret['PEM'] = $data;
/* Extract certificate data (if this is a certificate). */ /* Extract certificate data (if this is a certificate). */
$pattern = '/^-----BEGIN CERTIFICATE-----$([^-]*)^-----END CERTIFICATE-----$/m'; $pattern = '/^-----BEGIN CERTIFICATE-----([^-]*)^-----END CERTIFICATE-----/m';
if (preg_match($pattern, $data, $matches)) { if (preg_match($pattern, $data, $matches)) {
/* We have a certificate. */ /* We have a certificate. */
$ret['certData'] = str_replace(array("\r", "\n"), '', $matches[1]); $ret['certData'] = str_replace(array("\r", "\n"), '', $matches[1]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment