From bc15f7b7aa60f993e5fb138e1193a5dd72eddea9 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Wed, 14 Apr 2010 18:24:23 +0200 Subject: Fix missing string_data() in crypto debug code --- libssh/kex.c | 4 ++-- libssh/keys.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'libssh') diff --git a/libssh/kex.c b/libssh/kex.c index 4aceb43a..2b833840 100644 --- a/libssh/kex.c +++ b/libssh/kex.c @@ -492,8 +492,8 @@ static int build_session_id1(ssh_session session, ssh_string servern, } #ifdef DEBUG_CRYPTO - ssh_print_hexa("host modulus",hostn->string,string_len(hostn)); - ssh_print_hexa("server modulus",servern->string,string_len(servern)); + ssh_print_hexa("host modulus",string_data(hostn),string_len(hostn)); + ssh_print_hexa("server modulus",string_data(servern),string_len(servern)); #endif md5_update(md5,string_data(hostn),string_len(hostn)); md5_update(md5,string_data(servern),string_len(servern)); diff --git a/libssh/keys.c b/libssh/keys.c index 5552e549..1414be01 100644 --- a/libssh/keys.c +++ b/libssh/keys.c @@ -132,9 +132,9 @@ ssh_public_key publickey_make_dss(ssh_session session, ssh_buffer buffer) { #endif /* HAVE_LIBCRYPTO */ #ifdef DEBUG_CRYPTO - ssh_print_hexa("p", p->string, string_len(p)); - ssh_print_hexa("q", q->string, string_len(q)); - ssh_print_hexa("g", g->string, string_len(g)); + ssh_print_hexa("p", string_data(p), string_len(p)); + ssh_print_hexa("q", string_data(q), string_len(q)); + ssh_print_hexa("g", string_data(g), string_len(g)); #endif string_burn(p); @@ -208,8 +208,8 @@ ssh_public_key publickey_make_rsa(ssh_session session, ssh_buffer buffer, #endif #ifdef DEBUG_CRYPTO - ssh_print_hexa("e", e->string, string_len(e)); - ssh_print_hexa("n", n->string, string_len(n)); + ssh_print_hexa("e", string_data(e), string_len(e)); + ssh_print_hexa("n", string_data(n), string_len(n)); #endif string_burn(e); @@ -985,8 +985,8 @@ SIGNATURE *signature_from_string(ssh_session session, ssh_string signature, #endif #ifdef DEBUG_CRYPTO - ssh_print_hexa("r", rs->string, 20); - ssh_print_hexa("s", rs->string + 20, 20); + ssh_print_hexa("r", string_data(rs), 20); + ssh_print_hexa("s", (const unsigned char *)string_data(rs) + 20, 20); #endif string_free(rs); @@ -1035,7 +1035,7 @@ SIGNATURE *signature_from_string(ssh_session session, ssh_string signature, #ifdef DEBUG_CRYPTO ssh_log(session, SSH_LOG_FUNCTIONS, "len e: %d", len); - ssh_print_hexa("RSA signature", e->string, len); + ssh_print_hexa("RSA signature", string_data(e), len); #endif #ifdef HAVE_LIBGCRYPT -- cgit v1.2.3