Added state to CertificateProvisioning.
[ Cherry-pick of v19 http://go/wvgerrit/219310 ] [ Merge of http://go/wvgerrit/219453 ] To enable the CDM to determine between OEM vs DRM responses, a state variable was needed in CertificateProvisioning. Previously, the presence/absence of the OEM certificate in the file system was used; however, if two apps (or single app with multiple origins) attempts provisioning simultaneously, the later response would trigger unexpected failures. The main functional changes this provides is that a more informative error will be returned to the app if they provide a provisioning response without ever creating a provisioning request; and that if multiple clients attempted first-stage provisioning simultaneously, fewer errors will occur. Bug: 391469176 Test: run_prov40_tests Change-Id: I51a118ce73aa809bad6ecee640139a92d8518575
This commit is contained in:
@@ -299,6 +299,9 @@ static inline WvStatus mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
case wvcdm::INVALID_QUERY_KEY:
|
||||
case wvcdm::KEY_NOT_FOUND_1:
|
||||
case wvcdm::SAMPLE_AND_SUBSAMPLE_SIZE_MISMATCH:
|
||||
// Client provided a provisioning response without
|
||||
// generating a provisioning request.
|
||||
case wvcdm::PROVISIONING_UNEXPECTED_RESPONSE_ERROR:
|
||||
err = Status::BAD_VALUE;
|
||||
break;
|
||||
case wvcdm::KEY_NOT_FOUND_3:
|
||||
|
||||
Reference in New Issue
Block a user