aboutsummaryrefslogtreecommitdiff
path: root/src/dh.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2019-08-06 20:29:01 +0200
committerJakub Jelen <jjelen@redhat.com>2019-08-08 09:30:03 +0200
commit92d3efec8184a22ed214ba95ba692041377bb93c (patch)
tree7d6dc1e15faf4b2ffd1c4894a40f5d2777dd18a4 /src/dh.c
parent4e25ee6124f23a727a9e430b738fad3124ae8ecc (diff)
downloadlibssh-92d3efec8184a22ed214ba95ba692041377bb93c.tar.gz
libssh-92d3efec8184a22ed214ba95ba692041377bb93c.tar.xz
libssh-92d3efec8184a22ed214ba95ba692041377bb93c.zip
dh: Add ssh_dh_debug_crypto()
We should call it where we have access to the crypto structure. Pair-Programmed-With: Jakub Jelen <jjelen@redhat.com> Signed-off-by: Jakub Jelen <jjelen@redhat.com> Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'src/dh.c')
-rw-r--r--src/dh.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dh.c b/src/dh.c
index 6c698139..2f63bafa 100644
--- a/src/dh.c
+++ b/src/dh.c
@@ -373,6 +373,7 @@ SSH_PACKET_CALLBACK(ssh_packet_client_dh_reply){
rc = ssh_dh_compute_shared_secret(session->next_crypto->dh_ctx,
DH_CLIENT_KEYPAIR, DH_SERVER_KEYPAIR,
&session->next_crypto->shared_secret);
+ ssh_dh_debug_crypto(session->next_crypto);
if (rc == SSH_ERROR){
ssh_set_error(session, SSH_FATAL, "Could not generate shared secret");
goto error;
@@ -462,6 +463,7 @@ int ssh_server_dh_process_init(ssh_session session, ssh_buffer packet)
rc = ssh_dh_compute_shared_secret(crypto->dh_ctx,
DH_SERVER_KEYPAIR, DH_CLIENT_KEYPAIR,
&crypto->shared_secret);
+ ssh_dh_debug_crypto(crypto);
if (rc == SSH_ERROR) {
ssh_set_error(session, SSH_FATAL, "Could not generate shared secret");
goto error;