pgpool2.git / summary / log / commit / refs

commit    3d75e422681ef41bc6140538bbd508c178a23690
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Sat Feb 10 11:13:16 2018 +0000

    Allow to build with libressl.
    
    Per [pgpool-hackers: 2714].
    Patch by Sandino Araico Sanchez.


src/main/main.c | 2 +- src/utils/pool_ssl.c | 2 +- src/watchdog/wd_utils.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/main.c b/src/main/main.c index 2b13cd750..7563fa4f3 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -186,7 +186,7 @@ int main(int argc, char **argv) } #ifdef USE_SSL /* global ssl init */ -#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined (LIBRESSL_VERSION_NUMBER)) OPENSSL_init_ssl(0, NULL); #else SSL_library_init(); diff --git a/src/utils/pool_ssl.c b/src/utils/pool_ssl.c index 1f6e95742..1b2de402e 100644 --- a/src/utils/pool_ssl.c +++ b/src/utils/pool_ssl.c @@ -253,7 +253,7 @@ static int init_ssl_ctx(POOL_CONNECTION *cp, enum ssl_conn_type conntype) { char *cacert = NULL, *cacert_dir = NULL; /* initialize SSL members */ -#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined (LIBRESSL_VERSION_NUMBER)) cp->ssl_ctx = SSL_CTX_new(TLS_method()); #else cp->ssl_ctx = SSL_CTX_new(SSLv23_method()); diff --git a/src/watchdog/wd_utils.c b/src/watchdog/wd_utils.c index f0c63ee34..b16b6974f 100644 --- a/src/watchdog/wd_utils.c +++ b/src/watchdog/wd_utils.c @@ -154,7 +154,7 @@ static void calculate_hmac_sha256(const char *data, int len, char *buf) unsigned int res_len = WD_AUTH_HASH_LEN; HMAC_CTX *ctx = NULL; -#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined (LIBRESSL_VERSION_NUMBER)) ctx = HMAC_CTX_new(); HMAC_CTX_reset(ctx); #else @@ -165,7 +165,7 @@ static void calculate_hmac_sha256(const char *data, int len, char *buf) HMAC_Init_ex(ctx, key, strlen(key), EVP_sha256(), NULL); HMAC_Update(ctx, (unsigned char*)data, len); HMAC_Final(ctx, (unsigned char*)str, &res_len); -#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined (LIBRESSL_VERSION_NUMBER)) HMAC_CTX_reset(ctx); HMAC_CTX_free(ctx); #else [parent: d318aa5f5d7e]