Skip to content

Commit

Permalink
tls: condition on libressl version for declaring BIO data functions
Browse files Browse the repository at this point in the history
- it is required only for LIBRESSL_VERSION_NUMBER < 0x20700000L
- fixes compilation on Alpine linux
- part of GH #1511
  • Loading branch information
miconda committed Apr 25, 2018
1 parent 38b8fbd commit cffd8bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/tls/tls_bio.c
Expand Up @@ -85,6 +85,8 @@ static void *CRYPTO_zalloc(size_t num, const char *file, int line)
return ret;
}
# define OPENSSL_zalloc(num) CRYPTO_zalloc(num, __FILE__, __LINE__)

#if LIBRESSL_VERSION_NUMBER < 0x20700000L
static void *BIO_get_data(BIO *b)
{
return b->ptr;
Expand All @@ -97,6 +99,8 @@ static void BIO_set_init(BIO *b, int init)
{
b->init = init;
}
#endif

#else
static BIO_METHOD *tls_mbuf_method = NULL;
#endif
Expand Down

0 comments on commit cffd8bd

Please sign in to comment.