[DO NOT MERGE] Revert "Restructed reference root of trust (3/3 OEM Cert)"

This reverts commit 9f7e2c4413.

Reason for revert: Feature missed deadline

Bug: 135283522
Change-Id: I63eb0431762fd13c64bef926fb1e64b6edacb156
This commit is contained in:
Alex Dale
2021-05-08 01:14:08 +00:00
parent 9f7e2c4413
commit fe28d4cafc
7 changed files with 72 additions and 120 deletions

View File

@@ -762,8 +762,10 @@ OEMCRYPTO_API OEMCryptoResult OEMCrypto_IsKeyboxOrOEMCertValid(void) {
case OEMCrypto_DrmCertificate:
return OEMCrypto_SUCCESS;
case OEMCrypto_Keybox:
return crypto_engine->IsKeyboxValid();
case OEMCrypto_OEMCertificate:
return crypto_engine->IsKeyboxOrOemCertValid();
// TODO(sigquit): verify that the certificate exists and is valid.
return OEMCrypto_SUCCESS;
default:
LOGE("Invalid provisioning method: %d.",
crypto_engine->config_provisioning_method());
@@ -795,7 +797,7 @@ OEMCrypto_LoadOEMPrivateKey(OEMCrypto_SESSION session) {
LOGE("OEMCrypto_ERROR_INVALID_SESSION");
return OEMCrypto_ERROR_INVALID_SESSION;
}
return session_ctx->LoadOemPrivateKey();
return crypto_engine->load_oem_private_key(session_ctx);
}
OEMCRYPTO_API OEMCryptoResult OEMCrypto_GetOEMPublicCertificate(
@@ -809,8 +811,7 @@ OEMCRYPTO_API OEMCryptoResult OEMCrypto_GetOEMPublicCertificate(
crypto_engine->config_provisioning_method());
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
return crypto_engine->GetOemPublicCertificate(public_cert,
public_cert_length);
return crypto_engine->get_oem_certificate(public_cert, public_cert_length);
}
OEMCRYPTO_API OEMCryptoResult OEMCrypto_GetDeviceID(uint8_t* device_id,