From: nikstur Date: Tue, 2 Jun 2026 21:38:55 +0000 (+0200) Subject: libfido2-util: remove superfluous asserts X-Git-Tag: v261-rc3~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6bfcf097737a2f958172abe81cae7aa1929869e;p=thirdparty%2Fsystemd.git libfido2-util: remove superfluous asserts These asserts don't make sense and actually break the FIDO2 support in systemd-cryptsetup. Follow-up for bd141bd818fcb2e35638f963b0680a1218776f5d --- diff --git a/src/shared/libfido2-util.c b/src/shared/libfido2-util.c index 371acf92333..5e6a29016d1 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)