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 1aa8523e1..77b02e3bf 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; |
@@ -1609,7 +1611,7 @@ userauth_pubkey(Authctxt *authctxt) | |||
1609 | debug("Offering %s public key: %s", key_type(id->key), | 1611 | debug("Offering %s public key: %s", key_type(id->key), |
1610 | id->filename); | 1612 | id->filename); |
1611 | sent = send_pubkey_test(authctxt, id); | 1613 | sent = send_pubkey_test(authctxt, id); |
1612 | } else if (id->key == NULL) { | 1614 | } else if (id->key == NULL && id->filename) { |
1613 | debug("Trying private key: %s", id->filename); | 1615 | debug("Trying private key: %s", id->filename); |
1614 | id->key = load_identity_file(id->filename, | 1616 | id->key = load_identity_file(id->filename, |
1615 | id->userprovided); | 1617 | id->userprovided); |