int _libssh2_ecdsa_new_private(libssh2_ecdsa_ctx ** ec_ctx, LIBSSH2_SESSION * session, const char *filename, unsigned const char *passphrase) { pem_read_bio_func read_ec = (pem_read_bio_func) &PEM_read_bio_ECPrivateKey; (void) session; _libssh2_init_if_needed(); return read_private_key_from_file((void **) ec_ctx, read_ec, filename, passphrase); }
int _libssh2_dsa_new_private(libssh2_dsa_ctx ** dsa, LIBSSH2_SESSION * session, const char *filename, unsigned const char *passphrase) { pem_read_bio_func read_dsa = (pem_read_bio_func) &PEM_read_bio_DSAPrivateKey; (void) session; if (!EVP_get_cipherbyname("des")) { /* If this cipher isn't loaded it's a pretty good indication that none are. * I have *NO DOUBT* that there's a better way to deal with this ($#&%#$(%$#( * Someone buy me an OpenSSL manual and I'll read up on it. */ OpenSSL_add_all_ciphers(); } return read_private_key_from_file((void **) dsa, read_dsa, filename, passphrase); }