aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2019-01-07 18:49:58 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-01-09 13:17:31 +0100
commit27fe60954c29e548c30af239d92ab4faaf8cf788 (patch)
treeaa2c192ae5b664912e3ae4d1df15c1068a69ee3e /include
parentca62632170c311923026f978c57d2e0a0be3e0e1 (diff)
downloadlibssh-27fe60954c29e548c30af239d92ab4faaf8cf788.tar.gz
libssh-27fe60954c29e548c30af239d92ab4faaf8cf788.tar.xz
libssh-27fe60954c29e548c30af239d92ab4faaf8cf788.zip
server: Correctly handle extensions
If the server had an RSA host key, it provided unconditionally SHA2 signatures without consulting the client proposed list of supported host keys. This commit implements more fine-grained detection of the extension to provide the client with valid signatures according to RFC 8332 Section 3.1. Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include')
-rw-r--r--include/libssh/session.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/libssh/session.h b/include/libssh/session.h
index 86540bbf..5761fa2d 100644
--- a/include/libssh/session.h
+++ b/include/libssh/session.h
@@ -91,10 +91,11 @@ enum ssh_pending_call_e {
#define SSH_OPT_FLAG_GSSAPI_AUTH 0x8
/* extensions flags */
+/* negotiation enabled */
+#define SSH_EXT_NEGOTIATION 0x01
/* server-sig-algs extension */
-#define SSH_EXT_SIG_RSA_SHA256 0x01
-#define SSH_EXT_SIG_RSA_SHA512 0x02
-#define SSH_EXT_ALL SSH_EXT_SIG_RSA_SHA256 | SSH_EXT_SIG_RSA_SHA512
+#define SSH_EXT_SIG_RSA_SHA256 0x02
+#define SSH_EXT_SIG_RSA_SHA512 0x04
/* members that are common to ssh_session and ssh_bind */
struct ssh_common_struct {