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