Commit ceea2c10 authored by Takuya Noguchi's avatar Takuya Noguchi

Replace OpenSSL constants with strings

Signed-off-by: default avatarTakuya Noguchi <takninnovationresearch@gmail.com>
parent 062788e5
---
title: Replace OpenSSL constants with strings
merge_request: 52431
author: Takuya Noguchi
type: other
......@@ -64,7 +64,7 @@ module Gitlab
end
def with_cipher(auth_tag = nil)
cipher = OpenSSL::Cipher::AES256.new(:GCM)
cipher = OpenSSL::Cipher.new('AES-256-GCM')
yield cipher
......
......@@ -22,7 +22,7 @@ RSpec.describe Gitlab::Geo::Oauth::LogoutState do
end
it 'returns nil when encryption fails' do
allow_next_instance_of(OpenSSL::Cipher::AES256) do |instance|
allow_next_instance_of(OpenSSL::Cipher) do |instance|
allow(instance).to receive(:final) { raise OpenSSL::OpenSSLError }
end
......@@ -78,7 +78,7 @@ RSpec.describe Gitlab::Geo::Oauth::LogoutState do
end
it 'returns nil when decryption fails' do
allow_next_instance_of(OpenSSL::Cipher::AES256) do |instance|
allow_next_instance_of(OpenSSL::Cipher) do |instance|
allow(instance).to receive(:final) { raise OpenSSL::OpenSSLError }
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment