File tree 1 file changed +8
-7
lines changed 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)
73
73
static void init_ssl (void )
74
74
{
75
75
#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
+
76
83
SSL_load_error_strings ();
77
84
OpenSSL_add_ssl_algorithms ();
78
85
/*
@@ -82,13 +89,7 @@ static void init_ssl(void)
82
89
* to speak TLSv1 to perform the encryption itself.
83
90
*/
84
91
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 );
92
93
SSL_CTX_set_mode (git__ssl_ctx , SSL_MODE_AUTO_RETRY );
93
94
SSL_CTX_set_verify (git__ssl_ctx , SSL_VERIFY_NONE , NULL );
94
95
if (!SSL_CTX_set_default_verify_paths (git__ssl_ctx )) {
You can’t perform that action at this time.
0 commit comments