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:
@@ -72,7 +72,7 @@ OEMCryptoResult DrmPrivateKey::GetSessionKey(
|
||||
if (rsa_key_) {
|
||||
if (!(rsa_key_->allowed_schemes() & kSign_RSASSA_PSS)) {
|
||||
LOGE("RSA key cannot be used for session key decryption");
|
||||
return OEMCrypto_ERROR_INVALID_RSA_KEY;
|
||||
return OEMCrypto_ERROR_INVALID_KEY;
|
||||
}
|
||||
size_t session_key_size = rsa_key_->SessionKeyLength();
|
||||
session_key->resize(session_key_size);
|
||||
@@ -168,7 +168,7 @@ OEMCryptoResult DrmPrivateKey::GenerateRsaSignature(
|
||||
size_t* signature_length) const {
|
||||
if (!rsa_key_) {
|
||||
LOGE("Only RSA DRM keys can generate PKCS1 signatures");
|
||||
return OEMCrypto_ERROR_INVALID_RSA_KEY;
|
||||
return OEMCrypto_ERROR_INVALID_KEY;
|
||||
}
|
||||
return rsa_key_->GenerateSignature(message, message_length, kRsaPkcs1Cast,
|
||||
signature, signature_length);
|
||||
|
||||
Reference in New Issue
Block a user