diff options
author | Iris Chang | 2017-10-10 11:22:34 -0500 |
---|---|---|
committer | android-build-merger | 2017-10-10 11:22:34 -0500 |
commit | 7b770a8d7062060135645c52a7ed4549e0daf545 (patch) | |
tree | 72732256d5154995dad089124a0a1e02309b157e | |
parent | ecf7848f67f0e9c06612fd7552d592eef7260a11 (diff) | |
parent | 926a8e7440a0c85d39dbf7143bfe03964363ddec (diff) | |
download | platform-hardware-interfaces-7b770a8d7062060135645c52a7ed4549e0daf545.tar.gz platform-hardware-interfaces-7b770a8d7062060135645c52a7ed4549e0daf545.tar.xz platform-hardware-interfaces-7b770a8d7062060135645c52a7ed4549e0daf545.zip |
VTS: fix VtsHalKeymasterV3_0Target issue
am: 926a8e7440
Change-Id: I762f63b3f239169d93b33f7164d4eb3f9bd8f3d9
-rw-r--r-- | keymaster/3.0/vts/functional/attestation_record.cpp | 10 |
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 5d96fff8..a428989d 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 | |||
274 | *keymaster_security_level = | 274 | *keymaster_security_level = |
275 | static_cast<SecurityLevel>(ASN1_ENUMERATED_get(record->keymaster_security_level)); | 275 | static_cast<SecurityLevel>(ASN1_ENUMERATED_get(record->keymaster_security_level)); |
276 | 276 | ||
277 | attestation_challenge->setToExternal(record->attestation_challenge->data, | 277 | auto& chall = record->attestation_challenge; |
278 | record->attestation_challenge->length); | 278 | attestation_challenge->resize(chall->length); |
279 | 279 | memcpy(attestation_challenge->data(), chall->data, chall->length); | |
280 | unique_id->setToExternal(record->unique_id->data, record->unique_id->length); | 280 | auto& uid = record->unique_id; |
281 | unique_id->resize(uid->length); | ||
282 | memcpy(unique_id->data(), uid->data, uid->length); | ||
281 | 283 | ||
282 | ErrorCode error = extract_auth_list(record->software_enforced, software_enforced); | 284 | ErrorCode error = extract_auth_list(record->software_enforced, software_enforced); |
283 | if (error != ErrorCode::OK) return error; | 285 | if (error != ErrorCode::OK) return error; |