Revert "Add remote key provisioning to the IC HAL"
Revert "Add dependency on keymint cpp lib"
Revert "Allow default identity service to call keymint"
Revert submission 1956689-add rkp to identity-default
Reason for revert: Broke git-master. Will resubmit later.
Reverted Changes:
I96dcf3027:Add remote key provisioning to the IC HAL
Id686ac33a:Add dependency on keymint cpp lib
Ib368a2a00:Log to logd in the default identity service
I7d2906de0:Refactor IC support for RKP
Iae0f14f1c:Fix formatting of identity credential aidl
I01d086a4b:Allow default identity service to call keymint
Change-Id: I76a898c04090c5befe5fb5a5d07ec2e397fdd8b3
diff --git a/identity/aidl/default/libeic/EicOps.h b/identity/aidl/default/libeic/EicOps.h
index df96c7d..aa26e62 100644
--- a/identity/aidl/default/libeic/EicOps.h
+++ b/identity/aidl/default/libeic/EicOps.h
@@ -196,19 +196,13 @@
// Generates CredentialKey plus an attestation certificate.
//
-// If |attestationKeyBlob| is non-NULL, the certificate must be signed by the
-// the provided attestation key. Else, the certificate must be signed by the
-// attestation key that the secure area has been factory provisioned with. The
-// given |challenge|, |applicationId|, and |testCredential| must be signed
-// into the attestation.
+// The attestation certificate will be signed by the attestation keys the secure
+// area has been provisioned with. The given |challenge| and |applicationId|
+// will be used as will |testCredential|.
//
-// When |attestationKeyBlob| is non-NULL, then |attestationKeyCert| must
-// also be passed so that the underlying implementation can properly chain up
-// the newly-generated certificate to the existing chain.
-//
-// The generated certificate must be in X.509 format and returned in |cert|
-// and |certSize| must be set to the size of this array. This function must
-// set |certSize| to the size of the certification chain on successfully return.
+// The generated certificate will be in X.509 format and returned in |cert|
+// and |certSize| must be set to the size of this array and this function will
+// set it to the size of the certification chain on successfully return.
//
// This may return either a single certificate or an entire certificate
// chain. If it returns only a single certificate, the implementation of
@@ -217,10 +211,8 @@
//
bool eicOpsCreateCredentialKey(uint8_t privateKey[EIC_P256_PRIV_KEY_SIZE], const uint8_t* challenge,
size_t challengeSize, const uint8_t* applicationId,
- size_t applicationIdSize, bool testCredential,
- const uint8_t* attestationKeyBlob, size_t attestationKeyBlobSize,
- const uint8_t* attestationKeyCert, size_t attestationKeyCertSize,
- uint8_t* /*out*/ cert, size_t* /*inout*/ certSize);
+ size_t applicationIdSize, bool testCredential, uint8_t* cert,
+ size_t* certSize); // inout
// Generate an X.509 certificate for the key identified by |publicKey| which
// must be of the form returned by eicOpsCreateEcKey().
diff --git a/identity/aidl/default/libeic/EicProvisioning.c b/identity/aidl/default/libeic/EicProvisioning.c
index ff009dd..a241b71 100644
--- a/identity/aidl/default/libeic/EicProvisioning.c
+++ b/identity/aidl/default/libeic/EicProvisioning.c
@@ -133,10 +133,7 @@
bool eicProvisioningCreateCredentialKey(EicProvisioning* ctx, const uint8_t* challenge,
size_t challengeSize, const uint8_t* applicationId,
- size_t applicationIdSize, const uint8_t* attestationKeyBlob,
- size_t attestationKeyBlobSize,
- const uint8_t* attestationKeyCert,
- size_t attestationKeyCertSize, uint8_t* publicKeyCert,
+ size_t applicationIdSize, uint8_t* publicKeyCert,
size_t* publicKeyCertSize) {
if (ctx->isUpdate) {
eicDebug("Cannot create CredentialKey on update");
@@ -145,9 +142,7 @@
if (!eicOpsCreateCredentialKey(ctx->credentialPrivateKey, challenge, challengeSize,
applicationId, applicationIdSize, ctx->testCredential,
- attestationKeyBlob, attestationKeyBlobSize, attestationKeyCert,
- attestationKeyCertSize, publicKeyCert, publicKeyCertSize)) {
- eicDebug("Error creating credential key");
+ publicKeyCert, publicKeyCertSize)) {
return false;
}
return true;
diff --git a/identity/aidl/default/libeic/EicProvisioning.h b/identity/aidl/default/libeic/EicProvisioning.h
index 2619bfc..d94f8f1 100644
--- a/identity/aidl/default/libeic/EicProvisioning.h
+++ b/identity/aidl/default/libeic/EicProvisioning.h
@@ -77,10 +77,7 @@
bool eicProvisioningCreateCredentialKey(EicProvisioning* ctx, const uint8_t* challenge,
size_t challengeSize, const uint8_t* applicationId,
- size_t applicationIdSize, const uint8_t* attestationKeyBlob,
- size_t attestationKeyBlobSize,
- const uint8_t* attestationKeyCert,
- size_t attestationKeyCertSize, uint8_t* publicKeyCert,
+ size_t applicationIdSize, uint8_t* publicKeyCert,
size_t* publicKeyCertSize);
bool eicProvisioningStartPersonalization(EicProvisioning* ctx, int accessControlProfileCount,