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

saml2_Message: Decrypt the NameID element if it is encrypted.

Fixes issue 206

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1811 44740490-163a-0410-bde0-09ae8108e29a
parent d7fa94f0
No related branches found
No related tags found
No related merge requests found
......@@ -754,6 +754,18 @@ class sspmod_saml2_Message {
$assertion->setAttributes($newAttributes);
}
/* Decrypt the NameID element if it is encrypted. */
if ($assertion->isNameIdEncrypted()) {
try {
$key = self::getDecryptionKey($idpMetadata, $spMetadata);
} catch (Exception $e) {
throw new SimpleSAML_Error_Exception('Error decrypting NameID: ' . $e->getMessage());
}
$assertion->decryptNameId($key);
}
return $assertion;
}
......
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