]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
on Cygwin, prefer WinHello FIDO device
authorDamien Miller <djm@mindrot.org>
Wed, 17 Aug 2022 06:04:16 +0000 (16:04 +1000)
committerDamien Miller <djm@mindrot.org>
Wed, 17 Aug 2022 06:04:16 +0000 (16:04 +1000)
If no FIDO device was explictly specified, then prefer the
windows://hello FIDO device. An exception to this is when
probing resident FIDO keys, in which case hardware FIDO
devices are preferred.

sk-usbhid.c

index 1d0faebcfa5a03d71e8d25499fa9c66349614584..8f835733299e3e604aeea9d96837a7eb2563d8f6 100644 (file)
@@ -571,6 +571,10 @@ sk_probe(const char *application, const uint8_t *key_handle,
        size_t ndevs;
        int r;
 
+#ifdef HAVE_CYGWIN
+       if (!probe_resident && (sk = sk_open("windows://hello")) != NULL)
+               return sk;
+#endif /* HAVE_CYGWIN */
        if ((devlist = fido_dev_info_new(MAX_FIDO_DEVICES)) == NULL) {
                skdebug(__func__, "fido_dev_info_new failed");
                return NULL;