##// END OF EJS Templates
sslutil: inform the user about how to fix an incomplete certificate chain...
Matt Harbison -
r33494:30f2715b default
parent child Browse files
Show More
@@ -475,6 +475,12 def wrapsocket(sock, keyfile, certfile,
475 475 ui.warn(_(
476 476 '(see https://mercurial-scm.org/wiki/SecureConnections '
477 477 'for more info)\n'))
478
479 elif (e.reason == 'CERTIFICATE_VERIFY_FAILED' and
480 pycompat.osname == 'nt'):
481
482 ui.warn(_('(the full certificate chain may not be available '
483 'locally; see "hg help debugssl")\n'))
478 484 raise
479 485
480 486 # check if wrap_socket failed silently because socket had been
@@ -84,6 +84,7 we are able to load CA certs.
84 84 $ hg clone https://localhost:$HGPORT/ copy-pull
85 85 warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
86 86 (using CA certificates from *; if you see this message, your Mercurial install is not properly configured; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this message) (glob) (?)
87 (the full certificate chain may not be available locally; see "hg help debugssl") (windows !)
87 88 abort: error: *certificate verify failed* (glob)
88 89 [255]
89 90 #endif
@@ -128,6 +129,7 A per-host certificate mismatching the s
128 129 $ hg --config hostsecurity.localhost:verifycertsfile="$CERTSDIR/client-cert.pem" clone https://localhost:$HGPORT/
129 130 warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
130 131 (an attempt was made to load CA certificates but none were loaded; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this error)
132 (the full certificate chain may not be available locally; see "hg help debugssl") (windows !)
131 133 abort: error: *certificate verify failed* (glob)
132 134 [255]
133 135 #else
@@ -295,6 +297,7 cacert mismatch
295 297 $ hg -R copy-pull pull --config web.cacerts="$CERTSDIR/pub-other.pem"
296 298 pulling from https://localhost:$HGPORT/
297 299 warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
300 (the full certificate chain may not be available locally; see "hg help debugssl") (windows !)
298 301 abort: error: *certificate verify failed* (glob)
299 302 [255]
300 303 $ hg -R copy-pull pull --config web.cacerts="$CERTSDIR/pub-other.pem" \
@@ -313,6 +316,7 Test server cert which isn't valid yet
313 316 > https://localhost:$HGPORT1/
314 317 pulling from https://localhost:$HGPORT1/
315 318 warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
319 (the full certificate chain may not be available locally; see "hg help debugssl") (windows !)
316 320 abort: error: *certificate verify failed* (glob)
317 321 [255]
318 322
@@ -324,6 +328,7 Test server cert which no longer is vali
324 328 > https://localhost:$HGPORT2/
325 329 pulling from https://localhost:$HGPORT2/
326 330 warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
331 (the full certificate chain may not be available locally; see "hg help debugssl") (windows !)
327 332 abort: error: *certificate verify failed* (glob)
328 333 [255]
329 334
@@ -578,12 +583,14 Test https with cert problems through pr
578 583 > --config web.cacerts="$CERTSDIR/pub-other.pem"
579 584 pulling from https://localhost:$HGPORT/
580 585 warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
586 (the full certificate chain may not be available locally; see "hg help debugssl") (windows !)
581 587 abort: error: *certificate verify failed* (glob)
582 588 [255]
583 589 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull \
584 590 > --config web.cacerts="$CERTSDIR/pub-expired.pem" https://localhost:$HGPORT2/
585 591 pulling from https://localhost:$HGPORT2/
586 592 warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
593 (the full certificate chain may not be available locally; see "hg help debugssl") (windows !)
587 594 abort: error: *certificate verify failed* (glob)
588 595 [255]
589 596
@@ -619,6 +626,7 without client certificate:
619 626
620 627 $ P="$CERTSDIR" hg id https://localhost:$HGPORT/
621 628 warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
629 (the full certificate chain may not be available locally; see "hg help debugssl") (windows !)
622 630 abort: error: *handshake failure* (glob)
623 631 [255]
624 632
@@ -67,6 +67,7 we are able to load CA certs:
67 67
68 68 warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
69 69 (using CA certificates from *; if you see this message, your Mercurial install is not properly configured; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this message) (glob) (?)
70 (the full certificate chain may not be available locally; see "hg help debugssl") (windows !)
70 71 (?i)abort: .*?certificate.verify.failed.* (re)
71 72 [255]
72 73
@@ -118,6 +119,7 With invalid certificates:
118 119
119 120
120 121 warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
122 (the full certificate chain may not be available locally; see "hg help debugssl") (windows !)
121 123 (?i)abort: .*?certificate.verify.failed.* (re)
122 124 [255]
123 125
General Comments 0
You need to be logged in to leave comments. Login now