diff --git a/src/shared/libfido2-util.c b/src/shared/libfido2-util.c index 371acf9233..5e6a29016d 100644 --- a/src/shared/libfido2-util.c +++ b/src/shared/libfido2-util.c @@ -1154,12 +1154,6 @@ static int check_device_is_fido2_with_hmac_secret( _cleanup_(fido_dev_free_wrapper) fido_dev_t *d = NULL; int r; - assert(ret_has_rk); - assert(ret_has_client_pin); - assert(ret_has_up); - assert(ret_has_uv); - assert(ret_has_always_uv); - d = sym_fido_dev_new(); if (!d) return log_oom(); @@ -1171,7 +1165,16 @@ static int check_device_is_fido2_with_hmac_secret( r = verify_features(d, path, LOG_DEBUG, ret_has_rk, ret_has_client_pin, ret_has_up, ret_has_uv, ret_has_always_uv); if (r == -ENODEV) { /* Not a FIDO2 device, or not implementing 'hmac-secret' */ - *ret_has_rk = *ret_has_client_pin = *ret_has_up = *ret_has_uv = *ret_has_always_uv = false; + if (ret_has_rk) + *ret_has_rk = false; + if (ret_has_client_pin) + *ret_has_client_pin = false; + if (ret_has_up) + *ret_has_up = false; + if (ret_has_uv) + *ret_has_uv = false; + if (ret_has_always_uv) + *ret_has_always_uv = false; return false; } if (r < 0)