summaryrefslogtreecommitdiff
path: root/identity/aidl/default/Util.cpp
diff options
context:
space:
mode:
authorDaniel Norman <danielnorman@google.com>2020-08-31 12:05:36 -0700
committerDaniel Norman <danielnorman@google.com>2020-09-02 14:25:33 -0700
commit10a34cdcea4289a87fe7a85251004e75888cc442 (patch)
tree988f7afa6d334b6f13ec18854971d3fa9f33b6a1 /identity/aidl/default/Util.cpp
parentfac069f841464af83720724e79297db3260a5aa8 (diff)
parent0e32fba1de48a9cd4a160929863e8b1ef17fc7da (diff)
Merge SP1A.200727.001
Change-Id: Ia3b7d4eba938bb8d176ba2b02a4e194288372de2
Diffstat (limited to 'identity/aidl/default/Util.cpp')
-rw-r--r--identity/aidl/default/Util.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/identity/aidl/default/Util.cpp b/identity/aidl/default/Util.cpp
index a0f86bedcd..66b9f13d89 100644
--- a/identity/aidl/default/Util.cpp
+++ b/identity/aidl/default/Util.cpp
@@ -39,21 +39,12 @@ const vector<uint8_t>& getHardwareBoundKey() {
return hardwareBoundKey;
}
-vector<uint8_t> byteStringToUnsigned(const vector<int8_t>& value) {
- return vector<uint8_t>(value.begin(), value.end());
-}
-
-vector<int8_t> byteStringToSigned(const vector<uint8_t>& value) {
- return vector<int8_t>(value.begin(), value.end());
-}
-
vector<uint8_t> secureAccessControlProfileEncodeCbor(const SecureAccessControlProfile& profile) {
cppbor::Map map;
map.add("id", profile.id);
if (profile.readerCertificate.encodedCertificate.size() > 0) {
- map.add("readerCertificate",
- cppbor::Bstr(byteStringToUnsigned(profile.readerCertificate.encodedCertificate)));
+ map.add("readerCertificate", cppbor::Bstr(profile.readerCertificate.encodedCertificate));
}
if (profile.userAuthenticationRequired) {
@@ -94,7 +85,7 @@ bool secureAccessControlProfileCheckMac(const SecureAccessControlProfile& profil
if (!mac) {
return false;
}
- if (mac.value() != byteStringToUnsigned(profile.mac)) {
+ if (mac.value() != profile.mac) {
return false;
}
return true;