OpenBSD CVS

CVS log for src/usr.bin/ssh/moduli.c


[BACK] Up to [local] / src / usr.bin / ssh

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.39 / (download) - annotate - [select for diffs], Thu Mar 2 06:41:56 2023 UTC (14 months, 2 weeks ago) by dtucker
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.38: +8 -5 lines
Diff to previous 1.38 (colored)

Ensure we always call fclose when writing checkpoints.   In the case of
an fprintf failure we would not call fclose which would leak the FILE
pointer.  While we're there, try to clean up the temp file on failure.
Spotted by Coverity, ok djm@

Revision 1.38 / (download) - annotate - [select for diffs], Sun May 1 23:20:30 2022 UTC (2 years ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.37: +7 -7 lines
Diff to previous 1.37 (colored)

fix some integer overflows in sieve_large() that show up when trying
to generate modp groups > 16k bits. Reported via GHPR#306 by
Bertram Felgenhauer, but fixed in a different way. feedback/ok tb@

Revision 1.37 / (download) - annotate - [select for diffs], Fri Nov 15 06:00:20 2019 UTC (4 years, 6 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.36: +4 -8 lines
Diff to previous 1.36 (colored)

remove most uses of BN_CTX

We weren't following the rules re BN_CTX_start/BN_CTX_end and the places
we were using it didn't benefit from its use anyway. ok dtucker@

Revision 1.36 / (download) - annotate - [select for diffs], Fri Oct 4 03:26:58 2019 UTC (4 years, 7 months ago) by dtucker
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.35: +3 -1 lines
Diff to previous 1.35 (colored)

Check for gmtime failure in moduli generation.  Based on patch from
krishnaiah.bommu@intel.com, ok djm@

Revision 1.35 / (download) - annotate - [select for diffs], Wed Jul 3 03:24:02 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

snprintf/vsnprintf return < 0 on error, rather than -1.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Jan 23 09:49:00 2019 UTC (5 years, 3 months ago) by dtucker
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.33: +1 -3 lines
Diff to previous 1.33 (colored)

Remove 3 as a guess for possible generator during moduli generation.
It's not mentioned in RFC4419 and it's not possible for Sophie-Germain
primes greater than 5.  bz#2330, from Christian Wittenhorst , ok djm@ tb@

Revision 1.33 / (download) - annotate - [select for diffs], Sun Jan 20 02:01:59 2019 UTC (5 years, 3 months ago) by tb
Branch: MAIN
Changes since 1.32: +14 -5 lines
Diff to previous 1.32 (colored)

Fix BN_is_prime_* calls in SSH, the API returns -1 on error.

Found thanks to BoringSSL's commit 53409ee3d7595ed37da472bc73b010cd2c8a5ffd
by David Benjamin.

ok djm, dtucker

Revision 1.32 / (download) - annotate - [select for diffs], Fri Dec 8 03:45:52 2017 UTC (6 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

time_t printing needs %lld and (long long) casts
ok djm

Revision 1.31 / (download) - annotate - [select for diffs], Mon Sep 12 01:22:38 2016 UTC (7 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.30: +2 -3 lines
Diff to previous 1.30 (colored)

Add MAXIMUM(), MINIMUM(), and ROUNDUP() to misc.h, then use those definitions
rather than pulling <sys/param.h> and unknown namespace pollution.
ok djm markus dtucker

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jan 20 23:14:00 2015 UTC (9 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.29: +5 -4 lines
Diff to previous 1.29 (colored)

Reduce use of <sys/param.h> and transition to <limits.h> throughout.
ok djm markus

Revision 1.29 / (download) - annotate - [select for diffs], Thu Aug 21 01:08:52 2014 UTC (9 years, 8 months ago) by doug
Branch: MAIN
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (colored)

Free resources on error in mkstemp and fdopen

ok djm@

Revision 1.28 / (download) - annotate - [select for diffs], Thu Oct 24 00:49:49 2013 UTC (10 years, 6 months ago) by dtucker
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.27: +92 -14 lines
Diff to previous 1.27 (colored)

Periodically print progress and, if possible, expected time to completion
when screening moduli for DH groups.  ok deraadt djm

Revision 1.27 / (download) - annotate - [select for diffs], Fri May 17 00:13:13 2013 UTC (11 years ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.26: +5 -5 lines
Diff to previous 1.26 (colored)

bye, bye xfree(); ok markus@

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jul 6 00:41:59 2012 UTC (11 years, 10 months ago) by dtucker
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.25: +13 -5 lines
Diff to previous 1.25 (colored)

Add options to specify starting line number and number of lines to process
when screening moduli candidates.  This allows processing of different
parts of a candidate moduli file in parallel.  man page help jmc@, ok djm@

Revision 1.25 / (download) - annotate - [select for diffs], Wed Oct 19 00:06:10 2011 UTC (12 years, 7 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.24: +6 -6 lines
Diff to previous 1.24 (colored)

s/tmpfile/tmp/ to make this -Wshadow clean

Revision 1.24 / (download) - annotate - [select for diffs], Sun Oct 16 15:51:39 2011 UTC (12 years, 7 months ago) by stsp
Branch: MAIN
Changes since 1.23: +3 -1 lines
Diff to previous 1.23 (colored)

add missing includes to unbreak tree; fix from rpointel

Revision 1.23 / (download) - annotate - [select for diffs], Sun Oct 16 11:02:46 2011 UTC (12 years, 7 months ago) by dtucker
Branch: MAIN
Changes since 1.22: +66 -3 lines
Diff to previous 1.22 (colored)

Add optional checkpoints for moduli screening.  feedback & ok deraadt

Revision 1.22 / (download) - annotate - [select for diffs], Wed Nov 10 01:33:07 2010 UTC (13 years, 6 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.21: +4 -4 lines
Diff to previous 1.21 (colored)

use only libcrypto APIs that are retained with OPENSSL_NO_DEPRECATED.
these have been around for years by this time. ok markus

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jun 26 09:19:40 2008 UTC (15 years, 10 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.20: +16 -33 lines
Diff to previous 1.20 (colored)

when loading moduli from /etc/moduli in sshd(8), check that they
are of the expected "safe prime" structure and have had
appropriate primality tests performed;
feedback and ok dtucker@

Revision 1.20 / (download) - annotate - [select for diffs], Sat Feb 24 03:30:11 2007 UTC (17 years, 2 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.19: +3 -5 lines
Diff to previous 1.19 (colored)

- strlen returns size_t, not int.
- Pass full buffer size to fgets.

OK djm@, millert@, and moritz@.

Revision 1.12.2.2 / (download) - annotate - [select for diffs], Wed Nov 8 00:44:05 2006 UTC (17 years, 6 months ago) by brad
Branch: OPENBSD_3_8
Changes since 1.12.2.1: +34 -18 lines
Diff to previous 1.12.2.1 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)

upgrade to OpenSSH 4.5

Revision 1.18.4.1 / (download) - annotate - [select for diffs], Wed Nov 8 00:42:10 2006 UTC (17 years, 6 months ago) by brad
Branch: OPENBSD_4_0
Changes since 1.18: +34 -18 lines
Diff to previous 1.18 (colored) next main 1.19 (colored)

upgrade to OpenSSH 4.5

Revision 1.12.4.2 / (download) - annotate - [select for diffs], Wed Nov 8 00:17:14 2006 UTC (17 years, 6 months ago) by brad
Branch: OPENBSD_3_9
Changes since 1.12.4.1: +34 -18 lines
Diff to previous 1.12.4.1 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)

upgrade to OpenSSH 4.5

Revision 1.19 / (download) - annotate - [select for diffs], Mon Nov 6 21:25:28 2006 UTC (17 years, 6 months ago) by markus
Branch: MAIN
Changes since 1.18: +34 -18 lines
Diff to previous 1.18 (colored)

add missing checks for openssl return codes; with & ok djm@

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Fri Oct 6 03:19:32 2006 UTC (17 years, 7 months ago) by brad
Branch: OPENBSD_3_8
Changes since 1.12: +13 -17 lines
Diff to previous 1.12 (colored)

upgrade to OpenSSH 4.4

Revision 1.12.4.1 / (download) - annotate - [select for diffs], Sat Sep 30 04:06:50 2006 UTC (17 years, 7 months ago) by brad
Branch: OPENBSD_3_9
Changes since 1.12: +13 -17 lines
Diff to previous 1.12 (colored)

upgrade to OpenSSH 4.4

Revision 1.18 / (download) - annotate - [select for diffs], Thu Aug 3 03:34:42 2006 UTC (17 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE
Branch point for: OPENBSD_4_0
Changes since 1.17: +2 -3 lines
Diff to previous 1.17 (colored)

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step

Revision 1.17 / (download) - annotate - [select for diffs], Tue Aug 1 23:22:47 2006 UTC (17 years, 9 months ago) by stevesk
Branch: MAIN
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)

move #include <stdio.h> out of includes.h

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jul 26 13:57:17 2006 UTC (17 years, 9 months ago) by stevesk
Branch: MAIN
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

move #include <stdlib.h> out of includes.h

Revision 1.15 / (download) - annotate - [select for diffs], Sat Jul 22 20:48:23 2006 UTC (17 years, 9 months ago) by stevesk
Branch: MAIN
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (colored)

move #include <string.h> out of includes.h

Revision 1.14 / (download) - annotate - [select for diffs], Sat Jul 22 19:08:54 2006 UTC (17 years, 9 months ago) by stevesk
Branch: MAIN
Changes since 1.13: +8 -3 lines
Diff to previous 1.13 (colored)

move #include <time.h> out of includes.h

Revision 1.13 / (download) - annotate - [select for diffs], Sat Mar 25 00:05:41 2006 UTC (18 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.12: +3 -14 lines
Diff to previous 1.12 (colored)

introduce xcalloc() and xasprintf() failure-checked allocations functions
and use them throughout openssh

xcalloc is particularly important because malloc(nmemb * size) is a
dangerous idiom (subject to integer overflow) and it is time for it to
die

feedback and ok deraadt@

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Sun Sep 4 18:40:02 2005 UTC (18 years, 8 months ago) by brad
Branch: OPENBSD_3_7
Changes since 1.10: +17 -16 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

upgrade to OpenSSH 4.2

Revision 1.9.2.2 / (download) - annotate - [select for diffs], Fri Sep 2 03:45:00 2005 UTC (18 years, 8 months ago) by brad
Branch: OPENBSD_3_6
Changes since 1.9.2.1: +17 -16 lines
Diff to previous 1.9.2.1 (colored) to branchpoint 1.9 (colored) next main 1.10 (colored)

upgrade to OpenSSH 4.2

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jul 17 07:17:55 2005 UTC (18 years, 10 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_8_BASE
Branch point for: OPENBSD_3_9, OPENBSD_3_8
Changes since 1.11: +12 -12 lines
Diff to previous 1.11 (colored)

knf says that a 2nd level indent is four (not three or five) spaces

Revision 1.11 / (download) - annotate - [select for diffs], Mon May 23 22:44:01 2005 UTC (18 years, 11 months ago) by avsm
Branch: MAIN
Changes since 1.10: +6 -5 lines
Diff to previous 1.10 (colored)

- removes signed/unsigned comparisons in moduli generation
- use strtonum instead of atoi where its easier
- check some strlcpy overflow and fatal instead of truncate

Revision 1.5.2.2 / (download) - annotate - [select for diffs], Thu Mar 10 17:15:04 2005 UTC (19 years, 2 months ago) by brad
Branch: OPENBSD_3_5
Changes since 1.5.2.1: +3 -3 lines
Diff to previous 1.5.2.1 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored)

upgrade to OpenSSH 4.0

Revision 1.9.2.1 / (download) - annotate - [select for diffs], Thu Mar 10 16:28:27 2005 UTC (19 years, 2 months ago) by brad
Branch: OPENBSD_3_6
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

upgrade to OpenSSH 4.0

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jan 17 03:25:46 2005 UTC (19 years, 4 months ago) by dtucker
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE
Branch point for: OPENBSD_3_7
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

Correct spelling: SCHNOOR->SCHNORR; ok djm@

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Thu Aug 19 22:37:31 2004 UTC (19 years, 9 months ago) by brad
Branch: OPENBSD_3_4
Changes since 1.1.2.1: +57 -29 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

upgrade to OpenSSH 3.9

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Thu Aug 19 04:13:26 2004 UTC (19 years, 9 months ago) by brad
Branch: OPENBSD_3_5
Changes since 1.5: +57 -29 lines
Diff to previous 1.5 (colored)

upgrade to OpenSSH 3.9

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jul 11 17:48:47 2004 UTC (19 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE
Branch point for: OPENBSD_3_6
Changes since 1.8: +24 -24 lines
Diff to previous 1.8 (colored)

spaces

Revision 1.8 / (download) - annotate - [select for diffs], Fri May 21 08:43:03 2004 UTC (20 years ago) by markus
Branch: MAIN
Changes since 1.7: +3 -1 lines
Diff to previous 1.7 (colored)

add prototypes for -Wall; ok djm

Revision 1.7 / (download) - annotate - [select for diffs], Sun May 9 00:06:47 2004 UTC (20 years ago) by djm
Branch: MAIN
Changes since 1.6: +30 -4 lines
Diff to previous 1.6 (colored)

zap another tiny header; ok deraadt@

Revision 1.6 / (download) - annotate - [select for diffs], Thu Apr 22 11:56:57 2004 UTC (20 years ago) by djm
Branch: MAIN
Changes since 1.5: +6 -6 lines
Diff to previous 1.5 (colored)

Bugzilla #850: Sophie Germain is the correct name of the French mathematician,
"Sophie Germaine" isn't; from Luc.Maisonobe@c-s.fr

Revision 1.1.4.2 / (download) - annotate - [select for diffs], Thu Mar 4 18:18:15 2004 UTC (20 years, 2 months ago) by brad
Branch: OPENBSD_3_3
Changes since 1.1.4.1: +58 -49 lines
Diff to previous 1.1.4.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

upgrade to OpenSSH 3.8upgrade to OpenSSH 3.8upgrade to OpenSSH 3.8

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Sat Feb 28 03:51:33 2004 UTC (20 years, 2 months ago) by brad
Branch: OPENBSD_3_4
Changes since 1.1: +58 -49 lines
Diff to previous 1.1 (colored)

upgrade to OpenSSH 3.8

Revision 1.5 / (download) - annotate - [select for diffs], Mon Dec 22 09:16:57 2003 UTC (20 years, 4 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE
Branch point for: OPENBSD_3_5
Changes since 1.4: +18 -9 lines
Diff to previous 1.4 (colored)

tidy up moduli generation debugging, add -v (verbose/debug) option to
ssh-keygen; ok markus@

Revision 1.4 / (download) - annotate - [select for diffs], Tue Dec 9 13:52:55 2003 UTC (20 years, 5 months ago) by dtucker
Branch: MAIN
Changes since 1.3: +10 -1 lines
Diff to previous 1.3 (colored)

Prevent ssh-keygen -T from outputting moduli with a generator of 0, since
they can't be used for Diffie-Hellman.  Assistance and ok djm@

Revision 1.3 / (download) - annotate - [select for diffs], Sun Dec 7 06:34:18 2003 UTC (20 years, 5 months ago) by djm
Branch: MAIN
Changes since 1.2: +1 -10 lines
Diff to previous 1.2 (colored)

remove unused debugging #define templates

Revision 1.2 / (download) - annotate - [select for diffs], Fri Nov 21 11:57:03 2003 UTC (20 years, 6 months ago) by djm
Branch: MAIN
Changes since 1.1: +33 -33 lines
Diff to previous 1.1 (colored)

unexpand and delete whitespace at EOL; ok markus@

Revision 1.1.6.1 / (download) - annotate - [select for diffs], Tue Sep 16 21:20:26 2003 UTC (20 years, 8 months ago) by brad
Branch: OPENBSD_3_2
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored) next main 1.2 (colored)

upgrade to OpenSSH 3.7

Revision 1.1.4.1 / (download) - annotate - [select for diffs], Tue Sep 16 20:50:43 2003 UTC (20 years, 8 months ago) by brad
Branch: OPENBSD_3_3
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

upgrade to OpenSSH 3.7

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jul 28 09:49:56 2003 UTC (20 years, 9 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE
Branch point for: OPENBSD_3_4, OPENBSD_3_3, OPENBSD_3_2

Support for generating Diffie-Hellman groups (/etc/moduli) from ssh-keygen.
Based on code from Phil Karn, William Allen Simpson and Niels Provos.
ok markus@, thanks jmc@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.