Added new error code OEMCrypto_ERROR_INVALID_KEY.

[ Merge of http://go/wvgerrit/138606 ]

The new error code OEMCrypto_ERROR_INVALID_KEY is to replace the now
deprecated error code OEMCrypto_ERROR_INVALID_RSA_KEY.  This error code
serves the same purpose of OEMCrypto_ERROR_INVALID_RSA_KEY, but may be
appied to RSA, ECC and Twisted-Edward ECC keys.  In general, this error
code is to indicate that a key is poorly formatted / unparsable, used in
an operation without allow permissions, or used in an operation that it
cannot be association (RSA signing with an ECC key).

Going forward, new OEMCrypto implementation should use
OEMCrypto_ERROR_INVALID_KEY in place of OEMCrypto_ERROR_INVALID_RSA_KEY.
The CDM will continue to support both error codes.

Bug: 201581141
Test: Testbed unit tests
Change-Id: I2cf1af33a9a1d8716eec4cc63bba52d2f4af4c1b
This commit is contained in:
Alex Dale
2021-11-11 19:37:13 -08:00
parent 71e9c3cef3
commit 59f0f7cd36
2 changed files with 6 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ typedef enum OEMCryptoResult {
OEMCrypto_ERROR_INVALID_NONCE = 32,
OEMCrypto_ERROR_TOO_MANY_KEYS = 33,
OEMCrypto_ERROR_DEVICE_NOT_RSA_PROVISIONED = 34,
OEMCrypto_ERROR_INVALID_RSA_KEY = 35,
OEMCrypto_ERROR_INVALID_RSA_KEY = 35, /* deprecated */
OEMCrypto_ERROR_KEY_EXPIRED = 36,
OEMCrypto_ERROR_INSUFFICIENT_RESOURCES = 37,
OEMCrypto_ERROR_INSUFFICIENT_HDCP = 38,
@@ -89,6 +89,7 @@ typedef enum OEMCryptoResult {
OEMCrypto_WARNING_MIXED_OUTPUT_PROTECTION = 59,
OEMCrypto_ERROR_INVALID_ENTITLED_KEY_SESSION = 60,
OEMCrypto_ERROR_NEEDS_KEYBOX_PROVISIONING = 61,
OEMCrypto_ERROR_INVALID_KEY = 65,
/* ODK return values */
ODK_ERROR_BASE = 1000,
ODK_ERROR_CORE_MESSAGE = ODK_ERROR_BASE,