summaryrefslogtreecommitdiff
path: root/sshconnect2.c
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2019-11-12 19:33:08 +0000
committerDamien Miller <djm@mindrot.org>2019-11-13 08:54:09 +1100
commit2c55744a56de0ffc81fe445a1e7fc5cd308712b3 (patch)
tree349cdc436823354aca60031358a6030313b6002d /sshconnect2.c
parentfd1a3b5e38721b1d69aae2d9de1a1d9155dfa5c7 (diff)
upstream: enable ed25519 support; ok djm
OpenBSD-Commit-ID: 1a399c5b3ef15bd8efb916110cf5a9e0b554ab7e
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c13
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]);