diff --git a/libwvdrmengine/cdm/core/src/crypto_session.cpp b/libwvdrmengine/cdm/core/src/crypto_session.cpp index 108356ed..80cab2e6 100644 --- a/libwvdrmengine/cdm/core/src/crypto_session.cpp +++ b/libwvdrmengine/cdm/core/src/crypto_session.cpp @@ -1631,8 +1631,9 @@ CdmResponseType CryptoSession::GenericEncrypt(const std::string& in_buffer, if (OEMCrypto_SUCCESS != sts) { LOGE("GenericEncrypt: OEMCrypto_Generic_Encrypt err=%d", sts); - if (OEMCrypto_ERROR_KEY_EXPIRED == sts || - OEMCrypto_ERROR_NO_CONTENT_KEY == sts) { + if (OEMCrypto_ERROR_KEY_EXPIRED == sts) { + return NEED_KEY; + } else if (OEMCrypto_ERROR_NO_CONTENT_KEY == sts) { return KEY_NOT_FOUND_3; } else { return UNKNOWN_ERROR; @@ -1680,8 +1681,9 @@ CdmResponseType CryptoSession::GenericDecrypt(const std::string& in_buffer, if (OEMCrypto_SUCCESS != sts) { LOGE("GenericDecrypt: OEMCrypto_Generic_Decrypt err=%d", sts); - if (OEMCrypto_ERROR_KEY_EXPIRED == sts || - OEMCrypto_ERROR_NO_CONTENT_KEY == sts) { + if (OEMCrypto_ERROR_KEY_EXPIRED == sts) { + return NEED_KEY; + } else if (OEMCrypto_ERROR_NO_CONTENT_KEY == sts) { return KEY_NOT_FOUND_4; } else { return UNKNOWN_ERROR; @@ -1742,8 +1744,9 @@ CdmResponseType CryptoSession::GenericSign(const std::string& message, } LOGE("GenericSign: OEMCrypto_Generic_Sign err=%d", sts); - if (OEMCrypto_ERROR_KEY_EXPIRED == sts || - OEMCrypto_ERROR_NO_CONTENT_KEY == sts) { + if (OEMCrypto_ERROR_KEY_EXPIRED == sts) { + return NEED_KEY; + } else if (OEMCrypto_ERROR_NO_CONTENT_KEY == sts) { return KEY_NOT_FOUND_5; } else { return UNKNOWN_ERROR; @@ -1781,8 +1784,9 @@ CdmResponseType CryptoSession::GenericVerify(const std::string& message, if (OEMCrypto_SUCCESS != sts) { LOGE("GenericVerify: OEMCrypto_Generic_Verify err=%d", sts); - if (OEMCrypto_ERROR_KEY_EXPIRED == sts || - OEMCrypto_ERROR_NO_CONTENT_KEY == sts) { + if (OEMCrypto_ERROR_KEY_EXPIRED == sts) { + return NEED_KEY; + } else if (OEMCrypto_ERROR_NO_CONTENT_KEY == sts) { return KEY_NOT_FOUND_6; } else { return UNKNOWN_ERROR;