comparison tests/test-https.t @ 29489:54ad81b0665f

sslutil: handle default CA certificate loading on Windows See the inline comment for what's going on here. There is magic built into the "ssl" module that ships with modern CPython that knows how to load the system CA certificates on Windows. Since we're not shipping a CA bundle with Mercurial, if we're running on legacy CPython there's nothing we can do to load CAs on Windows, so it makes sense to print a warning. I don't anticipate many people will see this warning because the official (presumed popular) Mercurial distributions on Windows bundle Python and should be distributing a modern Python capable of loading system CA certs.
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 04 Jul 2016 10:04:11 -0700
parents 5caa415aa48b
children 9c5325c79683
comparison
equal deleted inserted replaced
29488:1c26b9ce66f8 29489:54ad81b0665f
54 [255] 54 [255]
55 #endif 55 #endif
56 56
57 #if no-sslcontext defaultcacerts 57 #if no-sslcontext defaultcacerts
58 $ hg clone https://localhost:$HGPORT/ copy-pull 58 $ hg clone https://localhost:$HGPORT/ copy-pull
59 abort: error: *certificate verify failed* (glob)
60 [255]
61 #endif
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)
59 abort: error: *certificate verify failed* (glob) 66 abort: error: *certificate verify failed* (glob)
60 [255] 67 [255]
61 #endif 68 #endif
62 69
63 #if defaultcacertsloaded 70 #if defaultcacertsloaded