aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2008-03-03 21:11:30 +0000
committerAris Adamantiadis <aris@0xbadc0de.be>2008-03-03 21:11:30 +0000
commit9b5f8935132433d64757ac60ce0ee4e8c59a8af8 (patch)
tree77c6600c726526b19aaa255b5b44b8d0504a7919
parent21c547689aaffcea3045df0359315115e2e4c0b0 (diff)
downloadlibssh-9b5f8935132433d64757ac60ce0ee4e8c59a8af8.tar.gz
libssh-9b5f8935132433d64757ac60ce0ee4e8c59a8af8.tar.xz
libssh-9b5f8935132433d64757ac60ce0ee4e8c59a8af8.zip
fixed the #0000003 bug
was only a misplaced #include. I hate C git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@136 7dcaeef0-15fb-0310-b436-a5af3365683c
-rw-r--r--include/libssh/priv.h2
-rw-r--r--libssh/dh.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 5d90e642..b871e1f7 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -25,7 +25,7 @@ MA 02111-1307, USA. */
#ifndef _LIBSSH_PRIV_H
#define _LIBSSH_PRIV_H
-#include "config.h"
+#include "libssh/config.h"
#include "libssh/libssh.h"
/* Debugging constants */
diff --git a/libssh/dh.c b/libssh/dh.c
index a7f4e775..fd602d2c 100644
--- a/libssh/dh.c
+++ b/libssh/dh.c
@@ -39,8 +39,9 @@ MA 02111-1307, USA. */
#include <stdlib.h>
#include <netdb.h>
#include <string.h>
-#include "libssh/crypto.h"
+
#include "libssh/priv.h"
+#include "libssh/crypto.h"
#ifdef HAVE_LIBCRYPTO
#include <openssl/rand.h>
@@ -452,8 +453,8 @@ void generate_session_keys(SSH_SESSION *session){
#ifdef DEBUG_CRYPTO
ssh_print_hexa("encrypt IV",session->next_crypto->encryptIV,SHA_DIGEST_LEN);
ssh_print_hexa("decrypt IV",session->next_crypto->decryptIV,SHA_DIGEST_LEN);
- ssh_print_hexa("encryption key",session->next_crypto->encryptkey,16);
- ssh_print_hexa("decryption key",session->next_crypto->decryptkey,16);
+ ssh_print_hexa("encryption key",session->next_crypto->encryptkey,session->next_crypto->out_cipher->keysize);
+ ssh_print_hexa("decryption key",session->next_crypto->decryptkey,session->next_crypto->in_cipher->keysize);
ssh_print_hexa("Encryption MAC",session->next_crypto->encryptMAC,SHA_DIGEST_LEN);
ssh_print_hexa("Decryption MAC",session->next_crypto->decryptMAC,20);
#endif