summaryrefslogtreecommitdiff
path: root/sshconnect2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index aaf02ece4..e01721b73 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1488,6 +1488,8 @@ pubkey_prepare(Authctxt *authctxt)
1488 1488
1489 /* list of keys stored in the filesystem */ 1489 /* list of keys stored in the filesystem */
1490 for (i = 0; i < options.num_identity_files; i++) { 1490 for (i = 0; i < options.num_identity_files; i++) {
1491 if (options.identity_files[i] == NULL)
1492 continue;
1491 key = options.identity_keys[i]; 1493 key = options.identity_keys[i];
1492 if (key && key->type == KEY_RSA1) 1494 if (key && key->type == KEY_RSA1)
1493 continue; 1495 continue;
@@ -1581,7 +1583,7 @@ userauth_pubkey(Authctxt *authctxt)
1581 debug("Offering %s public key: %s", key_type(id->key), 1583 debug("Offering %s public key: %s", key_type(id->key),
1582 id->filename); 1584 id->filename);
1583 sent = send_pubkey_test(authctxt, id); 1585 sent = send_pubkey_test(authctxt, id);
1584 } else if (id->key == NULL) { 1586 } else if (id->key == NULL && id->filename) {
1585 debug("Trying private key: %s", id->filename); 1587 debug("Trying private key: %s", id->filename);
1586 id->key = load_identity_file(id->filename); 1588 id->key = load_identity_file(id->filename);
1587 if (id->key != NULL) { 1589 if (id->key != NULL) {