Fix serialization and deserialization of LONG_REP tags.
Change-Id: I473e4f5b2b3dfb9451a019d464314f82806cd137
diff --git a/google_keymaster_test_utils.cpp b/google_keymaster_test_utils.cpp
index 95d0a5d..1708b67 100644
--- a/google_keymaster_test_utils.cpp
+++ b/google_keymaster_test_utils.cpp
@@ -74,8 +74,6 @@
}
switch (keymaster_tag_get_type(a.tag)) {
- default:
- return false;
case KM_INVALID:
return true;
case KM_INT_REP:
@@ -85,6 +83,7 @@
case KM_ENUM:
return a.enumerated == b.enumerated;
case KM_LONG:
+ case KM_LONG_REP:
return a.long_integer == b.long_integer;
case KM_DATE:
return a.date_time == b.date_time;
@@ -97,6 +96,8 @@
return a.blob.data_length == b.blob.data_length &&
(memcmp(a.blob.data, b.blob.data, a.blob.data_length) == 0);
}
+
+ return false;
}
static char hex_value[256] = {