diff options
author | Linus Nordberg <linus@nordberg.se> | 2013-12-18 20:37:44 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2013-12-20 19:00:12 +0100 |
commit | 11570f6201548b957b70e8b93e954538f01d09c7 (patch) | |
tree | c2ee2c80df6862842292f11878ab184b3464b9d4 /lib/tls.h | |
parent | da72e14ca91c1bdbee8bec0fcdd28054517cd200 (diff) |
Improve initialisation of OpenSSL PRNG.
Basic idea taken from Tor.
Diffstat (limited to 'lib/tls.h')
-rw-r--r-- | lib/tls.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -5,9 +5,19 @@ extern "C" { #endif -int rs_tls_init (struct rs_connection *conn); +int tls_init (void); +int tls_init_conn (struct rs_connection *conn); int tls_verify_cert (struct rs_connection *conn); +#define OPENSSL_VER(a,b,c,d,e) \ + (((a)<<28) | \ + ((b)<<20) | \ + ((c)<<12) | \ + ((d)<< 4) | \ + (e)) +#define OPENSSL_V(a,b,c,d) \ + OPENSSL_VER((a),(b),(c),(d)-'a'+1,0xf) + #if defined (__cplusplus) } #endif |