Skip to content

Commit 4f2d6c7

Browse files
committed
Fix tests
1 parent 99c187a commit 4f2d6c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/src/OneLogin/Saml2/UtilsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -855,10 +855,10 @@ public function testGenerateNameIdWithSPNameQualifier()
855855
$this->assertContains($nameidExpectedEnc, $nameIdEnc);
856856

857857
// Check AES128_GCM support
858-
if (in_array("aes-128-gcm", openssl_get_cipher_methods())) {
858+
if (version_compare(phpversion(), '7.1.0', '>=') && in_array("aes-128-gcm", openssl_get_cipher_methods())) {
859859
$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>';
860860

861-
$nameIdEnc = Utils::generateNameId(
861+
$nameIdEnc = Utils::generateNameId(
862862
$nameIdValue,
863863
$entityId,
864864
$nameIDFormat,

0 commit comments

Comments
 (0)