Skip to content
Snippets Groups Projects
Commit 8276a254 authored by Olav Morken's avatar Olav Morken
Browse files

SimpleSAML_Metadata_SAMLParser: Add support for retrieving all...

SimpleSAML_Metadata_SAMLParser: Add support for retrieving all X509-certificates which signs the entity.


git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@686 44740490-163a-0410-bde0-09ae8108e29a
parent 845c4408
No related branches found
No related tags found
No related merge requests found
......@@ -1124,6 +1124,29 @@ class SimpleSAML_Metadata_SAMLParser {
return FALSE;
}
/**
* Retrieve the X509 certificate(s) which was used to sign the metadata.
*
* This function will return all X509 certificates which validates this entity.
* The certificates will be returned as an array with strings with PEM-encoded certificates.
*
* @return Array with PEM-encoded certificates. This may be an empty array if no
* certificates sign this entity.
*/
public function getX509Certificates() {
$ret = array();
foreach($this->validator as $validator) {
$cert = $validator->getX509Certificate();
if($cert !== NULL) {
$ret[] = $cert;
}
}
return $ret;
}
}
?>
\ No newline at end of file
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