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 0b13530ce..93818c991 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1491,6 +1491,8 @@ pubkey_prepare(Authctxt *authctxt)
1491 1491
1492 /* list of keys stored in the filesystem and PKCS#11 */ 1492 /* list of keys stored in the filesystem and PKCS#11 */
1493 for (i = 0; i < options.num_identity_files; i++) { 1493 for (i = 0; i < options.num_identity_files; i++) {
1494 if (options.identity_files[i] == NULL)
1495 continue;
1494 key = options.identity_keys[i]; 1496 key = options.identity_keys[i];
1495 if (key && key->type == KEY_RSA1) 1497 if (key && key->type == KEY_RSA1)
1496 continue; 1498 continue;
@@ -1608,7 +1610,7 @@ userauth_pubkey(Authctxt *authctxt)
1608 debug("Offering %s public key: %s", key_type(id->key), 1610 debug("Offering %s public key: %s", key_type(id->key),
1609 id->filename); 1611 id->filename);
1610 sent = send_pubkey_test(authctxt, id); 1612 sent = send_pubkey_test(authctxt, id);
1611 } else if (id->key == NULL) { 1613 } else if (id->key == NULL && id->filename) {
1612 debug("Trying private key: %s", id->filename); 1614 debug("Trying private key: %s", id->filename);
1613 id->key = load_identity_file(id->filename, 1615 id->key = load_identity_file(id->filename,
1614 id->userprovided); 1616 id->userprovided);