File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,18 @@ SSL_CTX *git__ssl_ctx;
4747 * OpenSSL 1.1 made BIO opaque so we have to use functions to interact with it
4848 * which do not exist in previous versions. We define these inline functions so
4949 * we can program against the interface instead of littering the implementation
50- * with ifdefs.
50+ * with ifdefs. We do the same for OPENSSL_init_ssl.
5151 */
5252#if defined(OPENSSL_LEGACY_API )
53+ static int OPENSSL_init_ssl (int opts , void * settings )
54+ {
55+ GIT_UNUSED (opts );
56+ GIT_UNUSED (settings );
57+ SSL_load_error_strings ();
58+ OpenSSL_add_ssl_algorithms ();
59+ return 0 ;
60+ }
61+
5362static BIO_METHOD * BIO_meth_new (int type , const char * name )
5463{
5564 BIO_METHOD * meth = git__calloc (1 , sizeof (BIO_METHOD ));
@@ -202,12 +211,7 @@ int git_openssl_stream_global_init(void)
202211 ssl_opts |= SSL_OP_NO_COMPRESSION ;
203212#endif
204213
205- #if defined(OPENSSL_LEGACY_API )
206- SSL_load_error_strings ();
207- OpenSSL_add_ssl_algorithms ();
208- #else
209214 OPENSSL_init_ssl (0 , NULL );
210- #endif
211215
212216 /*
213217 * Load SSLv{2,3} and TLSv1 so that we can talk with servers
You can’t perform that action at this time.
0 commit comments