diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #include <sys/types.h> | 30 | #include <sys/types.h> |
31 | #include <sys/socket.h> | 31 | #include <sys/socket.h> |
32 | #include "openbsd-compat/sys-tree.h" | ||
33 | #include <sys/wait.h> | 32 | #include <sys/wait.h> |
34 | 33 | ||
35 | #include <errno.h> | 34 | #include <errno.h> |
@@ -60,7 +59,10 @@ | |||
60 | #include <openssl/dh.h> | 59 | #include <openssl/dh.h> |
61 | #endif | 60 | #endif |
62 | 61 | ||
62 | #include "openbsd-compat/sys-tree.h" | ||
63 | #include "openbsd-compat/sys-queue.h" | 63 | #include "openbsd-compat/sys-queue.h" |
64 | #include "openbsd-compat/openssl-compat.h" | ||
65 | |||
64 | #include "atomicio.h" | 66 | #include "atomicio.h" |
65 | #include "xmalloc.h" | 67 | #include "xmalloc.h" |
66 | #include "ssh.h" | 68 | #include "ssh.h" |
@@ -566,6 +568,7 @@ int | |||
566 | mm_answer_moduli(int sock, struct sshbuf *m) | 568 | mm_answer_moduli(int sock, struct sshbuf *m) |
567 | { | 569 | { |
568 | DH *dh; | 570 | DH *dh; |
571 | const BIGNUM *dh_p, *dh_g; | ||
569 | int r; | 572 | int r; |
570 | u_int min, want, max; | 573 | u_int min, want, max; |
571 | 574 | ||
@@ -590,9 +593,10 @@ mm_answer_moduli(int sock, struct sshbuf *m) | |||
590 | return (0); | 593 | return (0); |
591 | } else { | 594 | } else { |
592 | /* Send first bignum */ | 595 | /* Send first bignum */ |
596 | DH_get0_pqg(dh, &dh_p, NULL, &dh_g); | ||
593 | if ((r = sshbuf_put_u8(m, 1)) != 0 || | 597 | if ((r = sshbuf_put_u8(m, 1)) != 0 || |
594 | (r = sshbuf_put_bignum2(m, dh->p)) != 0 || | 598 | (r = sshbuf_put_bignum2(m, dh_p)) != 0 || |
595 | (r = sshbuf_put_bignum2(m, dh->g)) != 0) | 599 | (r = sshbuf_put_bignum2(m, dh_g)) != 0) |
596 | fatal("%s: buffer error: %s", __func__, ssh_err(r)); | 600 | fatal("%s: buffer error: %s", __func__, ssh_err(r)); |
597 | 601 | ||
598 | DH_free(dh); | 602 | DH_free(dh); |