From: Ruben Kerkhof <ru...@rubenkerkhof.com>

I use gmail for sending patches.
If I have the following defined in my ~/.gitconfig:
[sendemail]
        smtpencryption = tls
        smtpserver = smtp.gmail.com
        smtpuser = ru...@rubenkerkhof.com
        smtpserverport = 587

and try to send a patch, this fails with:
STARTTLS failed! SSL connect attempt failed with unknown error
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate
verify failed at /usr/libexec/git-core/git-send-email line 1236.

Tested-by: Igor Gnatenko <i.gnatenko.br...@gmail.com>
Signed-off-by: Ruben Kerkhof <ru...@rubenkerkhof.com>
Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1043194
---
 git-send-email.perl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index 3782c3b..689944f 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1095,7 +1095,8 @@ sub ssl_verify_params {
        }
 
        if (!defined $smtp_ssl_cert_path) {
-               $smtp_ssl_cert_path = "/etc/ssl/certs";
+               # use the OpenSSL defaults
+               return (SSL_verify_mode => SSL_VERIFY_PEER());
        }
 
        if ($smtp_ssl_cert_path eq "") {
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to