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 5bf11c085..f10f6bf8c 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1418,6 +1418,8 @@ pubkey_prepare(Authctxt *authctxt)
1418 1418
1419 /* list of keys stored in the filesystem */ 1419 /* list of keys stored in the filesystem */
1420 for (i = 0; i < options.num_identity_files; i++) { 1420 for (i = 0; i < options.num_identity_files; i++) {
1421 if (options.identity_files[i] == NULL)
1422 continue;
1421 key = options.identity_keys[i]; 1423 key = options.identity_keys[i];
1422 if (key && key->type == KEY_RSA1) 1424 if (key && key->type == KEY_RSA1)
1423 continue; 1425 continue;
@@ -1510,7 +1512,7 @@ userauth_pubkey(Authctxt *authctxt)
1510 if (id->key && id->key->type != KEY_RSA1) { 1512 if (id->key && id->key->type != KEY_RSA1) {
1511 debug("Offering public key: %s", id->filename); 1513 debug("Offering public key: %s", id->filename);
1512 sent = send_pubkey_test(authctxt, id); 1514 sent = send_pubkey_test(authctxt, id);
1513 } else if (id->key == NULL) { 1515 } else if (id->key == NULL && id->filename) {
1514 debug("Trying private key: %s", id->filename); 1516 debug("Trying private key: %s", id->filename);
1515 id->key = load_identity_file(id->filename); 1517 id->key = load_identity_file(id->filename);
1516 if (id->key != NULL) { 1518 if (id->key != NULL) {