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.
This commit is contained in:
Damien Miller 2022-08-17 16:04:16 +10:00
parent 47f72f534a
commit cd06a76b7c
1 changed files with 4 additions and 0 deletions

View File

@ -571,6 +571,10 @@ sk_probe(const char *application, const uint8_t *key_handle,
size_t ndevs; size_t ndevs;
int r; 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) { if ((devlist = fido_dev_info_new(MAX_FIDO_DEVICES)) == NULL) {
skdebug(__func__, "fido_dev_info_new failed"); skdebug(__func__, "fido_dev_info_new failed");
return NULL; return NULL;