summaryrefslogtreecommitdiff
path: root/identity/aidl/default/common/WritableIdentityCredential.h
diff options
context:
space:
mode:
authorDavid Zeuthen <zeuthen@google.com>2020-10-16 11:27:24 -0400
committerDavid Zeuthen <zeuthen@google.com>2021-01-23 13:35:57 -0500
commit49f2d2558ac417d090dfae9c78ab372d71e5140c (patch)
treebe240ccdfb0fa1e45aa03648cb385ff7ce82d84f /identity/aidl/default/common/WritableIdentityCredential.h
parenteafa06164d1e1bafbe20562d540ab5420bb0f825 (diff)
Identity Credential changes for Android 12
- Add IIdentityCredential.deleteCredentialWithChallenge() - Deprecate IIdentityCredential.deleteCredential() - Add IIdentityCredential.proveOwership() - Add IIdentityCredential.updateCredential() - Add ProofOfBinding CBOR to AuthenticationKey X.509 certificate - Document which API versions new methods/features appeared in. - Mention need to declare android.hardware.identity_credential system feature (w/ feature version number) and do this for the default implementation. Bug: 170146643 Test: atest VtsHalIdentityTargetTest Change-Id: Ib47c7caa5f3d6fff6919f019eee44a735dba9cf8
Diffstat (limited to 'identity/aidl/default/common/WritableIdentityCredential.h')
-rw-r--r--identity/aidl/default/common/WritableIdentityCredential.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/identity/aidl/default/common/WritableIdentityCredential.h b/identity/aidl/default/common/WritableIdentityCredential.h
index c6f0628cae..36ad4300d1 100644
--- a/identity/aidl/default/common/WritableIdentityCredential.h
+++ b/identity/aidl/default/common/WritableIdentityCredential.h
@@ -36,16 +36,22 @@ using ::std::vector;
class WritableIdentityCredential : public BnWritableIdentityCredential {
public:
+ // For a new credential, call initialize() right after construction.
+ //
+ // For an updated credential, call initializeForUpdate() right after construction.
+ //
WritableIdentityCredential(sp<SecureHardwareProvisioningProxy> hwProxy, const string& docType,
bool testCredential)
: hwProxy_(hwProxy), docType_(docType), testCredential_(testCredential) {}
~WritableIdentityCredential();
- // Creates the Credential Key. Returns false on failure. Must be called
- // right after construction.
+ // Creates the Credential Key. Returns false on failure.
bool initialize();
+ // Used when updating a credential. Returns false on failure.
+ bool initializeForUpdate(const vector<uint8_t>& encryptedCredentialKeys);
+
// Methods from IWritableIdentityCredential follow.
ndk::ScopedAStatus getAttestationCertificate(const vector<uint8_t>& attestationApplicationId,
const vector<uint8_t>& attestationChallenge,