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,