Skip to content

Commit

Permalink
Libressl only offer pre 1.1 api even if it present version > 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
prefiks committed Dec 7, 2017
1 parent 8709146 commit a2b2154
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions c_src/fast_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ typedef unsigned __int32 uint32_t;
#define SSL_OP_NO_TICKET 0
#endif

#if OPENSSL_VERSION_NUMBER < 0x10100000L
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER
#define DH_set0_pqg(dh, dh_p, param, dh_g) (dh)->p = dh_p; (dh)->g = dh_g
#define our_alloc enif_alloc
#define our_realloc enif_realloc
Expand Down Expand Up @@ -347,7 +347,7 @@ static void unload(ErlNifEnv *env, void *priv) {

for (i = 0; i < CRYPTO_num_locks(); i++)
enif_mutex_destroy(mtx_buf[i]);
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined LIBRESSL_VERSION_NUMBER
OPENSSL_cleanup();
#endif
}
Expand Down

0 comments on commit a2b2154

Please sign in to comment.