@@ -40,6 +40,7 @@ static int curl_ssl_verify = -1;
40
40
static int curl_ssl_try ;
41
41
static const char * curl_http_version = NULL ;
42
42
static const char * ssl_cert ;
43
+ static const char * ssl_cert_type ;
43
44
static const char * ssl_cipherlist ;
44
45
static const char * ssl_version ;
45
46
static struct {
@@ -59,6 +60,7 @@ static struct {
59
60
#endif
60
61
};
61
62
static const char * ssl_key ;
63
+ static const char * ssl_key_type ;
62
64
static const char * ssl_capath ;
63
65
static const char * curl_no_proxy ;
64
66
#ifdef GIT_CURL_HAVE_CURLOPT_PINNEDPUBLICKEY
@@ -374,8 +376,12 @@ static int http_options(const char *var, const char *value, void *cb)
374
376
return git_config_string (& ssl_version , var , value );
375
377
if (!strcmp ("http.sslcert" , var ))
376
378
return git_config_pathname (& ssl_cert , var , value );
379
+ if (!strcmp ("http.sslcerttype" , var ))
380
+ return git_config_string (& ssl_cert_type , var , value );
377
381
if (!strcmp ("http.sslkey" , var ))
378
382
return git_config_pathname (& ssl_key , var , value );
383
+ if (!strcmp ("http.sslkeytype" , var ))
384
+ return git_config_string (& ssl_key_type , var , value );
379
385
if (!strcmp ("http.sslcapath" , var ))
380
386
return git_config_pathname (& ssl_capath , var , value );
381
387
if (!strcmp ("http.sslcainfo" , var ))
@@ -1014,10 +1020,14 @@ static CURL *get_curl_handle(void)
1014
1020
1015
1021
if (ssl_cert )
1016
1022
curl_easy_setopt (result , CURLOPT_SSLCERT , ssl_cert );
1023
+ if (ssl_cert_type )
1024
+ curl_easy_setopt (result , CURLOPT_SSLCERTTYPE , ssl_cert_type );
1017
1025
if (has_cert_password ())
1018
1026
curl_easy_setopt (result , CURLOPT_KEYPASSWD , cert_auth .password );
1019
1027
if (ssl_key )
1020
1028
curl_easy_setopt (result , CURLOPT_SSLKEY , ssl_key );
1029
+ if (ssl_key_type )
1030
+ curl_easy_setopt (result , CURLOPT_SSLKEYTYPE , ssl_key_type );
1021
1031
if (ssl_capath )
1022
1032
curl_easy_setopt (result , CURLOPT_CAPATH , ssl_capath );
1023
1033
#ifdef GIT_CURL_HAVE_CURLOPT_PINNEDPUBLICKEY
@@ -1252,7 +1262,9 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
1252
1262
curl_ssl_verify = 0 ;
1253
1263
1254
1264
set_from_env (& ssl_cert , "GIT_SSL_CERT" );
1265
+ set_from_env (& ssl_cert_type , "GIT_SSL_CERT_TYPE" );
1255
1266
set_from_env (& ssl_key , "GIT_SSL_KEY" );
1267
+ set_from_env (& ssl_key_type , "GIT_SSL_KEY_TYPE" );
1256
1268
set_from_env (& ssl_capath , "GIT_SSL_CAPATH" );
1257
1269
set_from_env (& ssl_cainfo , "GIT_SSL_CAINFO" );
1258
1270
0 commit comments