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

SAML2: Add support for encrypted private keys for decrypting encrypted assertions.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@737 44740490-163a-0410-bde0-09ae8108e29a
parent 510ba780
No related branches found
No related tags found
No related merge requests found
...@@ -202,6 +202,9 @@ class SimpleSAML_XML_SAML20_AuthnResponse extends SimpleSAML_XML_AuthnResponse { ...@@ -202,6 +202,9 @@ class SimpleSAML_XML_SAML20_AuthnResponse extends SimpleSAML_XML_AuthnResponse {
if ($privatekey === FALSE) { if ($privatekey === FALSE) {
throw new Exception("Private key for decrypting assertion specified but not found for saml20-sp-hosted id: " . $spid . " Filename: " . $spmd['privatekey']); throw new Exception("Private key for decrypting assertion specified but not found for saml20-sp-hosted id: " . $spid . " Filename: " . $spmd['privatekey']);
} }
if(array_key_exists('privatekey_pass', $spmd)) {
$objKeyInfo->passphrase = $spmd['privatekey_pass'];
}
$objKeyInfo->loadKey($privatekey); $objKeyInfo->loadKey($privatekey);
$key = $objencKey->decryptKey($objKeyInfo); $key = $objencKey->decryptKey($objKeyInfo);
} else { } else {
......
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