diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-08-05 22:40:38 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-08-05 22:40:38 +0000 |
commit | 38eb4fb6b730d3586ea8d40e33c6756b12b09b2a (patch) | |
tree | e5303a42aac8cbda0d0d284a79306a848bf115d5 /sbin | |
parent | 7501bb79a0a27cb1919d5f764efe8443cd2bf671 (diff) |
regress/rsakeygen/Makefile: Merge with EOM 1.5
sysdep/openbsd/sysdep.c: Merge with EOM 1.8
cookie.c: Merge with EOM 1.21
util.c: Merge with EOM 1.15
util.h: Merge with EOM 1.7
author: niklas
Move regrand var to util.c, and get the decl from util.h, do not update the
cookie secret if in deterministic mode.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/isakmpd/cookie.c | 11 | ||||
-rw-r--r-- | sbin/isakmpd/regress/rsakeygen/Makefile | 6 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/openbsd/sysdep.c | 12 | ||||
-rw-r--r-- | sbin/isakmpd/util.c | 10 | ||||
-rw-r--r-- | sbin/isakmpd/util.h | 6 |
5 files changed, 26 insertions, 19 deletions
diff --git a/sbin/isakmpd/cookie.c b/sbin/isakmpd/cookie.c index f8eef8a03f3..a83d9da676e 100644 --- a/sbin/isakmpd/cookie.c +++ b/sbin/isakmpd/cookie.c @@ -1,5 +1,5 @@ -/* $OpenBSD: cookie.c,v 1.5 1999/04/19 20:00:24 niklas Exp $ */ -/* $EOM: cookie.c,v 1.20 1999/04/17 23:20:20 niklas Exp $ */ +/* $OpenBSD: cookie.c,v 1.6 1999/08/05 22:40:37 niklas Exp $ */ +/* $EOM: cookie.c,v 1.21 1999/08/05 15:00:04 niklas Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -125,6 +125,9 @@ cookie_reset_event (void *arg) void cookie_init (void) { - /* Start responder cookie resets. */ - cookie_reset_event (0); + if (regrand) + cookie_secret_reset (); + else + /* Start responder cookie resets. */ + cookie_reset_event (0); } diff --git a/sbin/isakmpd/regress/rsakeygen/Makefile b/sbin/isakmpd/regress/rsakeygen/Makefile index b9868e57767..67426bf19ff 100644 --- a/sbin/isakmpd/regress/rsakeygen/Makefile +++ b/sbin/isakmpd/regress/rsakeygen/Makefile @@ -1,5 +1,5 @@ -# $OpenBSD: Makefile,v 1.6 1999/07/17 21:54:38 niklas Exp $ -# $EOM: Makefile,v 1.4 1999/07/17 20:44:13 niklas Exp $ +# $OpenBSD: Makefile,v 1.7 1999/08/05 22:40:37 niklas Exp $ +# $EOM: Makefile,v 1.5 1999/08/05 15:00:05 niklas Exp $ # # Copyright (c) 1999 Niels Provos. All rights reserved. @@ -37,7 +37,7 @@ # RSA Key Generation PROG= rsakeygen -SRCS= log.c rsakeygen.c sysdep.c +SRCS= log.c rsakeygen.c sysdep.c util.c TOPSRC= ${.CURDIR}/../.. TOPOBJ!= cd ${TOPSRC}; printf "all:\n\t@pwd\n" |${MAKE} -f- OS!= awk '/^OS=/ { print $$2 }' ${.CURDIR}/../../Makefile diff --git a/sbin/isakmpd/sysdep/openbsd/sysdep.c b/sbin/isakmpd/sysdep/openbsd/sysdep.c index 382b718ddef..459af34bab9 100644 --- a/sbin/isakmpd/sysdep/openbsd/sysdep.c +++ b/sbin/isakmpd/sysdep/openbsd/sysdep.c @@ -1,5 +1,5 @@ -/* $OpenBSD: sysdep.c,v 1.5 1999/05/01 20:43:40 niklas Exp $ */ -/* $EOM: sysdep.c,v 1.7 1999/05/01 20:21:23 niklas Exp $ */ +/* $OpenBSD: sysdep.c,v 1.6 1999/08/05 22:40:37 niklas Exp $ */ +/* $EOM: sysdep.c,v 1.8 1999/08/05 15:00:06 niklas Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -43,6 +43,8 @@ #include "sysdep.h" +#include "util.h" + #ifdef NEED_SYSDEP_APP #include "app.h" #include "conf.h" @@ -63,12 +65,6 @@ extern char *__progname; /* - * This is set to true in case of regression-test mode, when it will - * cause predictable random numbers be generated. - */ -int regrand = 0; - -/* * An as strong as possible random number generator, reverting to a * deterministic pseudo-random one if regrand is set. */ diff --git a/sbin/isakmpd/util.c b/sbin/isakmpd/util.c index 43d23498dd7..9128f4477d4 100644 --- a/sbin/isakmpd/util.c +++ b/sbin/isakmpd/util.c @@ -1,5 +1,5 @@ -/* $OpenBSD: util.c,v 1.5 1999/04/19 19:54:54 niklas Exp $ */ -/* $EOM: util.c,v 1.14 1999/04/02 00:58:15 niklas Exp $ */ +/* $OpenBSD: util.c,v 1.6 1999/08/05 22:40:37 niklas Exp $ */ +/* $EOM: util.c,v 1.15 1999/08/05 15:00:04 niklas Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -46,6 +46,12 @@ #include "util.h" /* + * This is set to true in case of regression-test mode, when it will + * cause predictable random numbers be generated. + */ +int regrand = 0; + +/* * XXX These might be turned into inlines or macros, maybe even * machine-dependent ones, for performance reasons. */ diff --git a/sbin/isakmpd/util.h b/sbin/isakmpd/util.h index a513adba32d..8b8ee3a6c76 100644 --- a/sbin/isakmpd/util.h +++ b/sbin/isakmpd/util.h @@ -1,5 +1,5 @@ -/* $OpenBSD: util.h,v 1.3 1998/11/17 11:10:22 niklas Exp $ */ -/* $EOM: util.h,v 1.6 1998/11/12 13:01:46 niklas Exp $ */ +/* $OpenBSD: util.h,v 1.4 1999/08/05 22:40:37 niklas Exp $ */ +/* $EOM: util.h,v 1.7 1999/08/05 15:00:04 niklas Exp $ */ /* * Copyright (c) 1998 Niklas Hallqvist. All rights reserved. @@ -41,6 +41,8 @@ #define ROUNDUP_32(x) (((x) + 3) & ~4) +extern int regrand; + struct message; extern u_int16_t decode_16 (u_int8_t *); |