/*
protocol_auth.c -- handle the meta-protocol, authentication
Copyright (C) 1999-2005 Ivo Timmermans,
- 2000-2012 Guus Sliepen <guus@tinc-vpn.org>
+ 2000-2013 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
}
bool send_id(connection_t *c) {
- if(proxytype)
+ if(proxytype && c->outgoing)
if(!send_proxyrequest(c))
return false;
/* Copy random data to the buffer */
- RAND_pseudo_bytes((unsigned char *)c->outkey, len);
+ RAND_bytes((unsigned char *)c->outkey, len);
/* The message we send must be smaller than the modulus of the RSA key.
By definition, for a key of k bits, the following formula holds:
/* Copy random data to the buffer */
- RAND_pseudo_bytes((unsigned char *)c->hischallenge, len);
+ RAND_bytes((unsigned char *)c->hischallenge, len);
/* Convert to hex */