diff options
author | David Drysdale <drysdale@google.com> | 2021-03-15 14:36:57 +0000 |
---|---|---|
committer | David Drysdale <drysdale@google.com> | 2021-03-15 14:56:29 +0000 |
commit | 31a2b56ca29cc53b4a9fc36e61237e2eabe8643d (patch) | |
tree | 1de33f3ac3de5469b06606862cdfe18b5b071bab /security/keymint/aidl/default/RemotelyProvisionedComponent.cpp | |
parent | 9d746597e82b0e5dbf7cc547173d94734a52d9e1 (diff) |
COSE unprotected parameters are a map not a bstr
As per RFC 8152 section 3, the unprotected parameters in the headers
of COSE objects are just encoded as a map, not as a bstr that contains
the CBOR-encoding of a map.
Test: TreeHugger presubmit
Change-Id: Id4eeb023d3a81ad1398d78d410c8224bf941f9b1
Diffstat (limited to 'security/keymint/aidl/default/RemotelyProvisionedComponent.cpp')
-rw-r--r-- | security/keymint/aidl/default/RemotelyProvisionedComponent.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/keymint/aidl/default/RemotelyProvisionedComponent.cpp b/security/keymint/aidl/default/RemotelyProvisionedComponent.cpp index 2373b2682b..749f0bc15a 100644 --- a/security/keymint/aidl/default/RemotelyProvisionedComponent.cpp +++ b/security/keymint/aidl/default/RemotelyProvisionedComponent.cpp @@ -156,7 +156,7 @@ StatusOr<bytevec /* pubkeys */> validateAndExtractPubkeys(bool testMode, } auto protectedParms = macedKeyItem->asArray()->get(kCoseMac0ProtectedParams)->asBstr(); - auto unprotectedParms = macedKeyItem->asArray()->get(kCoseMac0UnprotectedParams)->asBstr(); + auto unprotectedParms = macedKeyItem->asArray()->get(kCoseMac0UnprotectedParams)->asMap(); auto payload = macedKeyItem->asArray()->get(kCoseMac0Payload)->asBstr(); auto tag = macedKeyItem->asArray()->get(kCoseMac0Tag)->asBstr(); if (!protectedParms || !unprotectedParms || !payload || !tag) { |