projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Always use <openssl/include.h> instead of just <include.h>
[tinc]
/
src
/
protocol.c
diff --git
a/src/protocol.c
b/src/protocol.c
index
aab2266
..
ef60180
100644
(file)
--- a/
src/protocol.c
+++ b/
src/protocol.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: protocol.c,v 1.28.4.9
7 2001/07/01 21:42:13
guus Exp $
+ $Id: protocol.c,v 1.28.4.9
8 2001/07/04 08:41:36
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-40,25
+40,14
@@
#include <netinet/in.h>
#include <netinet/in.h>
-#ifdef HAVE_OPENSSL_SHA_H
-# include <openssl/sha.h>
-#else
-# include <sha.h>
-#endif
-
-#ifdef HAVE_OPENSSL_RAND_H
-# include <openssl/rand.h>
-#else
-# include <rand.h>
-#endif
+#include <openssl/sha.h>
+#include <openssl/rand.h>
+#include <openssl/evp.h>
-#ifdef HAVE_OPENSSL_EVP_H
-# include <openssl/evp.h>
-#else
-# include <evp.h>
+#ifndef HAVE_RAND_PSEUDO_BYTES
+#define RAND_pseudo_bytes RAND_bytes
#endif
#endif
-
#include "conf.h"
#include "net.h"
#include "netutl.h"
#include "conf.h"
#include "net.h"
#include "netutl.h"
@@
-1066,7
+1055,7
@@
int send_ping(connection_t *cl)
cp
cl->status.pinged = 1;
cl->last_ping_time = time(NULL);
cp
cl->status.pinged = 1;
cl->last_ping_time = time(NULL);
- RAND_bytes(salt, SALTLEN);
+ RAND_
pseudo_
bytes(salt, SALTLEN);
bin2hex(salt, salt, SALTLEN);
salt[SALTLEN*2] = '\0';
cp
bin2hex(salt, salt, SALTLEN);
salt[SALTLEN*2] = '\0';
cp
@@
-1083,7
+1072,7
@@
int send_pong(connection_t *cl)
{
char salt[SALTLEN*2+1];
cp
{
char salt[SALTLEN*2+1];
cp
- RAND_bytes(salt, SALTLEN);
+ RAND_
pseudo_
bytes(salt, SALTLEN);
bin2hex(salt, salt, SALTLEN);
salt[SALTLEN*2] = '\0';
cp
bin2hex(salt, salt, SALTLEN);
salt[SALTLEN*2] = '\0';
cp