summaryrefslogtreecommitdiff
path: root/src/credman.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2020-09-20 17:48:15 +0100
committerColin Watson <cjwatson@debian.org>2020-09-20 17:48:15 +0100
commit05fa6dd7724ccfd1c183e6e4bf9d22eb12abea8c (patch)
tree71d3eccc33c93c230b021c72f1fb9cf2247bf6c0 /src/credman.c
parentb77d6ed4d47acbc836f05be0e9f4abeb104e21ff (diff)
parent173bfbf7886608a4a7abbfac6a42ac4bf4a3432d (diff)
Update upstream source from tag 'upstream/1.5.0'
Update to upstream version '1.5.0' with Debian dir 102fd7ed15b138200444754d256b136933185ec2
Diffstat (limited to 'src/credman.c')
-rw-r--r--src/credman.c8
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
230static int 230static int
231credman_parse_rk(const cbor_item_t *key, const cbor_item_t *val, void *arg) 231credman_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 */