summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIris Chang <iris.chang@mediatek.com>2017-10-10 16:27:46 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-10-10 16:27:46 +0000
commit0564edd993398232c9524f00bc14c7229c6b2523 (patch)
tree4013c1ad4f328c0449b98645471b3f056831de80
parente5e339d2a5a5a98fc6fd3643ced6fa938e5bdc44 (diff)
parent7b770a8d7062060135645c52a7ed4549e0daf545 (diff)
downloadandroid_hardware_interfaces-0564edd993398232c9524f00bc14c7229c6b2523.tar.gz
android_hardware_interfaces-0564edd993398232c9524f00bc14c7229c6b2523.tar.bz2
android_hardware_interfaces-0564edd993398232c9524f00bc14c7229c6b2523.zip
VTS: fix VtsHalKeymasterV3_0Target issue am: 926a8e7440
am: 7b770a8d70 Change-Id: I0bee7c1bdf4e40a2024fadc0b510ca002806c65e
-rw-r--r--keymaster/3.0/vts/functional/attestation_record.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/keymaster/3.0/vts/functional/attestation_record.cpp b/keymaster/3.0/vts/functional/attestation_record.cpp
index 5d96fff80..a428989de 100644
--- a/keymaster/3.0/vts/functional/attestation_record.cpp
+++ b/keymaster/3.0/vts/functional/attestation_record.cpp
@@ -274,10 +274,12 @@ ErrorCode parse_attestation_record(const uint8_t* asn1_key_desc, size_t asn1_key
*keymaster_security_level =
static_cast<SecurityLevel>(ASN1_ENUMERATED_get(record->keymaster_security_level));
- attestation_challenge->setToExternal(record->attestation_challenge->data,
- record->attestation_challenge->length);
-
- unique_id->setToExternal(record->unique_id->data, record->unique_id->length);
+ auto& chall = record->attestation_challenge;
+ attestation_challenge->resize(chall->length);
+ memcpy(attestation_challenge->data(), chall->data, chall->length);
+ auto& uid = record->unique_id;
+ unique_id->resize(uid->length);
+ memcpy(unique_id->data(), uid->data, uid->length);
ErrorCode error = extract_auth_list(record->software_enforced, software_enforced);
if (error != ErrorCode::OK) return error;