]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
check_sk_options: add temporary WinHello workaround
authorCorinna Vinschen <vinschen@redhat.com>
Tue, 15 Feb 2022 10:28:08 +0000 (11:28 +0100)
committerDamien Miller <djm@mindrot.org>
Fri, 5 Aug 2022 04:42:10 +0000 (14:42 +1000)
Up to libfido 1.10.0, WinHello advertises "clientPin" rather
than "uv" capability.  This is fixed in 1.11.0.  For the time
being, workaround it here.

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
sk-usbhid.c

index dfe88789a9195dadae6a6aaf90b274ec7732defb..06bf0e85c0873cb469c5993716d74826b3be6c4a 100644 (file)
@@ -450,6 +450,15 @@ check_sk_options(fido_dev_t *dev, const char *opt, int *ret)
                skdebug(__func__, "device is not fido2");
                return 0;
        }
+       /*
+        * Workaround required up to libfido2 1.10.0.  As soon as 1.11.0
+        * is released and updated in the Cygwin release, we can drop this.
+        */
+       if (fido_dev_is_winhello(dev) && strcmp (opt, "uv") == 0) {
+               skdebug(__func__, "device is winhello");
+               *ret = 1;
+               return 0;
+       }
        if ((info = fido_cbor_info_new()) == NULL) {
                skdebug(__func__, "fido_cbor_info_new failed");
                return -1;