Change ERROR_INVALID_RSA_KEY to ERROR_INVALID_KEY
[ Merge of http://go/wvgerrit/149269 ] This mostly affects tests and documentation. Bug: 201581141 Bug: 236317198 Change-Id: I1bc0ec4c3767106c01dfac9956f83ccfbffc49b7
This commit is contained in:
@@ -647,7 +647,7 @@ OEMCryptoResult RsaPublicKey::VerifySignaturePss(
|
||||
// Step 0: Ensure the signature algorithm is supported by key.
|
||||
if (!(allowed_schemes_ & kSign_RSASSA_PSS)) {
|
||||
LOGE("RSA key cannot verify using PSS");
|
||||
return OEMCrypto_ERROR_INVALID_RSA_KEY;
|
||||
return OEMCrypto_ERROR_INVALID_KEY;
|
||||
}
|
||||
// Step 1: Create a high-level key from RSA key.
|
||||
ScopedEvpPkey pkey(EVP_PKEY_new());
|
||||
@@ -715,7 +715,7 @@ OEMCryptoResult RsaPublicKey::VerifySignaturePkcs1Cast(
|
||||
// Step 0: Ensure the signature algorithm is supported by key.
|
||||
if (!(allowed_schemes_ & kSign_PKCS1_Block1)) {
|
||||
LOGE("RSA key cannot verify using PKCS1");
|
||||
return OEMCrypto_ERROR_INVALID_RSA_KEY;
|
||||
return OEMCrypto_ERROR_INVALID_KEY;
|
||||
}
|
||||
if (message_length > kRsaPkcs1CastMaxMessageSize) {
|
||||
LOGE("Message is too large for CAST PKCS1 signature: size = %zu",
|
||||
@@ -1158,7 +1158,7 @@ OEMCryptoResult RsaPrivateKey::GenerateSignaturePss(
|
||||
// Step 0: Ensure the signature algorithm is supported by key.
|
||||
if (!(allowed_schemes_ & kSign_RSASSA_PSS)) {
|
||||
LOGE("RSA key cannot sign using PSS");
|
||||
return OEMCrypto_ERROR_INVALID_RSA_KEY;
|
||||
return OEMCrypto_ERROR_INVALID_KEY;
|
||||
}
|
||||
// Step 1: Create a high-level key from RSA key.
|
||||
ScopedEvpPkey pkey(EVP_PKEY_new());
|
||||
@@ -1237,7 +1237,7 @@ OEMCryptoResult RsaPrivateKey::GenerateSignaturePkcs1Cast(
|
||||
// Step 0: Ensure the signature algorithm is supported by key.
|
||||
if (!(allowed_schemes_ & kSign_PKCS1_Block1)) {
|
||||
LOGE("RSA key cannot sign PKCS1");
|
||||
return OEMCrypto_ERROR_INVALID_RSA_KEY;
|
||||
return OEMCrypto_ERROR_INVALID_KEY;
|
||||
}
|
||||
if (message_length > kRsaPkcs1CastMaxMessageSize) {
|
||||
LOGE("Message is too large for CAST PKCS1 signature: size = %zu",
|
||||
|
||||
Reference in New Issue
Block a user