From ff69236ef8077c72fce020548ef829efdd9dff0d Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Tue, 1 Jul 2008 11:33:50 +0000 Subject: [PATCH] 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 --- lib/SimpleSAML/XML/SAML20/AuthnResponse.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/SimpleSAML/XML/SAML20/AuthnResponse.php b/lib/SimpleSAML/XML/SAML20/AuthnResponse.php index b963b8a6a..d3f99895f 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 { -- GitLab