diff options
author | David Zeuthen <zeuthen@google.com> | 2021-09-11 13:52:17 -0400 |
---|---|---|
committer | David Zeuthen <zeuthen@google.com> | 2022-01-10 17:38:04 -0500 |
commit | 045a2c87e0f4450efb7c0c34125b2f06684b4f2d (patch) | |
tree | 9aee00ef7c8f7c6c75c6dc353ec5226a8143c34c /identity/CredentialData.cpp | |
parent | edeefe007974927be5c12a6fe7120789ac11de8b (diff) | |
download | security-045a2c87e0f4450efb7c0c34125b2f06684b4f2d.tar.gz |
identity: Add multi-document presentation support.
Also fix a bug so the same AuthKey is used for several getEntries()
calls on a credential. This matches the behavior in the Jetpack.
Bug: 197965513
Test: New CTS tests and new screen in CtsVerifier
Change-Id: I344f44b5655f0977ee650b518ce669e3c8a7b47a
Diffstat (limited to 'identity/CredentialData.cpp')
-rw-r--r-- | identity/CredentialData.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/identity/CredentialData.cpp b/identity/CredentialData.cpp index 74b995d8..2189f909 100644 --- a/identity/CredentialData.cpp +++ b/identity/CredentialData.cpp @@ -538,7 +538,8 @@ AuthKeyData* CredentialData::findAuthKey_(bool allowUsingExhaustedKeys, } const AuthKeyData* CredentialData::selectAuthKey(bool allowUsingExhaustedKeys, - bool allowUsingExpiredKeys) { + bool allowUsingExpiredKeys, + bool incrementUsageCount) { AuthKeyData* candidate; // First try to find a un-expired key.. @@ -556,7 +557,9 @@ const AuthKeyData* CredentialData::selectAuthKey(bool allowUsingExhaustedKeys, } } - candidate->useCount += 1; + if (incrementUsageCount) { + candidate->useCount += 1; + } return candidate; } |