aboutsummaryrefslogtreecommitdiff
path: root/dh.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2017-01-31 12:33:47 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2017-01-31 12:33:47 +0000
commit19ca85510bbe080af3faf5e9ae394608428ac953 (patch)
tree117f9a26f0d949b937129ea841578bd2ba4390fa /dh.c
parentab4ec008e7abd1c8098428dbf9642c3685383045 (diff)
downloadsrc-19ca85510bbe080af3faf5e9ae394608428ac953.tar.gz
src-19ca85510bbe080af3faf5e9ae394608428ac953.zip
Vendor import of OpenSSH 7.4p1.vendor/openssh/7.4p1
Notes
Notes: svn path=/vendor-crypto/openssh/dist/; revision=313012 svn path=/vendor-crypto/openssh/7.4p1/; revision=313013; tag=vendor/openssh/7.4p1
Diffstat (limited to 'dh.c')
-rw-r--r--dh.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/dh.c b/dh.c
index 167d3714ed31..475312427805 100644
--- a/dh.c
+++ b/dh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh.c,v 1.60 2016/05/02 10:26:04 djm Exp $ */
+/* $OpenBSD: dh.c,v 1.62 2016/12/15 21:20:41 dtucker Exp $ */
/*
* Copyright (c) 2000 Niels Provos. All rights reserved.
*
@@ -25,7 +25,6 @@
#include "includes.h"
-#include <sys/param.h> /* MIN */
#include <openssl/bn.h>
#include <openssl/dh.h>
@@ -153,7 +152,7 @@ choose_dh(int min, int wantbits, int max)
struct dhgroup dhg;
if ((f = fopen(_PATH_DH_MODULI, "r")) == NULL) {
- logit("WARNING: could open open %s (%s), using fixed modulus",
+ logit("WARNING: could not open %s (%s), using fixed modulus",
_PATH_DH_MODULI, strerror(errno));
return (dh_new_group_fallback(max));
}
@@ -272,7 +271,7 @@ dh_gen_key(DH *dh, int need)
* Pollard Rho, Big step/Little Step attacks are O(sqrt(n)),
* so double requested need here.
*/
- dh->length = MIN(need * 2, pbits - 1);
+ dh->length = MINIMUM(need * 2, pbits - 1);
if (DH_generate_key(dh) == 0 ||
!dh_pub_is_valid(dh, dh->pub_key)) {
BN_clear_free(dh->priv_key);