Merge "Always Report OEMCrypto_ERROR_KEY_EXPIRED as NEED_KEY" into oc-dev
This commit is contained in:
@@ -1631,8 +1631,9 @@ CdmResponseType CryptoSession::GenericEncrypt(const std::string& in_buffer,
|
|||||||
|
|
||||||
if (OEMCrypto_SUCCESS != sts) {
|
if (OEMCrypto_SUCCESS != sts) {
|
||||||
LOGE("GenericEncrypt: OEMCrypto_Generic_Encrypt err=%d", sts);
|
LOGE("GenericEncrypt: OEMCrypto_Generic_Encrypt err=%d", sts);
|
||||||
if (OEMCrypto_ERROR_KEY_EXPIRED == sts ||
|
if (OEMCrypto_ERROR_KEY_EXPIRED == sts) {
|
||||||
OEMCrypto_ERROR_NO_CONTENT_KEY == sts) {
|
return NEED_KEY;
|
||||||
|
} else if (OEMCrypto_ERROR_NO_CONTENT_KEY == sts) {
|
||||||
return KEY_NOT_FOUND_3;
|
return KEY_NOT_FOUND_3;
|
||||||
} else {
|
} else {
|
||||||
return UNKNOWN_ERROR;
|
return UNKNOWN_ERROR;
|
||||||
@@ -1680,8 +1681,9 @@ CdmResponseType CryptoSession::GenericDecrypt(const std::string& in_buffer,
|
|||||||
|
|
||||||
if (OEMCrypto_SUCCESS != sts) {
|
if (OEMCrypto_SUCCESS != sts) {
|
||||||
LOGE("GenericDecrypt: OEMCrypto_Generic_Decrypt err=%d", sts);
|
LOGE("GenericDecrypt: OEMCrypto_Generic_Decrypt err=%d", sts);
|
||||||
if (OEMCrypto_ERROR_KEY_EXPIRED == sts ||
|
if (OEMCrypto_ERROR_KEY_EXPIRED == sts) {
|
||||||
OEMCrypto_ERROR_NO_CONTENT_KEY == sts) {
|
return NEED_KEY;
|
||||||
|
} else if (OEMCrypto_ERROR_NO_CONTENT_KEY == sts) {
|
||||||
return KEY_NOT_FOUND_4;
|
return KEY_NOT_FOUND_4;
|
||||||
} else {
|
} else {
|
||||||
return UNKNOWN_ERROR;
|
return UNKNOWN_ERROR;
|
||||||
@@ -1742,8 +1744,9 @@ CdmResponseType CryptoSession::GenericSign(const std::string& message,
|
|||||||
}
|
}
|
||||||
|
|
||||||
LOGE("GenericSign: OEMCrypto_Generic_Sign err=%d", sts);
|
LOGE("GenericSign: OEMCrypto_Generic_Sign err=%d", sts);
|
||||||
if (OEMCrypto_ERROR_KEY_EXPIRED == sts ||
|
if (OEMCrypto_ERROR_KEY_EXPIRED == sts) {
|
||||||
OEMCrypto_ERROR_NO_CONTENT_KEY == sts) {
|
return NEED_KEY;
|
||||||
|
} else if (OEMCrypto_ERROR_NO_CONTENT_KEY == sts) {
|
||||||
return KEY_NOT_FOUND_5;
|
return KEY_NOT_FOUND_5;
|
||||||
} else {
|
} else {
|
||||||
return UNKNOWN_ERROR;
|
return UNKNOWN_ERROR;
|
||||||
@@ -1781,8 +1784,9 @@ CdmResponseType CryptoSession::GenericVerify(const std::string& message,
|
|||||||
|
|
||||||
if (OEMCrypto_SUCCESS != sts) {
|
if (OEMCrypto_SUCCESS != sts) {
|
||||||
LOGE("GenericVerify: OEMCrypto_Generic_Verify err=%d", sts);
|
LOGE("GenericVerify: OEMCrypto_Generic_Verify err=%d", sts);
|
||||||
if (OEMCrypto_ERROR_KEY_EXPIRED == sts ||
|
if (OEMCrypto_ERROR_KEY_EXPIRED == sts) {
|
||||||
OEMCrypto_ERROR_NO_CONTENT_KEY == sts) {
|
return NEED_KEY;
|
||||||
|
} else if (OEMCrypto_ERROR_NO_CONTENT_KEY == sts) {
|
||||||
return KEY_NOT_FOUND_6;
|
return KEY_NOT_FOUND_6;
|
||||||
} else {
|
} else {
|
||||||
return UNKNOWN_ERROR;
|
return UNKNOWN_ERROR;
|
||||||
|
|||||||
Reference in New Issue
Block a user