Skip to content

Commit 5e8ad48

Browse files
committed
Fix test when GCM is not supported
1 parent 3783e22 commit 5e8ad48

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test/response_test.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,20 +1594,23 @@ def generate_audience_error(expected, actual)
15941594
end
15951595

15961596
it "EncryptionMethod AES-128-GCM && Key Encryption Algorithm RSA-OAEP-MGF1P" do
1597+
return unless OpenSSL::Cipher.ciphers.include? 'AES-128-GCM'
15971598
unsigned_message_aes128gcm_encrypted_signed_assertion = read_response('unsigned_message_aes128gcm_encrypted_signed_assertion.xml.base64')
15981599
response = OneLogin::RubySaml::Response.new(unsigned_message_aes128gcm_encrypted_signed_assertion, :settings => settings)
15991600
assert_equal "test", response.attributes[:uid]
16001601
assert_equal "_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7", response.nameid
16011602
end
16021603

16031604
it "EncryptionMethod AES-192-GCM && Key Encryption Algorithm RSA-OAEP-MGF1P" do
1605+
return unless OpenSSL::Cipher.ciphers.include? 'AES-192-GCM'
16041606
unsigned_message_aes192gcm_encrypted_signed_assertion = read_response('unsigned_message_aes192gcm_encrypted_signed_assertion.xml.base64')
16051607
response = OneLogin::RubySaml::Response.new(unsigned_message_aes192gcm_encrypted_signed_assertion, :settings => settings)
16061608
assert_equal "test", response.attributes[:uid]
16071609
assert_equal "_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7", response.nameid
16081610
end
16091611

16101612
it "EncryptionMethod AES-256-GCM && Key Encryption Algorithm RSA-OAEP-MGF1P" do
1613+
return unless OpenSSL::Cipher.ciphers.include? 'AES-256-GCM'
16111614
unsigned_message_aes256gcm_encrypted_signed_assertion = read_response('unsigned_message_aes256gcm_encrypted_signed_assertion.xml.base64')
16121615
response = OneLogin::RubySaml::Response.new(unsigned_message_aes256gcm_encrypted_signed_assertion, :settings => settings)
16131616
assert_equal "test", response.attributes[:uid]

0 commit comments

Comments
 (0)