@@ -1059,18 +1059,18 @@ public function testAddSign()
10591059 $ xmlAuthn = base64_decode (file_get_contents (TEST_ROOT . '/data/requests/authn_request.xml.base64 ' ));
10601060 $ xmlAuthnSigned = OneLogin_Saml2_Utils::addSign ($ xmlAuthn , $ key , $ cert );
10611061 $ this ->assertContains ('<ds:SignatureValue> ' , $ xmlAuthnSigned );
1062- $ this ->assertContains ('<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09 /xmldsig#rsa-sha1 "/> ' , $ xmlAuthnSigned );
1063- $ this ->assertContains ('<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1 "/> ' , $ xmlAuthnSigned );
1062+ $ this ->assertContains ('<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04 /xmldsig-more #rsa-sha256 "/> ' , $ xmlAuthnSigned );
1063+ $ this ->assertContains ('<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256 "/> ' , $ xmlAuthnSigned );
10641064 $ res = new DOMDocument ();
10651065 $ res ->loadXML ($ xmlAuthnSigned );
10661066 $ dsSignature = $ res ->firstChild ->firstChild ->nextSibling ->nextSibling ;
10671067 $ this ->assertContains ('ds:Signature ' , $ dsSignature ->tagName );
10681068
10691069 $ dom = new DOMDocument ();
10701070 $ dom ->loadXML ($ xmlAuthn );
1071- $ xmlAuthnSigned2 = OneLogin_Saml2_Utils::addSign ($ dom , $ key , $ cert , XMLSecurityKey::RSA_SHA256 , XMLSecurityDSig::SHA512 );
1071+ $ xmlAuthnSigned2 = OneLogin_Saml2_Utils::addSign ($ dom , $ key , $ cert , XMLSecurityKey::RSA_SHA384 , XMLSecurityDSig::SHA512 );
10721072 $ this ->assertContains ('<ds:SignatureValue> ' , $ xmlAuthnSigned2 );
1073- $ this ->assertContains ('<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256 "/> ' , $ xmlAuthnSigned2 );
1073+ $ this ->assertContains ('<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384 "/> ' , $ xmlAuthnSigned2 );
10741074 $ this ->assertContains ('<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha512"/> ' , $ xmlAuthnSigned2 );
10751075 $ res2 = new DOMDocument ();
10761076 $ res2 ->loadXML ($ xmlAuthnSigned2 );
0 commit comments