Skip to content

Commit 302dc2f

Browse files
committed
add windows preprocessor definition in key_lookup
1 parent eb2f623 commit 302dc2f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sk-usbhid.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,11 +791,12 @@ key_lookup(fido_dev_t *dev, const char *application, const uint8_t *user_id,
791791
skdebug(__func__, "fido_assert_new failed");
792792
goto out;
793793
}
794+
794795
/* generate an invalid signature on FIDO2 tokens */
795796
if ((r = fido_assert_set_clientdata(assert, message,
796-
sizeof(message))) != FIDO_OK) {
797+
sizeof(message))) != FIDO_OK) {
797798
skdebug(__func__, "fido_assert_set_clientdata: %s",
798-
fido_strerr(r));
799+
fido_strerr(r));
799800
goto out;
800801
}
801802
if ((r = fido_assert_set_rp(assert, application)) != FIDO_OK) {
@@ -814,10 +815,12 @@ key_lookup(fido_dev_t *dev, const char *application, const uint8_t *user_id,
814815
skdebug(__func__, "fido_assert_set_uv: %s", fido_strerr(r));
815816
goto out;
816817
}
818+
#ifndef WINDOWS
817819
if ((r = fido_dev_get_assert(dev, assert, pin)) != FIDO_OK) {
818820
skdebug(__func__, "fido_dev_get_assert: %s", fido_strerr(r));
819821
goto out;
820822
}
823+
#endif
821824
r = FIDO_ERR_NO_CREDENTIALS;
822825
skdebug(__func__, "%zu signatures returned", fido_assert_count(assert));
823826
for (i = 0; i < fido_assert_count(assert); i++) {

0 commit comments

Comments
 (0)