diff options
Diffstat (limited to 'kexgexs.c')
-rw-r--r-- | kexgexs.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kexgexs.c,v 1.8 2006/08/03 03:34:42 deraadt Exp $ */ | 1 | /* $OpenBSD: kexgexs.c,v 1.9 2006/10/31 16:33:12 markus 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. |
@@ -55,8 +55,8 @@ kexgex_server(Kex *kex) | |||
55 | Key *server_host_key; | 55 | Key *server_host_key; |
56 | DH *dh; | 56 | DH *dh; |
57 | u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; | 57 | u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; |
58 | u_int sbloblen, klen, kout, slen, hashlen; | 58 | u_int sbloblen, klen, slen, hashlen; |
59 | int min = -1, max = -1, nbits = -1, type; | 59 | int min = -1, max = -1, nbits = -1, type, kout; |
60 | 60 | ||
61 | if (kex->load_host_key == NULL) | 61 | if (kex->load_host_key == NULL) |
62 | fatal("Cannot load hostkey"); | 62 | fatal("Cannot load hostkey"); |
@@ -134,7 +134,8 @@ kexgex_server(Kex *kex) | |||
134 | 134 | ||
135 | klen = DH_size(dh); | 135 | klen = DH_size(dh); |
136 | kbuf = xmalloc(klen); | 136 | kbuf = xmalloc(klen); |
137 | kout = DH_compute_key(kbuf, dh_client_pub, dh); | 137 | if ((kout = DH_compute_key(kbuf, dh_client_pub, dh)) < 0) |
138 | fatal("DH_compute_key: failed"); | ||
138 | #ifdef DEBUG_KEXDH | 139 | #ifdef DEBUG_KEXDH |
139 | dump_digest("shared secret", kbuf, kout); | 140 | dump_digest("shared secret", kbuf, kout); |
140 | #endif | 141 | #endif |