Skip to content

Commit 876378c

Browse files
committed
Fix security keys without attestation
Using libfido2 with windows://hello results in security key returning no attestation data. This currently fails due to fido_cred_verify_self failing. According to Yubico/libfido2#840 this is not a bug in libfido2, but openssh instead has to skip the verify call if no attestation is given. This fixes the issue by skipping attestation verification during key generation if there is no attestation. Fixes PowerShell/Win32-OpenSSH#2040 Signed-off-by: Michael Braun <[email protected]>
1 parent 67ace92 commit 876378c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sk-usbhid.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -961,13 +961,15 @@ sk_enroll(uint32_t alg, const uint8_t *challenge, size_t challenge_len,
961961
fido_strerr(r));
962962
goto out;
963963
}
964-
} else {
964+
} else if (strcmp(fido_cred_fmt(cred), "none") != 0) {
965965
skdebug(__func__, "self-attested credential");
966966
if ((r = fido_cred_verify_self(cred)) != FIDO_OK) {
967967
skdebug(__func__, "fido_cred_verify_self: %s",
968968
fido_strerr(r));
969969
goto out;
970970
}
971+
} else {
972+
skdebug(__func__, "no attestation data");
971973
}
972974
if ((response = calloc(1, sizeof(*response))) == NULL) {
973975
skdebug(__func__, "calloc response failed");

0 commit comments

Comments
 (0)