diff options
author | Xin Li <delphij@google.com> | 2023-10-05 15:45:23 -0700 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2023-10-05 15:45:23 -0700 |
commit | 0b267890b779aee0bd9a8194817d6cebee0c62b5 (patch) | |
tree | ea0ac3c5beffac8161e445b9bafc6b3ae8bcf30f | |
parent | 77ec0e4279983ed83a33be594440fba4490a01f8 (diff) | |
parent | fd8e66c99d45d7f091e7c23fe678267c5693d327 (diff) | |
download | keymaster-0b267890b779aee0bd9a8194817d6cebee0c62b5.tar.gz |
Merge Android 14
Bug: 298295554
Merged-In: Ie85684084c9820814ba4bfb9e3a46e297f6f3e3a
Change-Id: I944e2992d52bc969a43c5eb8afae6678fcccc383
-rw-r--r-- | ng/KeyMintAidlUtils.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/ng/KeyMintAidlUtils.cpp b/ng/KeyMintAidlUtils.cpp index 28b5744..8f78027 100644 --- a/ng/KeyMintAidlUtils.cpp +++ b/ng/KeyMintAidlUtils.cpp @@ -24,30 +24,6 @@ namespace keymint { using namespace ::keymaster; -vector<uint8_t> authToken2AidlVec(const HardwareAuthToken& token) { - static_assert(1 /* version size */ + sizeof(token.challenge) + sizeof(token.userId) + - sizeof(token.authenticatorId) + sizeof(token.authenticatorType) + - sizeof(token.timestamp) + 32 /* HMAC size */ - == sizeof(hw_auth_token_t), - "HardwareAuthToken content size does not match hw_auth_token_t size"); - - vector<uint8_t> result; - - if (token.mac.size() <= 32) return result; - - result.resize(sizeof(hw_auth_token_t)); - auto pos = result.begin(); - *pos++ = 0; // Version byte - pos = copy_bytes_to_iterator(token.challenge, pos); - pos = copy_bytes_to_iterator(token.userId, pos); - pos = copy_bytes_to_iterator(token.authenticatorId, pos); - pos = copy_bytes_to_iterator(token.authenticatorType, pos); - pos = copy_bytes_to_iterator(token.timestamp, pos); - pos = std::copy(token.mac.data(), token.mac.data() + token.mac.size(), pos); - - return result; -} - // TODO(seleneh): This needs to be modified depends on how aidl support for union came out to // be. vector<KeyParameter> kmParamSet2Aidl(const keymaster_key_param_set_t& set) { |