summaryrefslogtreecommitdiffstats
path: root/sk-usbhid.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2022-08-17 08:04:16 +0200
committerDamien Miller <djm@mindrot.org>2022-08-17 08:04:16 +0200
commitcd06a76b7ccc706e2bb4f1cc4aa9e9796a28a812 (patch)
treefd09bde44b91131e22e07205a5012204d8707dc6 /sk-usbhid.c
parentupstream: add an extra flag to sk_probe() to indicate whether we're (diff)
downloadopenssh-cd06a76b7ccc706e2bb4f1cc4aa9e9796a28a812.tar.xz
openssh-cd06a76b7ccc706e2bb4f1cc4aa9e9796a28a812.zip
on Cygwin, prefer WinHello FIDO device
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.
Diffstat (limited to 'sk-usbhid.c')
-rw-r--r--sk-usbhid.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sk-usbhid.c b/sk-usbhid.c
index 1d0faebcf..8f8357332 100644
--- a/sk-usbhid.c
+++ b/sk-usbhid.c
@@ -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;