diff options
author | Jakub Jelen <jjelen@redhat.com> | 2018-08-06 11:51:26 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-08-31 14:18:34 +0200 |
commit | 761225712a28d70adea7a2b872c265bc98a83511 (patch) | |
tree | e3b64f27742c357a1625e30407d12b7888c2e9cc /include | |
parent | df13d8c61f4fe0cc7d07260d59740eaf7f939d65 (diff) | |
download | libssh-761225712a28d70adea7a2b872c265bc98a83511.tar.gz libssh-761225712a28d70adea7a2b872c265bc98a83511.tar.xz libssh-761225712a28d70adea7a2b872c265bc98a83511.zip |
client: Handle the MSG_EXT_INFO packet signalling supported extensions
RFC 8308: The extension negotiation in Secure Shell (SSH) Protocol
RFC 8332: Use of RSA Keys with SHA-256 and SHA-512
in the Secure Shell (SSH) Protocol
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/libssh/packet.h | 1 | ||||
-rw-r--r-- | include/libssh/session.h | 8 | ||||
-rw-r--r-- | include/libssh/ssh2.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/include/libssh/packet.h b/include/libssh/packet.h index 1a9283d8..a3bcb9a8 100644 --- a/include/libssh/packet.h +++ b/include/libssh/packet.h @@ -51,6 +51,7 @@ SSH_PACKET_CALLBACK(ssh_packet_ignore_callback); SSH_PACKET_CALLBACK(ssh_packet_dh_reply); SSH_PACKET_CALLBACK(ssh_packet_newkeys); SSH_PACKET_CALLBACK(ssh_packet_service_accept); +SSH_PACKET_CALLBACK(ssh_packet_ext_info); #ifdef WITH_SERVER SSH_PACKET_CALLBACK(ssh_packet_kexdh_init); diff --git a/include/libssh/session.h b/include/libssh/session.h index 6cb79628..00717652 100644 --- a/include/libssh/session.h +++ b/include/libssh/session.h @@ -86,6 +86,11 @@ enum ssh_pending_call_e { #define SSH_OPT_FLAG_KBDINT_AUTH 0x4 #define SSH_OPT_FLAG_GSSAPI_AUTH 0x8 +/* extensions flags */ +/* server-sig-algs extension */ +#define SSH_EXT_SIG_RSA_SHA256 0x01 +#define SSH_EXT_SIG_RSA_SHA512 0x02 + /* members that are common to ssh_session and ssh_bind */ struct ssh_common_struct { struct error_struct error; @@ -114,6 +119,9 @@ struct ssh_session_struct { /* session flags (SSH_SESSION_FLAG_*) */ int flags; + /* Extensions negotiated using RFC 8308 */ + uint32_t extensions; + ssh_string banner; /* that's the issue banner from the server */ char *discon_msg; /* disconnect message from diff --git a/include/libssh/ssh2.h b/include/libssh/ssh2.h index 8b39b9a6..35214330 100644 --- a/include/libssh/ssh2.h +++ b/include/libssh/ssh2.h @@ -7,6 +7,7 @@ #define SSH2_MSG_DEBUG 4 #define SSH2_MSG_SERVICE_REQUEST 5 #define SSH2_MSG_SERVICE_ACCEPT 6 +#define SSH2_MSG_EXT_INFO 7 #define SSH2_MSG_KEXINIT 20 #define SSH2_MSG_NEWKEYS 21 |