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

SAML:IdP: Encrypt NameID in Assertion.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2749 44740490-163a-0410-bde0-09ae8108e29a
parent 5e92f288
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ class sspmod_saml_IdP_SAML2 { ...@@ -48,7 +48,7 @@ class sspmod_saml_IdP_SAML2 {
'Handler' => 'sspmod_saml_IdP_SAML2', 'Handler' => 'sspmod_saml_IdP_SAML2',
'Expires' => $assertion->getSessionNotOnOrAfter(), 'Expires' => $assertion->getSessionNotOnOrAfter(),
'saml:entityID' => $spEntityId, 'saml:entityID' => $spEntityId,
'saml:NameID' => $assertion->getNameId(), 'saml:NameID' => $state['saml:idp:NameID'],
'saml:SessionIndex' => $assertion->getSessionIndex(), 'saml:SessionIndex' => $assertion->getSessionIndex(),
); );
...@@ -658,8 +658,18 @@ class sspmod_saml_IdP_SAML2 { ...@@ -658,8 +658,18 @@ class sspmod_saml_IdP_SAML2 {
); );
} }
$state['saml:idp:NameID'] = $nameId;
$a->setNameId($nameId); $a->setNameId($nameId);
$encryptNameId = $spMetadata->getBoolean('nameid.encryption', NULL);
if ($encryptNameId === NULL) {
$encryptNameId = $idpMetadata->getBoolean('nameid.encryption', FALSE);
}
if ($encryptNameId) {
$a->encryptNameId(sspmod_saml_Message::getEncryptionKey($spMetadata));
}
return $a; return $a;
} }
......
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