diff options
Diffstat (limited to 'kexgex.c')
-rw-r--r-- | kexgex.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kexgex.c,v 1.29 2015/01/19 20:16:15 markus Exp $ */ | 1 | /* $OpenBSD: kexgex.c,v 1.30 2018/12/27 03:25:25 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Niels Provos. All rights reserved. | 3 | * Copyright (c) 2000 Niels Provos. All rights reserved. |
4 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
@@ -46,8 +46,8 @@ | |||
46 | int | 46 | int |
47 | kexgex_hash( | 47 | kexgex_hash( |
48 | int hash_alg, | 48 | int hash_alg, |
49 | const char *client_version_string, | 49 | const struct sshbuf *client_version, |
50 | const char *server_version_string, | 50 | const struct sshbuf *server_version, |
51 | const u_char *ckexinit, size_t ckexinitlen, | 51 | const u_char *ckexinit, size_t ckexinitlen, |
52 | const u_char *skexinit, size_t skexinitlen, | 52 | const u_char *skexinit, size_t skexinitlen, |
53 | const u_char *serverhostkeyblob, size_t sbloblen, | 53 | const u_char *serverhostkeyblob, size_t sbloblen, |
@@ -66,8 +66,8 @@ kexgex_hash( | |||
66 | return SSH_ERR_INVALID_ARGUMENT; | 66 | return SSH_ERR_INVALID_ARGUMENT; |
67 | if ((b = sshbuf_new()) == NULL) | 67 | if ((b = sshbuf_new()) == NULL) |
68 | return SSH_ERR_ALLOC_FAIL; | 68 | return SSH_ERR_ALLOC_FAIL; |
69 | if ((r = sshbuf_put_cstring(b, client_version_string)) != 0 || | 69 | if ((r = sshbuf_put_stringb(b, client_version)) < 0 || |
70 | (r = sshbuf_put_cstring(b, server_version_string)) != 0 || | 70 | (r = sshbuf_put_stringb(b, server_version)) < 0 || |
71 | /* kexinit messages: fake header: len+SSH2_MSG_KEXINIT */ | 71 | /* kexinit messages: fake header: len+SSH2_MSG_KEXINIT */ |
72 | (r = sshbuf_put_u32(b, ckexinitlen+1)) != 0 || | 72 | (r = sshbuf_put_u32(b, ckexinitlen+1)) != 0 || |
73 | (r = sshbuf_put_u8(b, SSH2_MSG_KEXINIT)) != 0 || | 73 | (r = sshbuf_put_u8(b, SSH2_MSG_KEXINIT)) != 0 || |