summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-12-17 16:33:53 +1100
committerDamien Miller <djm@mindrot.org>2003-12-17 16:33:53 +1100
commit8975ddf11b17bf58191c653a0173d91e50e942c7 (patch)
tree3625ddd71ec3d86f289d4a06fea8378c044b6bff
parent509b0107f0e67cb4af663c147179d35fa6425614 (diff)
- markus@cvs.openbsd.org 2003/12/16 15:51:54
[dh.c] use <= instead of < in dh_estimate; ok provos/hshoexer; do not return < DH_GRP_MIN
-rw-r--r--ChangeLog6
-rw-r--r--dh.c8
2 files changed, 8 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 3593792c1..5c63b2aa2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,10 @@
29 application layer keep alive (ServerAliveInterval ServerAliveCountMax) 29 application layer keep alive (ServerAliveInterval ServerAliveCountMax)
30 for ssh(1), similar to the sshd(8) option; ok beck@; with help from 30 for ssh(1), similar to the sshd(8) option; ok beck@; with help from
31 jmc and dtucker@ 31 jmc and dtucker@
32 - markus@cvs.openbsd.org 2003/12/16 15:51:54
33 [dh.c]
34 use <= instead of < in dh_estimate; ok provos/hshoexer;
35 do not return < DH_GRP_MIN
32 36
3320031209 3720031209
34 - (dtucker) OpenBSD CVS Sync 38 - (dtucker) OpenBSD CVS Sync
@@ -1598,4 +1602,4 @@
1598 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 1602 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
1599 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 1603 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
1600 1604
1601$Id: ChangeLog,v 1.3146 2003/12/17 05:33:10 djm Exp $ 1605$Id: ChangeLog,v 1.3147 2003/12/17 05:33:53 djm Exp $
diff --git a/dh.c b/dh.c
index c924efee0..c7a3e18be 100644
--- a/dh.c
+++ b/dh.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: dh.c,v 1.25 2003/09/18 13:02:21 miod Exp $"); 26RCSID("$OpenBSD: dh.c,v 1.26 2003/12/16 15:51:54 markus Exp $");
27 27
28#include "xmalloc.h" 28#include "xmalloc.h"
29 29
@@ -279,11 +279,9 @@ int
279dh_estimate(int bits) 279dh_estimate(int bits)
280{ 280{
281 281
282 if (bits < 64) 282 if (bits <= 128)
283 return (512); /* O(2**63) */
284 if (bits < 128)
285 return (1024); /* O(2**86) */ 283 return (1024); /* O(2**86) */
286 if (bits < 192) 284 if (bits <= 192)
287 return (2048); /* O(2**116) */ 285 return (2048); /* O(2**116) */
288 return (4096); /* O(2**156) */ 286 return (4096); /* O(2**156) */
289} 287}