Reprovision on error 10085 [ DO NOT MERGE ] am: c5b65aa5ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13139811 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I0251d7327a8c395fd79c0aaf52241a548d954713
This commit is contained in:
@@ -64,6 +64,10 @@ constexpr int kMaxTerminateCountDown = 5;
|
|||||||
|
|
||||||
const std::string kStringNotAvailable = "NA";
|
const std::string kStringNotAvailable = "NA";
|
||||||
|
|
||||||
|
// TODO(b/174412779): Remove when b/170704368 is fixed.
|
||||||
|
// This is a Qualcomm specific error code
|
||||||
|
const int kRsaSsaPssSignatureLengthError = 10085;
|
||||||
|
|
||||||
// Constants relating to OEMCrypto resource rating tiers. These tables are
|
// Constants relating to OEMCrypto resource rating tiers. These tables are
|
||||||
// ordered by resource rating tier from lowest to highest. These should be
|
// ordered by resource rating tier from lowest to highest. These should be
|
||||||
// updated whenever the supported range of resource rating tiers changes.
|
// updated whenever the supported range of resource rating tiers changes.
|
||||||
@@ -126,7 +130,7 @@ void AdvanceDestBuffer(OEMCrypto_DestBufferDesc* dest_buffer, size_t bytes) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LOGE("Unrecognized OEMCryptoBufferType %u - doing nothing",
|
LOGE("Unrecognized OEMCryptoBufferType %u - doing nothing",
|
||||||
dest_buffer->type);
|
static_cast<unsigned int>(dest_buffer->type));
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
@@ -880,6 +884,14 @@ CdmResponseType CryptoSession::PrepareAndSignLicenseRequest(
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (OEMCrypto_ERROR_SHORT_BUFFER != sts) {
|
if (OEMCrypto_ERROR_SHORT_BUFFER != sts) {
|
||||||
|
// TODO(b/174412779): Remove when b/170704368 is fixed.
|
||||||
|
// Temporary workaround. If this error is returned the only way to
|
||||||
|
// recover is for the app to reprovision.
|
||||||
|
if (static_cast<int>(sts) == kRsaSsaPssSignatureLengthError) {
|
||||||
|
LOGE("OEMCrypto PrepareAndSignLicenseRequest result = %d",
|
||||||
|
static_cast<int>(sts));
|
||||||
|
return NEED_PROVISIONING;
|
||||||
|
}
|
||||||
return MapOEMCryptoResult(sts, GENERATE_SIGNATURE_ERROR,
|
return MapOEMCryptoResult(sts, GENERATE_SIGNATURE_ERROR,
|
||||||
"PrepareAndSignLicenseRequest");
|
"PrepareAndSignLicenseRequest");
|
||||||
}
|
}
|
||||||
@@ -907,6 +919,14 @@ CdmResponseType CryptoSession::PrepareAndSignLicenseRequest(
|
|||||||
core_message->resize(core_message_length);
|
core_message->resize(core_message_length);
|
||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
}
|
}
|
||||||
|
// TODO(b/174412779): Remove when b/170704368 is fixed.
|
||||||
|
// Temporary workaround. If this error is returned the only way to
|
||||||
|
// recover is for the app to reprovision.
|
||||||
|
if (static_cast<int>(sts) == kRsaSsaPssSignatureLengthError) {
|
||||||
|
LOGE("OEMCrypto PrepareAndSignLicenseRequest result = %d",
|
||||||
|
static_cast<int>(sts));
|
||||||
|
return NEED_PROVISIONING;
|
||||||
|
}
|
||||||
return MapOEMCryptoResult(sts, GENERATE_SIGNATURE_ERROR,
|
return MapOEMCryptoResult(sts, GENERATE_SIGNATURE_ERROR,
|
||||||
"PrepareAndSignLicenseRequest");
|
"PrepareAndSignLicenseRequest");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user