From 49b9af612560204cd4c2f8868915b4d5987a84fa Mon Sep 17 00:00:00 2001 From: geemus Date: Tue, 10 Dec 2024 22:20:03 +0000 Subject: [PATCH] simplify by using sign instead of sign_raw --- lib/fog/aws/requests/kms/sign.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/fog/aws/requests/kms/sign.rb b/lib/fog/aws/requests/kms/sign.rb index 0519046b2..0d0888505 100644 --- a/lib/fog/aws/requests/kms/sign.rb +++ b/lib/fog/aws/requests/kms/sign.rb @@ -34,12 +34,11 @@ def sign(identifier, message, algorithm, _options = {}) # FIXME: SM2 support? sha = "SHA#{algorithm.split('_SHA_').last}" - hash = OpenSSL::Digest.digest(sha, message) signopts = {} signopts[:rsa_padding_mode] = 'pss' if algorithm.start_with?('RSASSA_PSS') - signature = pkey.sign_raw(sha, hash, signopts) + signature = pkey.sign(sha, message, signopts) response.body = { 'KeyId' => identifier,