Skip to content
Snippets Groups Projects
Commit 401c2b88 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Remove spaces etc from certificate field in metadata

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1069 44740490-163a-0410-bde0-09ae8108e29a
parent 8f6f3189
No related branches found
No related tags found
No related merge requests found
......@@ -458,7 +458,7 @@ class SimpleSAML_Metadata_SAMLParser {
continue;
}
$ret['certData'] = str_replace(array("\r", "\n"), '', $key['X509Certificate']);
$ret['certData'] = preg_replace('/\s+/', '', str_replace(array("\r", "\n"), '', $key['X509Certificate']));
break;
}
......@@ -527,7 +527,7 @@ class SimpleSAML_Metadata_SAMLParser {
}
/* Add the certificate data to the metadata. Only the first certificate will be added. */
$ret['certData'] = str_replace(array("\r", "\n"), '', $key['X509Certificate']);
$ret['certData'] = preg_replace('/\s+/', '', str_replace(array("\r", "\n"), '', $key['X509Certificate']));
$ret['certFingerprint'][] = sha1($certData);
break;
}
......@@ -612,7 +612,7 @@ class SimpleSAML_Metadata_SAMLParser {
continue;
}
$ret['certData'] = str_replace(array("\r", "\n"), '', $key['X509Certificate']);
$ret['certData'] = preg_replace('/\s+/', '', str_replace(array("\r", "\n"), '', $key['X509Certificate']));
break;
}
......@@ -705,7 +705,7 @@ class SimpleSAML_Metadata_SAMLParser {
}
/* Add the certificate data to the metadata. Only the first certificate will be added. */
$ret['certData'] = str_replace(array("\r", "\n"), '', $key['X509Certificate']);
$ret['certData'] = preg_replace('/\s+/', '', str_replace(array("\r", "\n"), '', $key['X509Certificate']));
$ret['certFingerprint'][] = sha1($certData);
break;
}
......
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