keyfiles: Use BIO* in _privatekey_from_file().

(cherry picked from commit 82df5dc2083a6f7234d1545bd671ee1b5b4680b6)
This commit is contained in:
Oliver Stöneberg
2011-05-02 09:25:12 -07:00
committed by Andreas Schneider
parent da8356b477
commit a6dda5fefd

View File

@@ -872,6 +872,15 @@ ssh_private_key _privatekey_from_file(void *session, const char *filename,
}
#endif
#ifdef HAVE_LIBCRYPTO
bio = BIO_new_file(filename,"r");
if (bio == NULL) {
fclose(file);
ssh_set_error(session, SSH_FATAL, "Could not create BIO.");
return NULL;
}
#endif
switch (type) {
case SSH_KEYTYPE_DSS:
#ifdef HAVE_LIBGCRYPT