Commit 0c50e02b authored by Bodo Möller's avatar Bodo Möller
Browse files

- Pseudo-seed the PRNG in programs used for "make test"

  because otherwise BN_rand will fail unless DEVRANDOM works,
  which causes the programs to dump core because they
  don't check the return value of BN_rand (and if they
  did, we still couldn't test anything).

- add comment to some files that appear not to be used at all.
parent a8eeb155
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/* crypto/bn/expspeed.c */
/* unused */

/* crypto/bn/bn_opts.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
+2 −0
Original line number Diff line number Diff line
/* unused */

/* crypto/bn/bnspeed.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
+6 −0
Original line number Diff line number Diff line
@@ -98,6 +98,8 @@ static int results=0;
static unsigned char lst1[]="\xC6\x4F\x43\x04\x2A\xEA\xCA\x6E\x58\x36\x80\x5B\xE8\xC9"
"\x9B\x04\x5D\x48\x36\xC2\xFD\x16\xC9\x64\xF0";

static const char rnd_seed[] = "string to make the random number generator think it has entropy";

int main(int argc, char *argv[])
	{
	BN_CTX *ctx;
@@ -106,6 +108,10 @@ int main(int argc, char *argv[])

	results = 0;

	RAND_seed(rnd_seed, sizeof rnd_seed); /* or BN_rand may fail, and we don't
	                                       * even check its return value
	                                       * (which we should) */

	argc--;
	argv++;
	while (argc >= 1)
+2 −0
Original line number Diff line number Diff line
/* unused */

#include <stdio.h>
#include <openssl/bio.h>
#include "bn_lcl.h"
+2 −0
Original line number Diff line number Diff line
/* unused */

#include <stdio.h>
#include <openssl/tmdiff.h>
#include "bn_lcl.h"
Loading