diff options
author | orbea <orbea@riseup.net> | 2023-03-27 14:58:49 -0700 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2023-04-24 08:56:46 +0100 |
commit | 18e868e4449cd46d494944ced798f9dcd01f65c5 (patch) | |
tree | 9a2a65899ce956a1d747360e9f5abac41c209cd3 | |
parent | 258301b2fb85398ed478386faf220228457ec3b5 (diff) | |
download | neon-git-18e868e4449cd46d494944ced798f9dcd01f65c5.tar.gz |
ne_openssl: Fix the build with libressl
* Libressl 3.7 currently doesn't provide EVP_sha512_256().
* Libressl 3.4 added SSL_CTX_set_post_handshake_auth().
-rw-r--r-- | src/ne_openssl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ne_openssl.c b/src/ne_openssl.c index d13c25a..a9b1134 100644 --- a/src/ne_openssl.c +++ b/src/ne_openssl.c @@ -581,7 +581,7 @@ ne_ssl_context *ne_ssl_context_create(int mode) /* enable workarounds for buggy SSL server implementations */ SSL_CTX_set_options(ctx->ctx, SSL_OP_ALL); SSL_CTX_set_verify(ctx->ctx, SSL_VERIFY_PEER, verify_callback); -#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10101000L +#if LIBRESSL_VERSION_NUMBER >= 0x3040000fL || (!defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10101000L) SSL_CTX_set_post_handshake_auth(ctx->ctx, 1); #endif } else if (mode == NE_SSL_CTX_SERVER) { @@ -1122,8 +1122,10 @@ static const EVP_MD *hash_to_md(unsigned int flags) case NE_HASH_SHA256: return EVP_sha256(); #ifdef HAVE_OPENSSL11 case NE_HASH_SHA512: return EVP_sha512(); +#ifndef LIBRESSL_VERSION_NUMBER case NE_HASH_SHA512_256: return EVP_sha512_256(); #endif +#endif default: break; } return NULL; |