Skip to content

Commit f28744a

Browse files
Keruspepks-t
authored andcommitted
openssl_stream: fix building with libressl
OpenSSL v1.1 has introduced a new way of initializing the library without having to call various functions of different subsystems. In libgit2, we have been adapting to that change with 8852015 (openssl_stream: use new initialization function on OpenSSL version >=1.1, 2017-04-07), where we added an #ifdef depending on the OpenSSL version. This change broke building with libressl, though, which has not changed its API in the same way. Fix the issue by expanding the #ifdef condition to use the old way of initializing with libressl. Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
1 parent dd0aa81 commit f28744a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/openssl_stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ int git_openssl_stream_global_init(void)
103103
ssl_opts |= SSL_OP_NO_COMPRESSION;
104104
#endif
105105

106-
#if OPENSSL_VERSION_NUMBER < 0x10100000L
106+
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
107107
SSL_load_error_strings();
108108
OpenSSL_add_ssl_algorithms();
109109
#else

0 commit comments

Comments
 (0)