Show More
@@ -447,6 +447,19 b' def _defaultcacerts(ui):' | |||||
447 | except ImportError: |
|
447 | except ImportError: | |
448 | pass |
|
448 | pass | |
449 |
|
449 | |||
|
450 | # On Windows, only the modern ssl module is capable of loading the system | |||
|
451 | # CA certificates. If we're not capable of doing that, emit a warning | |||
|
452 | # because we'll get a certificate verification error later and the lack | |||
|
453 | # of loaded CA certificates will be the reason why. | |||
|
454 | # Assertion: this code is only called if certificates are being verified. | |||
|
455 | if os.name == 'nt': | |||
|
456 | if not _canloaddefaultcerts: | |||
|
457 | ui.warn(_('(unable to load Windows CA certificates; see ' | |||
|
458 | 'https://mercurial-scm.org/wiki/SecureConnections for ' | |||
|
459 | 'how to configure Mercurial to avoid this message)\n')) | |||
|
460 | ||||
|
461 | return None | |||
|
462 | ||||
450 | # Apple's OpenSSL has patches that allow a specially constructed certificate |
|
463 | # Apple's OpenSSL has patches that allow a specially constructed certificate | |
451 | # to load the system CA store. If we're running on Apple Python, use this |
|
464 | # to load the system CA store. If we're running on Apple Python, use this | |
452 | # trick. |
|
465 | # trick. |
@@ -60,6 +60,13 b' we are able to load CA certs.' | |||||
60 | [255] |
|
60 | [255] | |
61 | #endif |
|
61 | #endif | |
62 |
|
62 | |||
|
63 | #if no-sslcontext windows | |||
|
64 | $ hg clone https://localhost:$HGPORT/ copy-pull | |||
|
65 | (unable to load Windows CA certificates; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this message) | |||
|
66 | abort: error: *certificate verify failed* (glob) | |||
|
67 | [255] | |||
|
68 | #endif | |||
|
69 | ||||
63 | #if defaultcacertsloaded |
|
70 | #if defaultcacertsloaded | |
64 | $ hg clone https://localhost:$HGPORT/ copy-pull |
|
71 | $ hg clone https://localhost:$HGPORT/ copy-pull | |
65 | abort: error: *certificate verify failed* (glob) |
|
72 | abort: error: *certificate verify failed* (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now