libfido2-util: remove superfluous asserts

These asserts don't make sense and actually break the FIDO2 support in
systemd-cryptsetup.

Follow-up for bd141bd818
This commit is contained in:
nikstur
2026-06-03 12:01:17 +01:00
committed by Luca Boccassi
parent 112b565756
commit c6bfcf0977
+10 -7
View File
@@ -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)