Revision: 1811 Author: olavmrk Date: Thu Oct 1 04:45:27 2009 Log: saml2_Message: Decrypt the NameID element if it is encrypted.
Fixes issue 206 http://code.google.com/p/simplesamlphp/source/detail?r=1811 Modified: /trunk/modules/saml2/lib/Message.php ======================================= --- /trunk/modules/saml2/lib/Message.php Thu Oct 1 04:45:18 2009 +++ /trunk/modules/saml2/lib/Message.php Thu Oct 1 04:45:27 2009 @@ -753,6 +753,18 @@ } $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; } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "simpleSAMLphp commits" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/simplesamlphp-commits?hl=en -~----------~----~----~----~------~----~------~--~---
