Skip to content

Commit 7490d44

Browse files
committed
Fix build with LibreSSL 2.7
LibreSSL 2.7 adds OpenSSL 1.1 API Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
1 parent dc27772 commit 7490d44

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/streams/openssl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ int git_openssl_stream_global_init(void)
104104
ssl_opts |= SSL_OP_NO_COMPRESSION;
105105
#endif
106106

107-
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
107+
#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
108+
(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
108109
SSL_load_error_strings();
109110
OpenSSL_add_ssl_algorithms();
110111
#else

src/streams/openssl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ extern int git_openssl__set_cert_location(const char *file, const char *path);
3131

3232

3333

34-
# if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
34+
# if OPENSSL_VERSION_NUMBER < 0x10100000L || \
35+
(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
3536

3637
GIT_INLINE(BIO_METHOD*) BIO_meth_new(int type, const char *name)
3738
{

0 commit comments

Comments
 (0)