diff --git a/packager/media/base/rsa_key.cc b/packager/media/base/rsa_key.cc index ae7cb00b00..fca52795d3 100644 --- a/packager/media/base/rsa_key.cc +++ b/packager/media/base/rsa_key.cc @@ -140,11 +140,12 @@ bool RsaPrivateKey::GenerateSignature(const std::string& message, // Add PSS padding. size_t rsa_size = RSA_size(rsa_key_); std::vector padded_digest(rsa_size); - if (!RSA_padding_add_PKCS1_PSS( + if (!RSA_padding_add_PKCS1_PSS_mgf1( rsa_key_, &padded_digest[0], reinterpret_cast(string_as_array(&message_digest)), EVP_sha1(), + EVP_sha1(), kPssSaltLength)) { LOG(ERROR) << "RSA padding failure: " << ERR_error_string(ERR_get_error(), NULL); @@ -238,10 +239,11 @@ bool RsaPublicKey::VerifySignature(const std::string& message, std::string message_digest = base::SHA1HashString(message); // Verify PSS padding. - return RSA_verify_PKCS1_PSS( + return RSA_verify_PKCS1_PSS_mgf1( rsa_key_, reinterpret_cast(message_digest.data()), EVP_sha1(), + EVP_sha1(), &padded_digest[0], kPssSaltLength) != 0; }