diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2020-12-21 18:11:08 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-12-21 18:11:08 +0000 |
commit | 2528ddcab26029f419f70b48af1bc7ae41ac00b1 (patch) | |
tree | 9e5c022b88f0f004aab317952e1fc5c6db08ef9e /security/keymint/support/authorization_set.cpp | |
parent | d389d1659abc1fb2e655a78be4c6d6cd23555fd3 (diff) | |
parent | 5ba093377c40a2ce976093d046f3723feae9c953 (diff) |
Merge "Revise keymint_tags.h"
Diffstat (limited to 'security/keymint/support/authorization_set.cpp')
-rw-r--r-- | security/keymint/support/authorization_set.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/security/keymint/support/authorization_set.cpp b/security/keymint/support/authorization_set.cpp index 37b6cd1ff3..f98851cfa2 100644 --- a/security/keymint/support/authorization_set.cpp +++ b/security/keymint/support/authorization_set.cpp @@ -106,10 +106,11 @@ bool AuthorizationSet::erase(int index) { return false; } -NullOr<const KeyParameter&> AuthorizationSet::GetEntry(Tag tag) const { +std::optional<std::reference_wrapper<const KeyParameter>> AuthorizationSet::GetEntry( + Tag tag) const { int pos = find(tag); if (pos == -1) return {}; - return data_[pos]; + return std::reference_wrapper(data_[pos]); } AuthorizationSetBuilder& AuthorizationSetBuilder::RsaKey(uint32_t key_size, |