aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2015-12-23 12:50:00 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-01-24 09:19:59 +0100
commite42a423a247c8c9f0bd58d32a8b80c522f7b43f6 (patch)
tree379e03c22a6db299ba298601fb1769d8ae18af57 /include
parent602a1defea06f0f63d8c6bdd5b164b86dbfdb971 (diff)
downloadlibssh-e42a423a247c8c9f0bd58d32a8b80c522f7b43f6.tar.gz
libssh-e42a423a247c8c9f0bd58d32a8b80c522f7b43f6.tar.xz
libssh-e42a423a247c8c9f0bd58d32a8b80c522f7b43f6.zip
kex: use runtime callbacks (server)
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include')
-rw-r--r--include/libssh/curve25519.h2
-rw-r--r--include/libssh/dh.h3
-rw-r--r--include/libssh/ecdh.h6
3 files changed, 8 insertions, 3 deletions
diff --git a/include/libssh/curve25519.h b/include/libssh/curve25519.h
index 96018000..f0cc6348 100644
--- a/include/libssh/curve25519.h
+++ b/include/libssh/curve25519.h
@@ -50,7 +50,7 @@ typedef unsigned char ssh_curve25519_privkey[CURVE25519_PRIVKEY_SIZE];
int ssh_client_curve25519_init(ssh_session session);
#ifdef WITH_SERVER
-int ssh_server_curve25519_init(ssh_session session, ssh_buffer packet);
+void ssh_server_curve25519_init(ssh_session session);
#endif /* WITH_SERVER */
#endif /* CURVE25519_H_ */
diff --git a/include/libssh/dh.h b/include/libssh/dh.h
index 2198a9fa..3d7312c5 100644
--- a/include/libssh/dh.h
+++ b/include/libssh/dh.h
@@ -57,4 +57,7 @@ int ssh_hashbufin_add_cookie(ssh_session session, unsigned char *cookie);
int ssh_hashbufout_add_cookie(ssh_session session);
int ssh_generate_session_keys(ssh_session session);
+#ifdef WITH_SERVER
+void ssh_server_dh_init(ssh_session session);
+#endif /* WITH_SERVER */
#endif /* DH_H_ */
diff --git a/include/libssh/ecdh.h b/include/libssh/ecdh.h
index c5212bc7..17fe02e7 100644
--- a/include/libssh/ecdh.h
+++ b/include/libssh/ecdh.h
@@ -22,6 +22,7 @@
#define ECDH_H_
#include "config.h"
+#include "libssh/callbacks.h"
#ifdef HAVE_LIBCRYPTO
#ifdef HAVE_OPENSSL_ECDH_H
@@ -42,13 +43,14 @@
#endif
extern struct ssh_packet_callbacks_struct ssh_ecdh_client_callbacks;
-
/* Backend-specific functions. */
int ssh_client_ecdh_init(ssh_session session);
int ecdh_build_k(ssh_session session);
#ifdef WITH_SERVER
-int ssh_server_ecdh_init(ssh_session session, ssh_buffer packet);
+extern struct ssh_packet_callbacks_struct ssh_ecdh_server_callbacks;
+void ssh_server_ecdh_init(ssh_session session);
+SSH_PACKET_CALLBACK(ssh_packet_server_ecdh_init);
#endif /* WITH_SERVER */
#endif /* ECDH_H_ */