From 29ba0649969d4fc4ad2e7edead48c9b1505e8fcd Mon Sep 17 00:00:00 2001 From: Andrew Scull Date: Wed, 12 May 2021 12:18:08 +0000 Subject: [PATCH] identity: fix CBOR 8-byte integer encoding 8-byte intergers are identified by the additional information having the value 27. Test: atest VtsHalIdentityTargetTest Change-Id: I986162c4966275d7589d99c08c7323445e1f9e80 --- identity/aidl/default/libeic/EicCbor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/identity/aidl/default/libeic/EicCbor.c b/identity/aidl/default/libeic/EicCbor.c index fe131eb8b7..0e2684fec4 100644 --- a/identity/aidl/default/libeic/EicCbor.c +++ b/identity/aidl/default/libeic/EicCbor.c @@ -114,7 +114,7 @@ void eicCborBegin(EicCbor* cbor, int majorType, size_t size) { data[4] = size & 0xff; eicCborAppend(cbor, data, 5); } else { - data[0] = (majorType << 5) | 24; + data[0] = (majorType << 5) | 27; data[1] = (((uint64_t)size) >> 56) & 0xff; data[2] = (((uint64_t)size) >> 48) & 0xff; data[3] = (((uint64_t)size) >> 40) & 0xff;