summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/isakmpd/init.c8
-rw-r--r--sbin/isakmpd/isakmpd.c18
-rw-r--r--sbin/isakmpd/util.c20
3 files changed, 5 insertions, 41 deletions
diff --git a/sbin/isakmpd/init.c b/sbin/isakmpd/init.c
index 04243748fc2..b0744b4d8dd 100644
--- a/sbin/isakmpd/init.c
+++ b/sbin/isakmpd/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.40 2010/06/29 19:50:16 reyk Exp $ */
+/* $OpenBSD: init.c,v 1.41 2013/04/24 13:46:09 deraadt Exp $ */
/* $EOM: init.c,v 1.25 2000/03/30 14:27:24 ho Exp $ */
/*
@@ -112,12 +112,6 @@ reinit(void)
* XXX This means we discard exchange->last_msg, is this really ok?
*/
-#if defined(INSECURE_RAND)
- /* Reinitialize PRNG if we are in deterministic mode. */
- if (regrand)
- srandom(seed);
-#endif
-
/* Reread config file. */
conf_reinit();
diff --git a/sbin/isakmpd/isakmpd.c b/sbin/isakmpd/isakmpd.c
index 76980e03b99..f512dc5bff7 100644
--- a/sbin/isakmpd/isakmpd.c
+++ b/sbin/isakmpd/isakmpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isakmpd.c,v 1.99 2013/03/21 04:30:14 deraadt Exp $ */
+/* $OpenBSD: isakmpd.c,v 1.100 2013/04/24 13:46:09 deraadt Exp $ */
/* $EOM: isakmpd.c,v 1.54 2000/10/05 09:28:22 niklas Exp $ */
/*
@@ -123,13 +123,10 @@ static void
parse_args(int argc, char *argv[])
{
int ch;
-#if defined(INSECURE_RAND)
- char *ep;
-#endif
int cls, level;
int do_packetlog = 0;
- while ((ch = getopt(argc, argv, "46ac:dD:f:i:KnN:p:Ll:r:R:STv")) != -1) {
+ while ((ch = getopt(argc, argv, "46ac:dD:f:i:KnN:p:Ll:R:STv")) != -1) {
switch (ch) {
case '4':
bind_family |= BIND_FAMILY_INET4;
@@ -196,17 +193,6 @@ parse_args(int argc, char *argv[])
do_packetlog++;
break;
- case 'r':
-#if defined(INSECURE_RAND)
- seed = strtoul(optarg, &ep, 0);
- srandom(seed);
- if (*ep != '\0')
- log_fatal("parse_args: invalid numeric arg "
- "to -r (%s)", optarg);
- regrand = 1;
-#else
- usage();
-#endif
break;
case 'R':
report_file = optarg;
diff --git a/sbin/isakmpd/util.c b/sbin/isakmpd/util.c
index 61bc82e03db..3d74255b559 100644
--- a/sbin/isakmpd/util.c
+++ b/sbin/isakmpd/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.65 2009/06/25 15:40:55 claudio Exp $ */
+/* $OpenBSD: util.c,v 1.66 2013/04/24 13:46:09 deraadt Exp $ */
/* $EOM: util.c,v 1.23 2000/11/23 12:22:08 niklas Exp $ */
/*
@@ -58,14 +58,6 @@
*/
int allow_name_lookups = 0;
-#if defined(INSECURE_RAND)
-/*
- * This is set to true in case of regression-test mode, when it will
- * cause predictable random numbers be generated.
- */
-int regrand = 0;
-#endif
-
/*
* XXX These might be turned into inlines or macros, maybe even
* machine-dependent ones, for performance reasons.
@@ -109,20 +101,12 @@ zero_test(const u_int8_t *p, size_t sz)
}
/*
- * Generate 32 bits of random data. If compiled with INSECURE_RAND
- * and -r option is specified, then return deterministic data.
+ * Generate 32 bits of random data.
*/
u_int32_t
rand_32(void)
{
-#if !defined(INSECURE_RAND)
return arc4random();
-#else
- if (regrand)
- return random();
- else
- return arc4random();
-#endif
}
/*