Add recoverable errors

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

Nonce flood, frame size, session and system invalidation errors
will now bubble up to the app. OEMCrypto v15 returns
OEMCrypto_ERROR_BUFFER_TOO_LARGE, OEMCrypto_ERROR_SESSION_LOST_STATE,
OEMCrypto_ERROR_SYSTEM_INVALIDATED and a variety of nonce errors.
These will be reported to HIDL as OUTPUT_TOO_LARGE_ERROR,
ERROR_DRM_SESSION_LOST_STATE, ERROR_DRM_INVALID_STATE and
ERROR_DRM_RESOURCE_CONTENTION.

Bug: 120572706
Test: Unit/Integration tests
Change-Id: Ida177300046327ce81592a273028ef6c3a0d9fd9
This commit is contained in:
Rahul Frias
2019-01-30 02:15:52 -08:00
parent 54104c7a22
commit 272e60db27
27 changed files with 977 additions and 648 deletions

View File

@@ -145,11 +145,12 @@ class CryptoMetrics {
EventMetric<kErrorCodeFieldNumber, CdmResponseType, kLengthFieldNumber,
Pow2Bucket, kSigningAlgorithmFieldNumber, CdmSigningAlgorithm>
crypto_session_generic_verify_;
CounterMetric<kErrorCodeBoolFieldNumber, bool>
CounterMetric<kErrorCodeFieldNumber, CdmResponseType>
crypto_session_get_device_unique_id_;
CounterMetric<kErrorCodeBoolFieldNumber, bool> crypto_session_get_token_;
CounterMetric<kErrorCodeFieldNumber, CdmResponseType>
crypto_session_get_token_;
ValueMetric<double> crypto_session_life_span_;
EventMetric<kErrorCodeBoolFieldNumber, bool>
EventMetric<kErrorCodeFieldNumber, CdmResponseType>
crypto_session_load_certificate_private_key_;
// This uses the requested security level.
EventMetric<kErrorCodeFieldNumber, CdmResponseType, kSecurityLevelFieldNumber,