File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,13 @@ static void shutdown_ssl(void)
7373static void init_ssl (void )
7474{
7575#ifdef GIT_SSL
76+ long ssl_opts = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 ;
77+
78+ /* Older OpenSSL and MacOS OpenSSL doesn't have this */
79+ #ifdef SSL_OP_NO_COMPRESSION
80+ ssl_opts |= SSL_OP_NO_COMPRESSION ;
81+ #endif
82+
7683 SSL_load_error_strings ();
7784 OpenSSL_add_ssl_algorithms ();
7885 /*
@@ -82,13 +89,7 @@ static void init_ssl(void)
8289 * to speak TLSv1 to perform the encryption itself.
8390 */
8491 git__ssl_ctx = SSL_CTX_new (SSLv23_method ());
85- SSL_CTX_set_options (git__ssl_ctx ,
86- SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3
87- /* Older OpenSSL and MacOS OpenSSL doesn't have this */
88- # ifdef SSL_OP_NO_COMPRESSION
89- | SSL_OP_NO_COMPRESSION
90- # endif
91- );
92+ SSL_CTX_set_options (git__ssl_ctx , ssl_opts );
9293 SSL_CTX_set_mode (git__ssl_ctx , SSL_MODE_AUTO_RETRY );
9394 SSL_CTX_set_verify (git__ssl_ctx , SSL_VERIFY_NONE , NULL );
9495 if (!SSL_CTX_set_default_verify_paths (git__ssl_ctx )) {
You can’t perform that action at this time.
0 commit comments