From 9136ec134c97a8aff2917760c03134f52945ff3c Mon Sep 17 00:00:00 2001 From: "deraadt@openbsd.org" Date: Mon, 12 Sep 2016 01:22:38 +0000 Subject: upstream commit Add MAXIMUM(), MINIMUM(), and ROUNDUP() to misc.h, then use those definitions rather than pulling and unknown namespace pollution. ok djm markus dtucker Upstream-ID: 712cafa816c9f012a61628b66b9fbd5687223fb8 --- dh.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'dh.c') diff --git a/dh.c b/dh.c index 167d3714..194f29b1 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.61 2016/09/12 01:22:38 deraadt Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * @@ -25,7 +25,6 @@ #include "includes.h" -#include /* MIN */ #include #include @@ -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); -- cgit v1.2.3