Skip to content

Commit

Permalink
Fix: Behat tests fail with signature validation errors
Browse files Browse the repository at this point in the history
Since simplesamlphp/saml2 3.2.0 RSA_SHA256 is the default, this somehow breaks verification with a key that is loaded with RSA_SHA1, where this worked before.
Because all signatures should in fact be signed using RSA SHA-265, we should use that. This works with saml2 version before 3.2.0 as well.
Tested with surfnet/stepup-saml-bundle 4.1.2
  • Loading branch information
pmeulen committed Jul 31, 2019
1 parent 4099bce commit debc3fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Features/Context/GsspContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ private static function loadPrivateKey(PrivateKey $key)
*/
private static function loadPublicKey($publicKey)
{
$key = new XMLSecurityKey(XMLSecurityKey::RSA_SHA1, ['type' => 'public']);
$key = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, ['type' => 'public']);
$key->loadKey($publicKey, true);

return $key;
Expand Down

0 comments on commit debc3fd

Please sign in to comment.