diff options
author | Matthew Maurer <mmaurer@google.com> | 2019-03-29 17:07:31 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-03-29 17:07:31 -0700 |
commit | 135c773309c3fe53caa02f29834c9d628fb7d7d8 (patch) | |
tree | 849a47c7af12c4a1193795f028be7b3d7d53497a | |
parent | 0bd1ca7706a4034e1822a6778b8646005eca8fb1 (diff) | |
parent | d33899190facf946d4efce3fb04dbfd495141c11 (diff) | |
download | android_system_keymaster-135c773309c3fe53caa02f29834c9d628fb7d7d8.tar.gz android_system_keymaster-135c773309c3fe53caa02f29834c9d628fb7d7d8.tar.bz2 android_system_keymaster-135c773309c3fe53caa02f29834c9d628fb7d7d8.zip |
Fix ImportWrappedKeyRequest Serialization am: 4516ca7cc0
am: d33899190f
Change-Id: Ibf892bfd9ffbe50f513a6a2560bdaf14828a311f
-rw-r--r-- | android_keymaster/android_keymaster_messages.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/android_keymaster/android_keymaster_messages.cpp b/android_keymaster/android_keymaster_messages.cpp index 1c5695e..6eb6a5f 100644 --- a/android_keymaster/android_keymaster_messages.cpp +++ b/android_keymaster/android_keymaster_messages.cpp @@ -635,13 +635,14 @@ size_t ImportWrappedKeyRequest::SerializedSize() const { return sizeof(uint32_t) /* wrapped_key_data_length */ + wrapped_key.key_material_size + sizeof(uint32_t) /* wrapping_key_data_length */ + wrapping_key.key_material_size + sizeof(uint32_t) /* masking_key_data_length */ + masking_key.key_material_size + - additional_params.SerializedSize(); + additional_params.SerializedSize() + sizeof(uint64_t) /* password_sid */ + + sizeof(uint64_t) /* biometric_sid */; } uint8_t* ImportWrappedKeyRequest::Serialize(uint8_t* buf, const uint8_t* end) const { - serialize_key_blob(wrapped_key, buf, end); - serialize_key_blob(wrapping_key, buf, end); - serialize_key_blob(masking_key, buf, end); + buf = serialize_key_blob(wrapped_key, buf, end); + buf = serialize_key_blob(wrapping_key, buf, end); + buf = serialize_key_blob(masking_key, buf, end); buf = additional_params.Serialize(buf, end); buf = append_uint64_to_buf(buf, end, password_sid); return append_uint64_to_buf(buf, end, biometric_sid); |