From 0943ce3a4ac2c9883b3f6bd1dac4c7a2656d4c96 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Wed, 20 Jul 2011 09:56:43 +0200 Subject: Fixed build on openssl --- src/keyfiles.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/keyfiles.c b/src/keyfiles.c index 0540a5d1..dba80130 100644 --- a/src/keyfiles.c +++ b/src/keyfiles.c @@ -875,9 +875,9 @@ static int pem_get_password(char *buf, int size, int rwflag, void *userdata) { ssh_log(session, SSH_LOG_RARE, "Trying to call external authentication function"); - if (session && session->callbacks && session->callbacks->auth_function) { - if (session->callbacks->auth_function("Passphrase for private key:", buf, size, 0, 0, - session->callbacks->userdata) < 0) { + if (session && session->common.callbacks && session->common.callbacks->auth_function) { + if (session->common.callbacks->auth_function("Passphrase for private key:", buf, size, 0, 0, + session->common.callbacks->userdata) < 0) { return 0; } @@ -1029,7 +1029,7 @@ ssh_private_key privatekey_from_base64(ssh_session session, const char *b64_pkey #elif defined HAVE_LIBCRYPTO mem = BIO_new_mem_buf((void*)b64_pkey, -1); if (passphrase == NULL) { - if (session->callbacks && session->callbacks->auth_function) { + if (session->common.callbacks && session->common.callbacks->auth_function) { dsa = PEM_read_bio_DSAPrivateKey(mem, NULL, pem_get_password, session); } else { /* authcb */ /* openssl uses its own callback to get the passphrase here */ @@ -1072,7 +1072,7 @@ ssh_private_key privatekey_from_base64(ssh_session session, const char *b64_pkey #elif defined HAVE_LIBCRYPTO mem = BIO_new_mem_buf((void*)b64_pkey, -1); if (passphrase == NULL) { - if (session->callbacks && session->callbacks->auth_function) { + if (session->common.callbacks && session->common.callbacks->auth_function) { rsa = PEM_read_bio_RSAPrivateKey(mem, NULL, pem_get_password, session); } else { /* authcb */ /* openssl uses its own callback to get the passphrase here */ -- cgit v1.2.3