summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Morken <olav.morken@uninett.no>2008-07-01 11:33:50 +0000
committerOlav Morken <olav.morken@uninett.no>2008-07-01 11:33:50 +0000
commitff69236ef8077c72fce020548ef829efdd9dff0d (patch)
treec950f0499c1d1e35fae06fcf947e473d6fae2204
parent510ba780c77228649c87fe2ef8f9860113af64d1 (diff)
downloadsimplesamlphp-ff69236ef8077c72fce020548ef829efdd9dff0d.zip
simplesamlphp-ff69236ef8077c72fce020548ef829efdd9dff0d.tar.gz
simplesamlphp-ff69236ef8077c72fce020548ef829efdd9dff0d.tar.bz2
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
-rw-r--r--lib/SimpleSAML/XML/SAML20/AuthnResponse.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/SimpleSAML/XML/SAML20/AuthnResponse.php b/lib/SimpleSAML/XML/SAML20/AuthnResponse.php
index b963b8a..d3f9989 100644
--- a/lib/SimpleSAML/XML/SAML20/AuthnResponse.php
+++ b/lib/SimpleSAML/XML/SAML20/AuthnResponse.php
@@ -202,6 +202,9 @@ class SimpleSAML_XML_SAML20_AuthnResponse extends SimpleSAML_XML_AuthnResponse {
if ($privatekey === FALSE) {
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);
$key = $objencKey->decryptKey($objKeyInfo);
} else {