diff options
Diffstat (limited to 'sshconnect2.c')
-rw-r--r-- | sshconnect2.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index 867d463d6..4e5cddf14 100644 --- a/sshconnect2.c +++ b/sshconnect2.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshconnect2.c,v 1.310 2019/10/31 21:23:19 djm Exp $ */ | 1 | /* $OpenBSD: sshconnect2.c,v 1.311 2019/11/12 19:33:08 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * Copyright (c) 2008 Damien Miller. All rights reserved. | 4 | * Copyright (c) 2008 Damien Miller. All rights reserved. |
@@ -611,7 +611,7 @@ format_identity(Identity *id) | |||
611 | if (id->key) { | 611 | if (id->key) { |
612 | if ((id->key->flags & SSHKEY_FLAG_EXT) != 0) | 612 | if ((id->key->flags & SSHKEY_FLAG_EXT) != 0) |
613 | note = " token"; | 613 | note = " token"; |
614 | else if (sshkey_type_plain(id->key->type) == KEY_ECDSA_SK) | 614 | else if (sshkey_is_sk(id->key)) |
615 | note = " security-key"; | 615 | note = " security-key"; |
616 | } | 616 | } |
617 | xasprintf(&ret, "%s %s%s%s%s%s%s", | 617 | xasprintf(&ret, "%s %s%s%s%s%s%s", |
@@ -1468,8 +1468,7 @@ load_identity_file(Identity *id) | |||
1468 | quit = 1; | 1468 | quit = 1; |
1469 | break; | 1469 | break; |
1470 | } | 1470 | } |
1471 | if (private != NULL && | 1471 | if (private != NULL && sshkey_is_sk(private) && |
1472 | sshkey_type_plain(private->type) == KEY_ECDSA_SK && | ||
1473 | options.sk_provider == NULL) { | 1472 | options.sk_provider == NULL) { |
1474 | debug("key \"%s\" is a security key, but no " | 1473 | debug("key \"%s\" is a security key, but no " |
1475 | "provider specified", id->filename); | 1474 | "provider specified", id->filename); |
@@ -1554,8 +1553,7 @@ pubkey_prepare(Authctxt *authctxt) | |||
1554 | options.identity_files[i]); | 1553 | options.identity_files[i]); |
1555 | continue; | 1554 | continue; |
1556 | } | 1555 | } |
1557 | if (key && sshkey_type_plain(key->type) == KEY_ECDSA_SK && | 1556 | if (key && sshkey_is_sk(key) && options.sk_provider == NULL) { |
1558 | options.sk_provider == NULL) { | ||
1559 | debug("%s: ignoring security key %s as no " | 1557 | debug("%s: ignoring security key %s as no " |
1560 | "SecurityKeyProvider has been specified", | 1558 | "SecurityKeyProvider has been specified", |
1561 | __func__, options.identity_files[i]); | 1559 | __func__, options.identity_files[i]); |
@@ -1579,8 +1577,7 @@ pubkey_prepare(Authctxt *authctxt) | |||
1579 | options.identity_files[i]); | 1577 | options.identity_files[i]); |
1580 | continue; | 1578 | continue; |
1581 | } | 1579 | } |
1582 | if (key && sshkey_type_plain(key->type) == KEY_ECDSA_SK && | 1580 | if (key && sshkey_is_sk(key) && options.sk_provider == NULL) { |
1583 | options.sk_provider == NULL) { | ||
1584 | debug("%s: ignoring security key certificate %s as no " | 1581 | debug("%s: ignoring security key certificate %s as no " |
1585 | "SecurityKeyProvider has been specified", | 1582 | "SecurityKeyProvider has been specified", |
1586 | __func__, options.identity_files[i]); | 1583 | __func__, options.identity_files[i]); |