aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-09-17 22:59:13 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-09-17 22:59:13 +0200
commit3e83af5f5e2bf02e869a6d4f6c64983fc5957e7e (patch)
tree0eae389565a194216d527e97d6f70a48595d03b6
parent0dc57fdcf17fd9e5c000e2a07380ec6878d3afcf (diff)
downloadlibssh-3e83af5f5e2bf02e869a6d4f6c64983fc5957e7e.tar.gz
libssh-3e83af5f5e2bf02e869a6d4f6c64983fc5957e7e.tar.xz
libssh-3e83af5f5e2bf02e869a6d4f6c64983fc5957e7e.zip
keyfiles: Fix build errors with callbacks.
Introduced with the last commit.
-rw-r--r--src/keyfiles.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/keyfiles.c b/src/keyfiles.c
index 58f2a464..b7c24253 100644
--- a/src/keyfiles.c
+++ b/src/keyfiles.c
@@ -610,9 +610,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;
}
@@ -738,7 +738,7 @@ ssh_private_key privatekey_from_file(ssh_session session, const char *filename,
if (!valid) {
ssh_set_error(session, SSH_FATAL, "Parsing private key %s", filename);
#elif defined HAVE_LIBCRYPTO
- if (session->callbacks && session->callbacks->auth_function) {
+ if (session->common.callbacks && session->common.callbacks->auth_function) {
dsa = PEM_read_bio_DSAPrivateKey(bio, NULL, pem_get_password, session);
} else { /* authcb */
/* openssl uses its own callback to get the passphrase here */
@@ -779,7 +779,7 @@ ssh_private_key privatekey_from_file(ssh_session session, const char *filename,
if (!valid) {
ssh_set_error(session,SSH_FATAL, "Parsing private key %s", filename);
#elif defined HAVE_LIBCRYPTO
- if (session->callbacks && session->callbacks->auth_function) {
+ if (session->common.callbacks && session->common.callbacks->auth_function) {
rsa = PEM_read_bio_RSAPrivateKey(bio, NULL, pem_get_password, session);
} else { /* authcb */
/* openssl uses its own callback to get the passphrase here */