aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-03-12 15:28:57 +0000
committerAndreas Schneider <mail@cynapses.org>2009-03-12 15:28:57 +0000
commit4d889e0af094ed18334699f7ca6047726175dc0d (patch)
treeeb3a8b9be8c25b67a160e0b11f3b637b37d6d1e1 /libssh
parent49c88c2cd71beb881041cdfc5bf58a4365acadaf (diff)
downloadlibssh-4d889e0af094ed18334699f7ca6047726175dc0d.tar.gz
libssh-4d889e0af094ed18334699f7ca6047726175dc0d.tar.xz
libssh-4d889e0af094ed18334699f7ca6047726175dc0d.zip
Replace ssh_say with ssh_log.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@267 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh')
-rw-r--r--libssh/dh.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/libssh/dh.c b/libssh/dh.c
index 68db8ae5..bfcce1a3 100644
--- a/libssh/dh.c
+++ b/libssh/dh.c
@@ -218,7 +218,9 @@ STRING *make_bignum_string(bignum num){
/* remember if the fist bit is set, it is considered as a negative number. so 0's must be appended */
if(!(bits%8) && bignum_is_bit_set(num,bits-1))
pad++;
- ssh_say(3,"%d bits, %d bytes, %d padding\n",bits,len,pad);
+#ifdef DEBUG_CRYPTO
+ fprintf(stderr, "%d bits, %d bytes, %d padding\n", bits, len, pad);
+#endif /* DEBUG_CRYPTO */
ptr=malloc(4 + len + pad);
ptr->size=htonl(len+pad);
if(pad)
@@ -234,7 +236,10 @@ STRING *make_bignum_string(bignum num){
bignum make_string_bn(STRING *string){
bignum bn;
unsigned int len=string_len(string);
- ssh_say(3,"Importing a %d bits,%d bytes object ...\n",len*8,len);
+#ifdef DEBUG_CRYPTO
+ fprintf(stderr, "Importing a %d bits, %d bytes object ...\n",
+ len * 8, len);
+#endif /* DEBUG_CRYPTO */
#ifdef HAVE_LIBGCRYPT
bignum_bin2bn(string->string,len,&bn);
#elif defined HAVE_LIBCRYPTO
@@ -590,7 +595,7 @@ int signature_verify(SSH_SESSION *session,STRING *signature){
int err;
enter_function();
if(session->options->dont_verify_hostkey){
- ssh_say(1,"Host key wasn't verified\n");
+ ssh_log(session, SSH_LOG_FUNCTIONS, "Host key wasn't verified");
leave_function();
return 0;
}
@@ -616,7 +621,8 @@ int signature_verify(SSH_SESSION *session,STRING *signature){
leave_function();
return -1;
}
- ssh_say(1,"Going to verify a %s type signature\n",pubkey->type_c);
+ ssh_log(session, SSH_LOG_FUNCTIONS,
+ "Going to verify a %s type signature", pubkey->type_c);
err=sig_verify(session,pubkey,sign,session->next_crypto->session_id);
signature_free(sign);
session->next_crypto->server_pubkey_type=pubkey->type_c;