aboutsummaryrefslogtreecommitdiff
path: root/src/server.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2019-10-31 15:50:21 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-12-09 16:08:03 +0100
commit6cef3e10bf7fe6d2967c3dd1dc5c8bd3dc4a3e43 (patch)
treecc44c91ddae19754a8e2498a8f05c2899465261f /src/server.c
parent442d22da609ae7e0b92de955d5de08ea07a86b88 (diff)
downloadlibssh-6cef3e10bf7fe6d2967c3dd1dc5c8bd3dc4a3e43.tar.gz
libssh-6cef3e10bf7fe6d2967c3dd1dc5c8bd3dc4a3e43.tar.xz
libssh-6cef3e10bf7fe6d2967c3dd1dc5c8bd3dc4a3e43.zip
server: Cast auth_methods to uint32_t
Fixes T188 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'src/server.c')
-rw-r--r--src/server.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/server.c b/src/server.c
index 917569db..0a787eee 100644
--- a/src/server.c
+++ b/src/server.c
@@ -510,9 +510,11 @@ static int ssh_server_kex_termination(void *s){
return 1;
}
-void ssh_set_auth_methods(ssh_session session, int auth_methods){
- /* accept only methods in range */
- session->auth.supported_methods = auth_methods & 0x3f;
+/* FIXME: auth_methods should be unsigned */
+void ssh_set_auth_methods(ssh_session session, int auth_methods)
+{
+ /* accept only methods in range */
+ session->auth.supported_methods = (uint32_t)auth_methods & 0x3fU;
}
/* Do the banner and key exchange */