@@ -855,13 +855,14 @@ public function testGenerateNameIdWithSPNameQualifier()
855
855
$ key
856
856
);
857
857
858
- $ nameidExpectedEnc = '<saml:EncryptedID><xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Type="http://www.w3.org/2001/04/xmlenc#Element"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/><dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><xenc:EncryptedKey><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/><xenc:CipherData><xenc:CipherValue> ' ;
858
+ $ nameidExpectedEncId = '<saml:EncryptedID><xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" ' ;
859
+ $ nameidExpectedEncData = '<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/><dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><xenc:EncryptedKey><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/><xenc:CipherData><xenc:CipherValue> ' ;
859
860
860
- $ this ->assertStringContainsString ($ nameidExpectedEnc , $ nameIdEnc );
861
+ $ this ->assertStringContainsString ($ nameidExpectedEncId , $ nameIdEnc );
862
+ $ this ->assertStringContainsString ($ nameidExpectedEncData , $ nameIdEnc );
861
863
862
864
// Check AES128_GCM support
863
-
864
- $ nameidExpectedEnc = '<saml:EncryptedID><xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Type="http://www.w3.org/2001/04/xmlenc#Element"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2009/xmlenc11#aes128-gcm"/><dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><xenc:EncryptedKey><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/><xenc:CipherData><xenc:CipherValue> ' ;
865
+ $ nameidExpectedEncData = '<xenc:EncryptionMethod Algorithm="http://www.w3.org/2009/xmlenc11#aes128-gcm"/><dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><xenc:EncryptedKey><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/><xenc:CipherData><xenc:CipherValue> ' ;
865
866
866
867
$ nameIdEnc = Utils::generateNameId (
867
868
$ nameIdValue ,
@@ -871,7 +872,8 @@ public function testGenerateNameIdWithSPNameQualifier()
871
872
null ,
872
873
XMLSecurityKey::AES128_GCM
873
874
);
874
- $ this ->assertStringContainsString ($ nameidExpectedEnc , $ nameIdEnc );
875
+ $ this ->assertStringContainsString ($ nameidExpectedEncId , $ nameIdEnc );
876
+ $ this ->assertStringContainsString ($ nameidExpectedEncData , $ nameIdEnc );
875
877
}
876
878
877
879
/**
@@ -928,8 +930,11 @@ public function testGenerateNameIdWithoutSPNameQualifier()
928
930
$ key
929
931
);
930
932
931
- $ nameidExpectedEnc = '<saml:EncryptedID><xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Type="http://www.w3.org/2001/04/xmlenc#Element"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/><dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><xenc:EncryptedKey><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/><xenc:CipherData><xenc:CipherValue> ' ;
932
- $ this ->assertStringContainsString ($ nameidExpectedEnc , $ nameIdEnc );
933
+ $ nameidExpectedEncId = '<saml:EncryptedID><xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" ' ;
934
+ $ nameidExpectedEncData = '<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/><dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><xenc:EncryptedKey><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/><xenc:CipherData><xenc:CipherValue> ' ;
935
+
936
+ $ this ->assertStringContainsString ($ nameidExpectedEncId , $ nameIdEnc );
937
+ $ this ->assertStringContainsString ($ nameidExpectedEncData , $ nameIdEnc );
933
938
}
934
939
935
940
/**
0 commit comments