{"thread":{"id":"59625","subject":"[PATCH] http: document sslcert and sslkey types and extend to proxy","startedAt":"2023-04-20T17:52:03Z","lastAt":"2023-04-21T03:36:08Z","messageCount":8,"participants":["Ricky Davidson via GitGitGadget","Junio C Hamano","Davidson, Ricky (HII-Mission Technologies)","Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"475750","messageId":"pull.1520.git.1682013104508.gitgitgadget@gmail.com","threadId":"59625","inReplyTo":null,"subject":"[PATCH] http: document sslcert and sslkey types and extend to proxy","fromName":"Ricky Davidson via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-04-20T17:51:44Z","receivedAt":"2023-04-20T17:52:03Z","isPatch":true,"sender":{"key":"name:Ricky Davidson","avatar":null},"body":"From: Ricky Davidson <Ricky.Davidson@hii-tsd.com>\n\n0a01d41 added http.sslCertType and http.sslKeyType, but:\n\n1. does not document the feature.\n2. does not apply to SSL proxy equivalents.\n\nDocuments http.sslCertType and http.sslKeyType. Implements\nhttp.proxySSLCertType. Same for http.sslKeyType and\nhttp.proxySSLKeyType equivalents and related environment\nvariables.\n\nSigned-off-by: Ricky Davidson <Ricky.Davidson@hii-tsd.com>\n---\n    [PATCH] http: document sslcert and sslkey types and extend to proxy\n    \n    0a01d41ee4ca7f8afb75219f46f4f1c573465075 wonderfully added\n    http.sslCertType and http.sslKeyType, but has a couple problems:\n    \n     1. does not document the feature.\n     2. does not apply to SSL proxy equivalents.\n    \n    Documents http.sslCertType and http.sslKeyType. Implements\n    http.proxySSLCertType. Same for http.sslKeyType and http.proxySSLKeyType\n    equivalents and related environment variables.\n    \n    Signed-off-by: Ricky Davidson Ricky.Davidson@hii-tsd.com\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1520%2FRicky-Davidson-hii-tsd%2Fmaster-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1520/Ricky-Davidson-hii-tsd/master-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1520\n\n Documentation/config/http.txt | 24 ++++++++++++++++++++++++\n http.c                        | 12 ++++++++++++\n 2 files changed, 36 insertions(+)\n\ndiff --git a/Documentation/config/http.txt b/Documentation/config/http.txt\nindex afeeccfbfa7..10a53930e5f 100644\n--- a/Documentation/config/http.txt\n+++ b/Documentation/config/http.txt\n@@ -34,11 +34,23 @@ http.proxySSLCert::\n \twith an HTTPS proxy. Can be overridden by the `GIT_PROXY_SSL_CERT` environment\n \tvariable.\n \n+http.proxySSLCertType::\n+\tFormat of the client certificate used to authenticate with an HTTPS proxy.\n+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_CERT_TYPE` environment\n+\tvariable.\n+\n http.proxySSLKey::\n \tThe pathname of a file that stores a private key to use to authenticate with\n \tan HTTPS proxy. Can be overridden by the `GIT_PROXY_SSL_KEY` environment\n \tvariable.\n \n+http.proxySSLKeyType::\n+\tFormat of the client private key used to authenticate with an HTTPS proxy.\n+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_CERT_TYPE` environment\n+\tvariable.\n+\n http.proxySSLCertPasswordProtected::\n \tEnable Git's password prompt for the proxy SSL certificate.  Otherwise OpenSSL\n \twill prompt the user, possibly many times, if the certificate or private key\n@@ -161,11 +173,23 @@ http.sslCert::\n \tover HTTPS. Can be overridden by the `GIT_SSL_CERT` environment\n \tvariable.\n \n+http.sslCertType::\n+\tFormat of the SSL certificate used to authenticate over HTTPS.\n+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_CERT_TYPE` environment\n+\tvariable.\n+\n http.sslKey::\n \tFile containing the SSL private key when fetching or pushing\n \tover HTTPS. Can be overridden by the `GIT_SSL_KEY` environment\n \tvariable.\n \n+http.sslKeyType::\n+\tFormat of the SSL private key used to authenticate over HTTPS.\n+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_CERT_TYPE` environment\n+\tvariable.\n+\n http.sslCertPasswordProtected::\n \tEnable Git's password prompt for the SSL certificate.  Otherwise\n \tOpenSSL will prompt the user, possibly many times, if the\ndiff --git a/http.c b/http.c\nindex d5d82c5230f..bee4ea64115 100644\n--- a/http.c\n+++ b/http.c\n@@ -74,7 +74,9 @@ static const char *curl_http_proxy;\n static const char *http_proxy_authmethod;\n \n static const char *http_proxy_ssl_cert;\n+static const char *http_proxy_ssl_cert_type;\n static const char *http_proxy_ssl_key;\n+static const char *http_proxy_ssl_key_type;\n static const char *http_proxy_ssl_ca_info;\n static struct credential proxy_cert_auth = CREDENTIAL_INIT;\n static int proxy_ssl_cert_password_required;\n@@ -441,9 +443,13 @@ static int http_options(const char *var, const char *value, void *cb)\n \n \tif (!strcmp(\"http.proxysslcert\", var))\n \t\treturn git_config_string(&http_proxy_ssl_cert, var, value);\n+\tif (!strcmp(\"http.proxysslcerttype\", var))\n+\t\treturn git_config_string(&http_proxy_ssl_cert_type, var, value);\n \n \tif (!strcmp(\"http.proxysslkey\", var))\n \t\treturn git_config_string(&http_proxy_ssl_key, var, value);\n+\tif (!strcmp(\"http.proxysslkeytype\", var))\n+\t\treturn git_config_string(&http_proxy_ssl_key_type, var, value);\n \n \tif (!strcmp(\"http.proxysslcainfo\", var))\n \t\treturn git_config_string(&http_proxy_ssl_ca_info, var, value);\n@@ -1146,9 +1152,13 @@ static CURL *get_curl_handle(void)\n \n \t\t\tif (http_proxy_ssl_cert)\n \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLCERT, http_proxy_ssl_cert);\n+\t\t\tif (http_proxy_ssl_cert_type)\n+\t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLCERTTYPE, http_proxy_ssl_cert_type);\n \n \t\t\tif (http_proxy_ssl_key)\n \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLKEY, http_proxy_ssl_key);\n+\t\t\tif (http_proxy_ssl_key_type)\n+\t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLKEYTYPE, http_proxy_ssl_key_type);\n \n \t\t\tif (has_proxy_cert_password())\n \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_KEYPASSWD, proxy_cert_auth.password);\n@@ -1285,7 +1295,9 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)\n \t\tmax_requests = DEFAULT_MAX_REQUESTS;\n \n \tset_from_env(&http_proxy_ssl_cert, \"GIT_PROXY_SSL_CERT\");\n+\tset_from_env(&http_proxy_ssl_cert_type, \"GIT_PROXY_SSL_CERT_TYPE\");\n \tset_from_env(&http_proxy_ssl_key, \"GIT_PROXY_SSL_KEY\");\n+\tset_from_env(&http_proxy_ssl_key_type, \"GIT_PROXY_SSL_KEY_TYPE\");\n \tset_from_env(&http_proxy_ssl_ca_info, \"GIT_PROXY_SSL_CAINFO\");\n \n \tif (getenv(\"GIT_PROXY_SSL_CERT_PASSWORD_PROTECTED\"))\n\nbase-commit: 667fcf4e15379790f0b609d6a83d578e69f20301\n-- \ngitgitgadget\n"},{"id":"475751","messageId":"pull.1520.v2.git.1682014322604.gitgitgadget@gmail.com","threadId":"59625","inReplyTo":"pull.1520.git.1682013104508.gitgitgadget@gmail.com","subject":"[PATCH v2] http: document sslcert and sslkey types and extend to proxy","fromName":"Ricky Davidson via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-04-20T18:12:02Z","receivedAt":"2023-04-20T18:12:09Z","isPatch":true,"sender":{"key":"name:Ricky Davidson","avatar":null},"body":"From: Ricky Davidson <Ricky.Davidson@hii-tsd.com>\n\n0a01d41 added http.sslCertType and http.sslKeyType, but:\n\n1. does not document the feature.\n2. does not apply to SSL proxy equivalents.\n\nDocuments http.sslCertType and http.sslKeyType. Implements\nhttp.proxySSLCertType. Same for http.sslKeyType and\nhttp.proxySSLKeyType equivalents and related environment\nvariables.\n\nSigned-off-by: Ricky Davidson <Ricky.Davidson@hii-tsd.com>\n---\n    [PATCH] http: document sslcert and sslkey types and extend to proxy\n    \n    0a01d41ee4ca7f8afb75219f46f4f1c573465075 wonderfully added\n    http.sslCertType and http.sslKeyType, but has a couple problems:\n    \n     1. does not document the feature.\n     2. does not apply to SSL proxy equivalents.\n    \n    Documents http.sslCertType and http.sslKeyType. Implements\n    http.proxySSLCertType. Same for http.sslKeyType and http.proxySSLKeyType\n    equivalents and related environment variables.\n    \n    Signed-off-by: Ricky Davidson Ricky.Davidson@hii-tsd.com\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1520%2FRicky-Davidson-hii-tsd%2Fmaster-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1520/Ricky-Davidson-hii-tsd/master-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/1520\n\nRange-diff vs v1:\n\n 1:  711d90215d0 ! 1:  78b96f60ec8 http: document sslcert and sslkey types and extend to proxy\n     @@ Documentation/config/http.txt: http.proxySSLCert::\n      +http.proxySSLKeyType::\n      +\tFormat of the client private key used to authenticate with an HTTPS proxy.\n      +\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n     -+\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_CERT_TYPE` environment\n     ++\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_KEY_TYPE` environment\n      +\tvariable.\n      +\n       http.proxySSLCertPasswordProtected::\n     @@ Documentation/config/http.txt: http.sslCert::\n      +http.sslCertType::\n      +\tFormat of the SSL certificate used to authenticate over HTTPS.\n      +\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n     -+\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_CERT_TYPE` environment\n     ++\ta crypto engine. Can be overridden by the `GIT_SSL_CERT_TYPE` environment\n      +\tvariable.\n      +\n       http.sslKey::\n     @@ Documentation/config/http.txt: http.sslCert::\n      +http.sslKeyType::\n      +\tFormat of the SSL private key used to authenticate over HTTPS.\n      +\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n     -+\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_CERT_TYPE` environment\n     ++\ta crypto engine. Can be overridden by the `GIT_SSL_CERT_TYPE` environment\n      +\tvariable.\n      +\n       http.sslCertPasswordProtected::\n\n\n Documentation/config/http.txt | 24 ++++++++++++++++++++++++\n http.c                        | 12 ++++++++++++\n 2 files changed, 36 insertions(+)\n\ndiff --git a/Documentation/config/http.txt b/Documentation/config/http.txt\nindex afeeccfbfa7..53386b90185 100644\n--- a/Documentation/config/http.txt\n+++ b/Documentation/config/http.txt\n@@ -34,11 +34,23 @@ http.proxySSLCert::\n \twith an HTTPS proxy. Can be overridden by the `GIT_PROXY_SSL_CERT` environment\n \tvariable.\n \n+http.proxySSLCertType::\n+\tFormat of the client certificate used to authenticate with an HTTPS proxy.\n+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_CERT_TYPE` environment\n+\tvariable.\n+\n http.proxySSLKey::\n \tThe pathname of a file that stores a private key to use to authenticate with\n \tan HTTPS proxy. Can be overridden by the `GIT_PROXY_SSL_KEY` environment\n \tvariable.\n \n+http.proxySSLKeyType::\n+\tFormat of the client private key used to authenticate with an HTTPS proxy.\n+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_KEY_TYPE` environment\n+\tvariable.\n+\n http.proxySSLCertPasswordProtected::\n \tEnable Git's password prompt for the proxy SSL certificate.  Otherwise OpenSSL\n \twill prompt the user, possibly many times, if the certificate or private key\n@@ -161,11 +173,23 @@ http.sslCert::\n \tover HTTPS. Can be overridden by the `GIT_SSL_CERT` environment\n \tvariable.\n \n+http.sslCertType::\n+\tFormat of the SSL certificate used to authenticate over HTTPS.\n+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_SSL_CERT_TYPE` environment\n+\tvariable.\n+\n http.sslKey::\n \tFile containing the SSL private key when fetching or pushing\n \tover HTTPS. Can be overridden by the `GIT_SSL_KEY` environment\n \tvariable.\n \n+http.sslKeyType::\n+\tFormat of the SSL private key used to authenticate over HTTPS.\n+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_SSL_CERT_TYPE` environment\n+\tvariable.\n+\n http.sslCertPasswordProtected::\n \tEnable Git's password prompt for the SSL certificate.  Otherwise\n \tOpenSSL will prompt the user, possibly many times, if the\ndiff --git a/http.c b/http.c\nindex d5d82c5230f..bee4ea64115 100644\n--- a/http.c\n+++ b/http.c\n@@ -74,7 +74,9 @@ static const char *curl_http_proxy;\n static const char *http_proxy_authmethod;\n \n static const char *http_proxy_ssl_cert;\n+static const char *http_proxy_ssl_cert_type;\n static const char *http_proxy_ssl_key;\n+static const char *http_proxy_ssl_key_type;\n static const char *http_proxy_ssl_ca_info;\n static struct credential proxy_cert_auth = CREDENTIAL_INIT;\n static int proxy_ssl_cert_password_required;\n@@ -441,9 +443,13 @@ static int http_options(const char *var, const char *value, void *cb)\n \n \tif (!strcmp(\"http.proxysslcert\", var))\n \t\treturn git_config_string(&http_proxy_ssl_cert, var, value);\n+\tif (!strcmp(\"http.proxysslcerttype\", var))\n+\t\treturn git_config_string(&http_proxy_ssl_cert_type, var, value);\n \n \tif (!strcmp(\"http.proxysslkey\", var))\n \t\treturn git_config_string(&http_proxy_ssl_key, var, value);\n+\tif (!strcmp(\"http.proxysslkeytype\", var))\n+\t\treturn git_config_string(&http_proxy_ssl_key_type, var, value);\n \n \tif (!strcmp(\"http.proxysslcainfo\", var))\n \t\treturn git_config_string(&http_proxy_ssl_ca_info, var, value);\n@@ -1146,9 +1152,13 @@ static CURL *get_curl_handle(void)\n \n \t\t\tif (http_proxy_ssl_cert)\n \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLCERT, http_proxy_ssl_cert);\n+\t\t\tif (http_proxy_ssl_cert_type)\n+\t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLCERTTYPE, http_proxy_ssl_cert_type);\n \n \t\t\tif (http_proxy_ssl_key)\n \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLKEY, http_proxy_ssl_key);\n+\t\t\tif (http_proxy_ssl_key_type)\n+\t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLKEYTYPE, http_proxy_ssl_key_type);\n \n \t\t\tif (has_proxy_cert_password())\n \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_KEYPASSWD, proxy_cert_auth.password);\n@@ -1285,7 +1295,9 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)\n \t\tmax_requests = DEFAULT_MAX_REQUESTS;\n \n \tset_from_env(&http_proxy_ssl_cert, \"GIT_PROXY_SSL_CERT\");\n+\tset_from_env(&http_proxy_ssl_cert_type, \"GIT_PROXY_SSL_CERT_TYPE\");\n \tset_from_env(&http_proxy_ssl_key, \"GIT_PROXY_SSL_KEY\");\n+\tset_from_env(&http_proxy_ssl_key_type, \"GIT_PROXY_SSL_KEY_TYPE\");\n \tset_from_env(&http_proxy_ssl_ca_info, \"GIT_PROXY_SSL_CAINFO\");\n \n \tif (getenv(\"GIT_PROXY_SSL_CERT_PASSWORD_PROTECTED\"))\n\nbase-commit: 667fcf4e15379790f0b609d6a83d578e69f20301\n-- \ngitgitgadget\n"},{"id":"475757","messageId":"xmqq7cu6z6et.fsf@gitster.g","threadId":"59625","inReplyTo":"pull.1520.v2.git.1682014322604.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] http: document sslcert and sslkey types and extend to proxy","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-04-20T19:43:06Z","receivedAt":"2023-04-20T19:43:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Ricky Davidson via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Ricky Davidson <Ricky.Davidson@hii-tsd.com>\n\nI think it is the first time we see your patches around here.\nWelcome to Git developer community.\n\n> 0a01d41 added http.sslCertType and http.sslKeyType, but:\n>\n> 1. does not document the feature.\n> 2. does not apply to SSL proxy equivalents.\n\nThe above description would read better to have \"it\" to serve as the\nsubject for the two sentences that point out rooms for improvement\nof what the earlier commit did somewhere.  Perhaps between \"but\" and\nthe colon after it, e.g. \"X did Y, but it: (1) did not do W, and (2)\ndid not do Z.\"  Alternatively, \"X did Y, but: (1) it did not do\nW. (2) it did not do Z.\" would also work.\n\nThe way we refer to an existing commit is:\n\n\t0a01d41e (http: add support for different sslcert and sslkey\n\ttypes., 2023-03-20) added ...\n\nRunning \"git show --pretty=reference -s $commit\" would give you a\nproperly formatted reference.\n\n> Documents http.sslCertType and http.sslKeyType. Implements\n> http.proxySSLCertType. Same for http.sslKeyType and\n> http.proxySSLKeyType equivalents and related environment\n> variables.\n\nAfter explaining the status quo and talking about what we want to\nimprove, we write what we wanted the code to become with this patch\nin imperative mood, as if we are giving an order to \"become like\nso\", instead of third-person present tense.\n\nI.e. something like \"Document X and Y, and implement W and Z for\ncompleteness.  Do the same for A and B.\"\n\nOther than that, well-written in an understandable way.  Very nice.\n\n>  Documentation/config/http.txt | 24 ++++++++++++++++++++++++\n>  http.c                        | 12 ++++++++++++\n>  2 files changed, 36 insertions(+)\n\nI wonder if we can add some tests for the feature, though.\n\nThanks.\n"},{"id":"475760","messageId":"pull.1520.v3.git.1682021501245.gitgitgadget@gmail.com","threadId":"59625","inReplyTo":"pull.1520.v2.git.1682014322604.gitgitgadget@gmail.com","subject":"[PATCH v3] http: document sslcert and sslkey types and extend to proxy","fromName":"Ricky Davidson via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-04-20T20:11:40Z","receivedAt":"2023-04-20T20:11:49Z","isPatch":true,"sender":{"key":"name:Ricky Davidson","avatar":null},"body":"From: Ricky Davidson <Ricky.Davidson@hii-tsd.com>\n\n0a01d41ee4 (http: add support for different sslcert and sslkey\ntypes., 2023-03-20) added http.sslCertType and http.sslKeyType, but:\n\n1. it does not document the feature.\n2. it does not apply to SSL proxy equivalents.\n\nDocuments http.sslCertType and http.sslKeyType. Implements\nhttp.proxySSLCertType. Does the same for http.sslKeyType and\nhttp.proxySSLKeyType equivalents and related environment\nvariables.\n\nSigned-off-by: Ricky Davidson <Ricky.Davidson@hii-tsd.com>\n---\n    [PATCH] http: document sslcert and sslkey types and extend to proxy\n    \n    0a01d41ee4 (http: add support for different sslcert and sslkey types.,\n    2023-03-20) added http.sslCertType and http.sslKeyType, but:\n    \n     1. it does not document the feature.\n     2. it does not apply to SSL proxy equivalents.\n    \n    Documents http.sslCertType and http.sslKeyType. Implements\n    http.proxySSLCertType. Does the same for http.sslKeyType and\n    http.proxySSLKeyType equivalents and related environment variables.\n    \n    Signed-off-by: Ricky Davidson Ricky.Davidson@hii-tsd.com\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1520%2FRicky-Davidson-hii-tsd%2Fmaster-v3\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1520/Ricky-Davidson-hii-tsd/master-v3\nPull-Request: https://github.com/gitgitgadget/git/pull/1520\n\nRange-diff vs v2:\n\n 1:  78b96f60ec8 ! 1:  020c03104f4 http: document sslcert and sslkey types and extend to proxy\n     @@ Metadata\n       ## Commit message ##\n          http: document sslcert and sslkey types and extend to proxy\n      \n     -    0a01d41 added http.sslCertType and http.sslKeyType, but:\n     +    0a01d41ee4 (http: add support for different sslcert and sslkey\n     +    types., 2023-03-20) added http.sslCertType and http.sslKeyType, but:\n      \n     -    1. does not document the feature.\n     -    2. does not apply to SSL proxy equivalents.\n     +    1. it does not document the feature.\n     +    2. it does not apply to SSL proxy equivalents.\n      \n          Documents http.sslCertType and http.sslKeyType. Implements\n     -    http.proxySSLCertType. Same for http.sslKeyType and\n     +    http.proxySSLCertType. Does the same for http.sslKeyType and\n          http.proxySSLKeyType equivalents and related environment\n          variables.\n      \n\n\n Documentation/config/http.txt | 24 ++++++++++++++++++++++++\n http.c                        | 12 ++++++++++++\n 2 files changed, 36 insertions(+)\n\ndiff --git a/Documentation/config/http.txt b/Documentation/config/http.txt\nindex afeeccfbfa7..53386b90185 100644\n--- a/Documentation/config/http.txt\n+++ b/Documentation/config/http.txt\n@@ -34,11 +34,23 @@ http.proxySSLCert::\n \twith an HTTPS proxy. Can be overridden by the `GIT_PROXY_SSL_CERT` environment\n \tvariable.\n \n+http.proxySSLCertType::\n+\tFormat of the client certificate used to authenticate with an HTTPS proxy.\n+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_CERT_TYPE` environment\n+\tvariable.\n+\n http.proxySSLKey::\n \tThe pathname of a file that stores a private key to use to authenticate with\n \tan HTTPS proxy. Can be overridden by the `GIT_PROXY_SSL_KEY` environment\n \tvariable.\n \n+http.proxySSLKeyType::\n+\tFormat of the client private key used to authenticate with an HTTPS proxy.\n+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_KEY_TYPE` environment\n+\tvariable.\n+\n http.proxySSLCertPasswordProtected::\n \tEnable Git's password prompt for the proxy SSL certificate.  Otherwise OpenSSL\n \twill prompt the user, possibly many times, if the certificate or private key\n@@ -161,11 +173,23 @@ http.sslCert::\n \tover HTTPS. Can be overridden by the `GIT_SSL_CERT` environment\n \tvariable.\n \n+http.sslCertType::\n+\tFormat of the SSL certificate used to authenticate over HTTPS.\n+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_SSL_CERT_TYPE` environment\n+\tvariable.\n+\n http.sslKey::\n \tFile containing the SSL private key when fetching or pushing\n \tover HTTPS. Can be overridden by the `GIT_SSL_KEY` environment\n \tvariable.\n \n+http.sslKeyType::\n+\tFormat of the SSL private key used to authenticate over HTTPS.\n+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_SSL_CERT_TYPE` environment\n+\tvariable.\n+\n http.sslCertPasswordProtected::\n \tEnable Git's password prompt for the SSL certificate.  Otherwise\n \tOpenSSL will prompt the user, possibly many times, if the\ndiff --git a/http.c b/http.c\nindex d5d82c5230f..bee4ea64115 100644\n--- a/http.c\n+++ b/http.c\n@@ -74,7 +74,9 @@ static const char *curl_http_proxy;\n static const char *http_proxy_authmethod;\n \n static const char *http_proxy_ssl_cert;\n+static const char *http_proxy_ssl_cert_type;\n static const char *http_proxy_ssl_key;\n+static const char *http_proxy_ssl_key_type;\n static const char *http_proxy_ssl_ca_info;\n static struct credential proxy_cert_auth = CREDENTIAL_INIT;\n static int proxy_ssl_cert_password_required;\n@@ -441,9 +443,13 @@ static int http_options(const char *var, const char *value, void *cb)\n \n \tif (!strcmp(\"http.proxysslcert\", var))\n \t\treturn git_config_string(&http_proxy_ssl_cert, var, value);\n+\tif (!strcmp(\"http.proxysslcerttype\", var))\n+\t\treturn git_config_string(&http_proxy_ssl_cert_type, var, value);\n \n \tif (!strcmp(\"http.proxysslkey\", var))\n \t\treturn git_config_string(&http_proxy_ssl_key, var, value);\n+\tif (!strcmp(\"http.proxysslkeytype\", var))\n+\t\treturn git_config_string(&http_proxy_ssl_key_type, var, value);\n \n \tif (!strcmp(\"http.proxysslcainfo\", var))\n \t\treturn git_config_string(&http_proxy_ssl_ca_info, var, value);\n@@ -1146,9 +1152,13 @@ static CURL *get_curl_handle(void)\n \n \t\t\tif (http_proxy_ssl_cert)\n \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLCERT, http_proxy_ssl_cert);\n+\t\t\tif (http_proxy_ssl_cert_type)\n+\t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLCERTTYPE, http_proxy_ssl_cert_type);\n \n \t\t\tif (http_proxy_ssl_key)\n \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLKEY, http_proxy_ssl_key);\n+\t\t\tif (http_proxy_ssl_key_type)\n+\t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLKEYTYPE, http_proxy_ssl_key_type);\n \n \t\t\tif (has_proxy_cert_password())\n \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_KEYPASSWD, proxy_cert_auth.password);\n@@ -1285,7 +1295,9 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)\n \t\tmax_requests = DEFAULT_MAX_REQUESTS;\n \n \tset_from_env(&http_proxy_ssl_cert, \"GIT_PROXY_SSL_CERT\");\n+\tset_from_env(&http_proxy_ssl_cert_type, \"GIT_PROXY_SSL_CERT_TYPE\");\n \tset_from_env(&http_proxy_ssl_key, \"GIT_PROXY_SSL_KEY\");\n+\tset_from_env(&http_proxy_ssl_key_type, \"GIT_PROXY_SSL_KEY_TYPE\");\n \tset_from_env(&http_proxy_ssl_ca_info, \"GIT_PROXY_SSL_CAINFO\");\n \n \tif (getenv(\"GIT_PROXY_SSL_CERT_PASSWORD_PROTECTED\"))\n\nbase-commit: 667fcf4e15379790f0b609d6a83d578e69f20301\n-- \ngitgitgadget\n"},{"id":"475764","messageId":"BN0P110MB1178028CE56A467917E58634DB639@BN0P110MB1178.NAMP110.PROD.OUTLOOK.COM","threadId":"59625","inReplyTo":"pull.1520.v3.git.1682021501245.gitgitgadget@gmail.com","subject":"Re: EXT :[PATCH v3] http: document sslcert and sslkey types and extend to proxy","fromName":"Davidson, Ricky (HII-Mission Technologies)","fromEmail":"ricky.davidson@hii-tsd.com","sentAt":"2023-04-20T21:14:02Z","receivedAt":"2023-04-20T21:14:15Z","isPatch":true,"sender":{"key":"ricky.davidson@hii-tsd.com","avatar":null},"body":"> I think it is the first time we see your patches around here.\n> Welcome to Git developer community.\n\nFirst time, yes thank you. I am sorry about late replies: I have struggled\nwith all listed methods of replying not working.\n\n> I wonder if we can add some tests for the feature, though.\n\nI would love if there was a way to test it. But my historical\nunderstanding of this issue is that it has been repeatedly not merged\nin due to lack of anyone knowing how to test it, given the nature of\na hardware token (what this is especially focused at explicitly\nenabling) generally being hardware. Technically, I am sure pkcs11 can\napply to software tokens, but I have never ventured the topic. I'm\nalso aware KVM+Qemu+Libvirt allows creating virtual smart cards, but\nI also have not ventured that topic. I have been following this issue\nsince May of last year in private support tickets, and I do not feel\nI am able to contribute anything that has not already been pondered\nover this issue. I strongly welcome ideas, though.\n\n0a01d41e (http: add support for different sslcert and sslkey types.,\n2023-03-20) does solve our main issues (which is absolutely\nwonderful), and this is only to finish it up with documentation, and\nproxySSLCertType does not personally affect me, so I am not bothered\nwith the wait associated with consulting on proper testing.\nAlthough, it would be a shame to see this fail to get pushed in again.\n\nThanks,\nRicky Davidson"},{"id":"475774","messageId":"1c365381-4858-1534-18ba-aa6f5c5056c2@ramsayjones.plus.com","threadId":"59625","inReplyTo":"pull.1520.v3.git.1682021501245.gitgitgadget@gmail.com","subject":"Re: [PATCH v3] http: document sslcert and sslkey types and extend to proxy","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2023-04-21T00:47:05Z","receivedAt":"2023-04-21T00:50:15Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 20/04/2023 21:11, Ricky Davidson via GitGitGadget wrote:\n> From: Ricky Davidson <Ricky.Davidson@hii-tsd.com>\n> \n> 0a01d41ee4 (http: add support for different sslcert and sslkey\n> types., 2023-03-20) added http.sslCertType and http.sslKeyType, but:\n> \n> 1. it does not document the feature.\n> 2. it does not apply to SSL proxy equivalents.\n> \n> Documents http.sslCertType and http.sslKeyType. Implements\n> http.proxySSLCertType. Does the same for http.sslKeyType and\n> http.proxySSLKeyType equivalents and related environment\n> variables.\n> \n> Signed-off-by: Ricky Davidson <Ricky.Davidson@hii-tsd.com>\n> ---\n>     [PATCH] http: document sslcert and sslkey types and extend to proxy\n>     \n>     0a01d41ee4 (http: add support for different sslcert and sslkey types.,\n>     2023-03-20) added http.sslCertType and http.sslKeyType, but:\n>     \n>      1. it does not document the feature.\n>      2. it does not apply to SSL proxy equivalents.\n>     \n>     Documents http.sslCertType and http.sslKeyType. Implements\n>     http.proxySSLCertType. Does the same for http.sslKeyType and\n>     http.proxySSLKeyType equivalents and related environment variables.\n>     \n>     Signed-off-by: Ricky Davidson Ricky.Davidson@hii-tsd.com\n> \n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1520%2FRicky-Davidson-hii-tsd%2Fmaster-v3\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1520/Ricky-Davidson-hii-tsd/master-v3\n> Pull-Request: https://github.com/gitgitgadget/git/pull/1520\n> \n> Range-diff vs v2:\n> \n>  1:  78b96f60ec8 ! 1:  020c03104f4 http: document sslcert and sslkey types and extend to proxy\n>      @@ Metadata\n>        ## Commit message ##\n>           http: document sslcert and sslkey types and extend to proxy\n>       \n>      -    0a01d41 added http.sslCertType and http.sslKeyType, but:\n>      +    0a01d41ee4 (http: add support for different sslcert and sslkey\n>      +    types., 2023-03-20) added http.sslCertType and http.sslKeyType, but:\n>       \n>      -    1. does not document the feature.\n>      -    2. does not apply to SSL proxy equivalents.\n>      +    1. it does not document the feature.\n>      +    2. it does not apply to SSL proxy equivalents.\n>       \n>           Documents http.sslCertType and http.sslKeyType. Implements\n>      -    http.proxySSLCertType. Same for http.sslKeyType and\n>      +    http.proxySSLCertType. Does the same for http.sslKeyType and\n>           http.proxySSLKeyType equivalents and related environment\n>           variables.\n>       \n> \n> \n>  Documentation/config/http.txt | 24 ++++++++++++++++++++++++\n>  http.c                        | 12 ++++++++++++\n>  2 files changed, 36 insertions(+)\n> \n> diff --git a/Documentation/config/http.txt b/Documentation/config/http.txt\n> index afeeccfbfa7..53386b90185 100644\n> --- a/Documentation/config/http.txt\n> +++ b/Documentation/config/http.txt\n> @@ -34,11 +34,23 @@ http.proxySSLCert::\n>  \twith an HTTPS proxy. Can be overridden by the `GIT_PROXY_SSL_CERT` environment\n>  \tvariable.\n>  \n> +http.proxySSLCertType::\n> +\tFormat of the client certificate used to authenticate with an HTTPS proxy.\n> +\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n> +\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_CERT_TYPE` environment\n> +\tvariable.\n> +\n>  http.proxySSLKey::\n>  \tThe pathname of a file that stores a private key to use to authenticate with\n>  \tan HTTPS proxy. Can be overridden by the `GIT_PROXY_SSL_KEY` environment\n>  \tvariable.\n>  \n> +http.proxySSLKeyType::\n> +\tFormat of the client private key used to authenticate with an HTTPS proxy.\n> +\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n> +\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_KEY_TYPE` environment\n> +\tvariable.\n> +\n>  http.proxySSLCertPasswordProtected::\n>  \tEnable Git's password prompt for the proxy SSL certificate.  Otherwise OpenSSL\n>  \twill prompt the user, possibly many times, if the certificate or private key\n> @@ -161,11 +173,23 @@ http.sslCert::\n>  \tover HTTPS. Can be overridden by the `GIT_SSL_CERT` environment\n>  \tvariable.\n>  \n> +http.sslCertType::\n> +\tFormat of the SSL certificate used to authenticate over HTTPS.\n> +\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n> +\ta crypto engine. Can be overridden by the `GIT_SSL_CERT_TYPE` environment\n> +\tvariable.\n> +\n>  http.sslKey::\n>  \tFile containing the SSL private key when fetching or pushing\n>  \tover HTTPS. Can be overridden by the `GIT_SSL_KEY` environment\n>  \tvariable.\n>  \n> +http.sslKeyType::\n> +\tFormat of the SSL private key used to authenticate over HTTPS.\n> +\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n> +\ta crypto engine. Can be overridden by the `GIT_SSL_CERT_TYPE` environment\n\ns/GIT_SSL_CERT_TYPE/GIT_SSL_KEY_TYPE/ ?\n\nATB,\nRamsay Jones\n\n> +\tvariable.\n> +\n>  http.sslCertPasswordProtected::\n>  \tEnable Git's password prompt for the SSL certificate.  Otherwise\n>  \tOpenSSL will prompt the user, possibly many times, if the\n> diff --git a/http.c b/http.c\n> index d5d82c5230f..bee4ea64115 100644\n> --- a/http.c\n> +++ b/http.c\n> @@ -74,7 +74,9 @@ static const char *curl_http_proxy;\n>  static const char *http_proxy_authmethod;\n>  \n>  static const char *http_proxy_ssl_cert;\n> +static const char *http_proxy_ssl_cert_type;\n>  static const char *http_proxy_ssl_key;\n> +static const char *http_proxy_ssl_key_type;\n>  static const char *http_proxy_ssl_ca_info;\n>  static struct credential proxy_cert_auth = CREDENTIAL_INIT;\n>  static int proxy_ssl_cert_password_required;\n> @@ -441,9 +443,13 @@ static int http_options(const char *var, const char *value, void *cb)\n>  \n>  \tif (!strcmp(\"http.proxysslcert\", var))\n>  \t\treturn git_config_string(&http_proxy_ssl_cert, var, value);\n> +\tif (!strcmp(\"http.proxysslcerttype\", var))\n> +\t\treturn git_config_string(&http_proxy_ssl_cert_type, var, value);\n>  \n>  \tif (!strcmp(\"http.proxysslkey\", var))\n>  \t\treturn git_config_string(&http_proxy_ssl_key, var, value);\n> +\tif (!strcmp(\"http.proxysslkeytype\", var))\n> +\t\treturn git_config_string(&http_proxy_ssl_key_type, var, value);\n>  \n>  \tif (!strcmp(\"http.proxysslcainfo\", var))\n>  \t\treturn git_config_string(&http_proxy_ssl_ca_info, var, value);\n> @@ -1146,9 +1152,13 @@ static CURL *get_curl_handle(void)\n>  \n>  \t\t\tif (http_proxy_ssl_cert)\n>  \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLCERT, http_proxy_ssl_cert);\n> +\t\t\tif (http_proxy_ssl_cert_type)\n> +\t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLCERTTYPE, http_proxy_ssl_cert_type);\n>  \n>  \t\t\tif (http_proxy_ssl_key)\n>  \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLKEY, http_proxy_ssl_key);\n> +\t\t\tif (http_proxy_ssl_key_type)\n> +\t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLKEYTYPE, http_proxy_ssl_key_type);\n>  \n>  \t\t\tif (has_proxy_cert_password())\n>  \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_KEYPASSWD, proxy_cert_auth.password);\n> @@ -1285,7 +1295,9 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)\n>  \t\tmax_requests = DEFAULT_MAX_REQUESTS;\n>  \n>  \tset_from_env(&http_proxy_ssl_cert, \"GIT_PROXY_SSL_CERT\");\n> +\tset_from_env(&http_proxy_ssl_cert_type, \"GIT_PROXY_SSL_CERT_TYPE\");\n>  \tset_from_env(&http_proxy_ssl_key, \"GIT_PROXY_SSL_KEY\");\n> +\tset_from_env(&http_proxy_ssl_key_type, \"GIT_PROXY_SSL_KEY_TYPE\");\n>  \tset_from_env(&http_proxy_ssl_ca_info, \"GIT_PROXY_SSL_CAINFO\");\n>  \n>  \tif (getenv(\"GIT_PROXY_SSL_CERT_PASSWORD_PROTECTED\"))\n> \n> base-commit: 667fcf4e15379790f0b609d6a83d578e69f20301\n"},{"id":"475779","messageId":"BN0P110MB117884C8D51DD55E4B445ADCDB609@BN0P110MB1178.NAMP110.PROD.OUTLOOK.COM","threadId":"59625","inReplyTo":"1c365381-4858-1534-18ba-aa6f5c5056c2@ramsayjones.plus.com","subject":"Re: EXT :Re: [PATCH v3] http: document sslcert and sslkey types and extend to proxy","fromName":"Davidson, Ricky (HII-Mission Technologies)","fromEmail":"ricky.davidson@hii-tsd.com","sentAt":"2023-04-21T03:18:43Z","receivedAt":"2023-04-21T03:18:59Z","isPatch":true,"sender":{"key":"ricky.davidson@hii-tsd.com","avatar":null},"body":"\n> s/GIT_SSL_CERT_TYPE/GIT_SSL_KEY_TYPE/ ?\n\nAh, yes, thank you. Another patch will be inbound. Also, I am a little concerned about the language in \"Supported formats are `PEM` and `ENG`.\", so I will change that too.\n"},{"id":"475780","messageId":"pull.1520.v4.git.1682048159508.gitgitgadget@gmail.com","threadId":"59625","inReplyTo":"pull.1520.v3.git.1682021501245.gitgitgadget@gmail.com","subject":"[PATCH v4] http: document sslcert and sslkey types and extend to proxy","fromName":"Ricky Davidson via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-04-21T03:35:59Z","receivedAt":"2023-04-21T03:36:08Z","isPatch":true,"sender":{"key":"name:Ricky Davidson","avatar":null},"body":"From: Ricky Davidson <Ricky.Davidson@hii-tsd.com>\n\n0a01d41ee4 (http: add support for different sslcert and sslkey\ntypes., 2023-03-20) added http.sslCertType and http.sslKeyType, but:\n\n1. it does not document the feature.\n2. it does not apply to SSL proxy equivalents.\n\nDocuments http.sslCertType and http.sslKeyType. Implements\nhttp.proxySSLCertType. Does the same for http.sslKeyType and\nhttp.proxySSLKeyType equivalents and related environment\nvariables.\n\nSigned-off-by: Ricky Davidson <Ricky.Davidson@hii-tsd.com>\n---\n    [PATCH] http: document sslcert and sslkey types and extend to proxy\n    \n    0a01d41ee4 (http: add support for different sslcert and sslkey types.,\n    2023-03-20) added http.sslCertType and http.sslKeyType, but:\n    \n     1. it does not document the feature.\n     2. it does not apply to SSL proxy equivalents.\n    \n    Documents http.sslCertType and http.sslKeyType. Implements\n    http.proxySSLCertType. Does the same for http.sslKeyType and\n    http.proxySSLKeyType equivalents and related environment variables.\n    \n    Signed-off-by: Ricky Davidson Ricky.Davidson@hii-tsd.com\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1520%2FRicky-Davidson-hii-tsd%2Fmaster-v4\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1520/Ricky-Davidson-hii-tsd/master-v4\nPull-Request: https://github.com/gitgitgadget/git/pull/1520\n\nRange-diff vs v3:\n\n 1:  020c03104f4 ! 1:  c2489a9ed88 http: document sslcert and sslkey types and extend to proxy\n     @@ Documentation/config/http.txt: http.proxySSLCert::\n       \n      +http.proxySSLCertType::\n      +\tFormat of the client certificate used to authenticate with an HTTPS proxy.\n     -+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n     ++\tExample values are `PEM` and `ENG`. The format `ENG` enables loading from\n      +\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_CERT_TYPE` environment\n     -+\tvariable.\n     ++\tvariable. For more information on accepted values, see libcurl's\n     ++\t`CURLOPT_PROXY_SSLCERTTYPE`.\n      +\n       http.proxySSLKey::\n       \tThe pathname of a file that stores a private key to use to authenticate with\n     @@ Documentation/config/http.txt: http.proxySSLCert::\n       \n      +http.proxySSLKeyType::\n      +\tFormat of the client private key used to authenticate with an HTTPS proxy.\n     -+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n     ++\tExample values are `PEM` and `ENG`. The format `ENG` enables loading from\n      +\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_KEY_TYPE` environment\n     -+\tvariable.\n     ++\tvariable. For more information on accepted values, see libcurl's\n     ++\t`CURLOPT_PROXY_SSLKEYTYPE`.\n      +\n       http.proxySSLCertPasswordProtected::\n       \tEnable Git's password prompt for the proxy SSL certificate.  Otherwise OpenSSL\n     @@ Documentation/config/http.txt: http.sslCert::\n       \n      +http.sslCertType::\n      +\tFormat of the SSL certificate used to authenticate over HTTPS.\n     -+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n     ++\tExample values are `PEM` and `ENG`. The format `ENG` enables loading from\n      +\ta crypto engine. Can be overridden by the `GIT_SSL_CERT_TYPE` environment\n     -+\tvariable.\n     ++\tvariable. For more information on accepted values, see libcurl's\n     ++\t`CURLOPT_SSLCERTTYPE`.\n      +\n       http.sslKey::\n       \tFile containing the SSL private key when fetching or pushing\n     @@ Documentation/config/http.txt: http.sslCert::\n       \n      +http.sslKeyType::\n      +\tFormat of the SSL private key used to authenticate over HTTPS.\n     -+\tSupported formats are `PEM` and `ENG`. The format `ENG` enables loading from\n     -+\ta crypto engine. Can be overridden by the `GIT_SSL_CERT_TYPE` environment\n     -+\tvariable.\n     ++\tExample values are `PEM` and `ENG`. The format `ENG` enables loading from\n     ++\ta crypto engine. Can be overridden by the `GIT_SSL_KEY_TYPE` environment\n     ++\tvariable. For more information on accepted values, see libcurl's\n     ++\t`CURLOPT_SSLKEYTYPE`.\n      +\n       http.sslCertPasswordProtected::\n       \tEnable Git's password prompt for the SSL certificate.  Otherwise\n\n\n Documentation/config/http.txt | 28 ++++++++++++++++++++++++++++\n http.c                        | 12 ++++++++++++\n 2 files changed, 40 insertions(+)\n\ndiff --git a/Documentation/config/http.txt b/Documentation/config/http.txt\nindex afeeccfbfa7..dfca1a54123 100644\n--- a/Documentation/config/http.txt\n+++ b/Documentation/config/http.txt\n@@ -34,11 +34,25 @@ http.proxySSLCert::\n \twith an HTTPS proxy. Can be overridden by the `GIT_PROXY_SSL_CERT` environment\n \tvariable.\n \n+http.proxySSLCertType::\n+\tFormat of the client certificate used to authenticate with an HTTPS proxy.\n+\tExample values are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_CERT_TYPE` environment\n+\tvariable. For more information on accepted values, see libcurl's\n+\t`CURLOPT_PROXY_SSLCERTTYPE`.\n+\n http.proxySSLKey::\n \tThe pathname of a file that stores a private key to use to authenticate with\n \tan HTTPS proxy. Can be overridden by the `GIT_PROXY_SSL_KEY` environment\n \tvariable.\n \n+http.proxySSLKeyType::\n+\tFormat of the client private key used to authenticate with an HTTPS proxy.\n+\tExample values are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_PROXY_SSL_KEY_TYPE` environment\n+\tvariable. For more information on accepted values, see libcurl's\n+\t`CURLOPT_PROXY_SSLKEYTYPE`.\n+\n http.proxySSLCertPasswordProtected::\n \tEnable Git's password prompt for the proxy SSL certificate.  Otherwise OpenSSL\n \twill prompt the user, possibly many times, if the certificate or private key\n@@ -161,11 +175,25 @@ http.sslCert::\n \tover HTTPS. Can be overridden by the `GIT_SSL_CERT` environment\n \tvariable.\n \n+http.sslCertType::\n+\tFormat of the SSL certificate used to authenticate over HTTPS.\n+\tExample values are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_SSL_CERT_TYPE` environment\n+\tvariable. For more information on accepted values, see libcurl's\n+\t`CURLOPT_SSLCERTTYPE`.\n+\n http.sslKey::\n \tFile containing the SSL private key when fetching or pushing\n \tover HTTPS. Can be overridden by the `GIT_SSL_KEY` environment\n \tvariable.\n \n+http.sslKeyType::\n+\tFormat of the SSL private key used to authenticate over HTTPS.\n+\tExample values are `PEM` and `ENG`. The format `ENG` enables loading from\n+\ta crypto engine. Can be overridden by the `GIT_SSL_KEY_TYPE` environment\n+\tvariable. For more information on accepted values, see libcurl's\n+\t`CURLOPT_SSLKEYTYPE`.\n+\n http.sslCertPasswordProtected::\n \tEnable Git's password prompt for the SSL certificate.  Otherwise\n \tOpenSSL will prompt the user, possibly many times, if the\ndiff --git a/http.c b/http.c\nindex d5d82c5230f..bee4ea64115 100644\n--- a/http.c\n+++ b/http.c\n@@ -74,7 +74,9 @@ static const char *curl_http_proxy;\n static const char *http_proxy_authmethod;\n \n static const char *http_proxy_ssl_cert;\n+static const char *http_proxy_ssl_cert_type;\n static const char *http_proxy_ssl_key;\n+static const char *http_proxy_ssl_key_type;\n static const char *http_proxy_ssl_ca_info;\n static struct credential proxy_cert_auth = CREDENTIAL_INIT;\n static int proxy_ssl_cert_password_required;\n@@ -441,9 +443,13 @@ static int http_options(const char *var, const char *value, void *cb)\n \n \tif (!strcmp(\"http.proxysslcert\", var))\n \t\treturn git_config_string(&http_proxy_ssl_cert, var, value);\n+\tif (!strcmp(\"http.proxysslcerttype\", var))\n+\t\treturn git_config_string(&http_proxy_ssl_cert_type, var, value);\n \n \tif (!strcmp(\"http.proxysslkey\", var))\n \t\treturn git_config_string(&http_proxy_ssl_key, var, value);\n+\tif (!strcmp(\"http.proxysslkeytype\", var))\n+\t\treturn git_config_string(&http_proxy_ssl_key_type, var, value);\n \n \tif (!strcmp(\"http.proxysslcainfo\", var))\n \t\treturn git_config_string(&http_proxy_ssl_ca_info, var, value);\n@@ -1146,9 +1152,13 @@ static CURL *get_curl_handle(void)\n \n \t\t\tif (http_proxy_ssl_cert)\n \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLCERT, http_proxy_ssl_cert);\n+\t\t\tif (http_proxy_ssl_cert_type)\n+\t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLCERTTYPE, http_proxy_ssl_cert_type);\n \n \t\t\tif (http_proxy_ssl_key)\n \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLKEY, http_proxy_ssl_key);\n+\t\t\tif (http_proxy_ssl_key_type)\n+\t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_SSLKEYTYPE, http_proxy_ssl_key_type);\n \n \t\t\tif (has_proxy_cert_password())\n \t\t\t\tcurl_easy_setopt(result, CURLOPT_PROXY_KEYPASSWD, proxy_cert_auth.password);\n@@ -1285,7 +1295,9 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)\n \t\tmax_requests = DEFAULT_MAX_REQUESTS;\n \n \tset_from_env(&http_proxy_ssl_cert, \"GIT_PROXY_SSL_CERT\");\n+\tset_from_env(&http_proxy_ssl_cert_type, \"GIT_PROXY_SSL_CERT_TYPE\");\n \tset_from_env(&http_proxy_ssl_key, \"GIT_PROXY_SSL_KEY\");\n+\tset_from_env(&http_proxy_ssl_key_type, \"GIT_PROXY_SSL_KEY_TYPE\");\n \tset_from_env(&http_proxy_ssl_ca_info, \"GIT_PROXY_SSL_CAINFO\");\n \n \tif (getenv(\"GIT_PROXY_SSL_CERT_PASSWORD_PROTECTED\"))\n\nbase-commit: 667fcf4e15379790f0b609d6a83d578e69f20301\n-- \ngitgitgadget\n"}]}