Skip to content

Commit

Permalink
Remove bad-random test stuff
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Sep 10, 2016
1 parent 47a4eb6 commit f8350cd
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions dtls.c
Expand Up @@ -36,35 +36,6 @@

static void detect_mtu(struct openconnect_info *vpninfo);

#if 0
/*
* Useful for catching test cases, where we want everything to be
* reproducible. *NEVER* do this in the wild.
*/
time_t time(time_t *t)
{
time_t x = 0x3ab2d948;
if (t)
*t = x;
return x;
}

int RAND_pseudo_bytes(char *buf, int len)
{
memset(buf, 0x5a, len);
printf("FAKE PSEUDO RANDOM!\n");
return 1;

}
int RAND_bytes(char *buf, int len)
{
static int foo = 0x5b;
printf("FAKE RANDOM!\n");
memset(buf, foo, len);
return 1;
}
#endif

/*
* The master-secret is generated randomly by the client. The server
* responds with a DTLS Session-ID. These, done over the HTTPS
Expand Down

0 comments on commit f8350cd

Please sign in to comment.