diff options
Diffstat (limited to 'src/credman.c')
-rw-r--r-- | src/credman.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/credman.c b/src/credman.c index a382185..4219807 100644 --- a/src/credman.c +++ b/src/credman.c | |||
@@ -230,7 +230,8 @@ fido_credman_get_dev_metadata(fido_dev_t *dev, fido_credman_metadata_t *metadata | |||
230 | static int | 230 | static int |
231 | credman_parse_rk(const cbor_item_t *key, const cbor_item_t *val, void *arg) | 231 | credman_parse_rk(const cbor_item_t *key, const cbor_item_t *val, void *arg) |
232 | { | 232 | { |
233 | fido_cred_t *cred = arg; | 233 | fido_cred_t *cred = arg; |
234 | uint64_t prot; | ||
234 | 235 | ||
235 | if (cbor_isa_uint(key) == false || | 236 | if (cbor_isa_uint(key) == false || |
236 | cbor_int_get_width(key) != CBOR_INT_8) { | 237 | cbor_int_get_width(key) != CBOR_INT_8) { |
@@ -249,6 +250,11 @@ credman_parse_rk(const cbor_item_t *key, const cbor_item_t *val, void *arg) | |||
249 | return (-1); | 250 | return (-1); |
250 | cred->type = cred->attcred.type; /* XXX */ | 251 | cred->type = cred->attcred.type; /* XXX */ |
251 | return (0); | 252 | return (0); |
253 | case 10: | ||
254 | if (cbor_decode_uint64(val, &prot) < 0 || prot > INT_MAX || | ||
255 | fido_cred_set_prot(cred, (int)prot) != FIDO_OK) | ||
256 | return (-1); | ||
257 | return (0); | ||
252 | default: | 258 | default: |
253 | fido_log_debug("%s: cbor type", __func__); | 259 | fido_log_debug("%s: cbor type", __func__); |
254 | return (0); /* ignore */ | 260 | return (0); /* ignore */ |