##// END OF EJS Templates
sslutil: issue warning when unable to load certificates on OS X...
Gregory Szorc -
r29499:9c5325c7 default
parent child Browse files
Show More
@@ -468,6 +468,18 b' def _defaultcacerts(ui):'
468 if os.path.exists(dummycert):
468 if os.path.exists(dummycert):
469 return dummycert
469 return dummycert
470
470
471 # The Apple OpenSSL trick isn't available to us. If Python isn't able to
472 # load system certs, we're out of luck.
473 if sys.platform == 'darwin':
474 # FUTURE Consider looking for Homebrew or MacPorts installed certs
475 # files. Also consider exporting the keychain certs to a file during
476 # Mercurial install.
477 if not _canloaddefaultcerts:
478 ui.warn(_('(unable to load CA certificates; see '
479 'https://mercurial-scm.org/wiki/SecureConnections for '
480 'how to configure Mercurial to avoid this message)\n'))
481 return None
482
471 return None
483 return None
472
484
473 def validatesocket(sock):
485 def validatesocket(sock):
@@ -67,6 +67,14 b' we are able to load CA certs.'
67 [255]
67 [255]
68 #endif
68 #endif
69
69
70 #if no-sslcontext osx
71 $ hg clone https://localhost:$HGPORT/ copy-pull
72 (unable to load CA certificates; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this message)
73 abort: localhost certificate error: no certificate received
74 (set hostsecurity.localhost:certfingerprints=sha256:62:09:97:2f:97:60:e3:65:8f:12:5d:78:9e:35:a1:36:7a:65:4b:0e:9f:ac:db:c3:bc:6e:b6:a3:c0:16:e0:30 config setting or use --insecure to connect insecurely)
75 [255]
76 #endif
77
70 #if defaultcacertsloaded
78 #if defaultcacertsloaded
71 $ hg clone https://localhost:$HGPORT/ copy-pull
79 $ hg clone https://localhost:$HGPORT/ copy-pull
72 abort: error: *certificate verify failed* (glob)
80 abort: error: *certificate verify failed* (glob)
@@ -75,6 +83,7 b' we are able to load CA certs.'
75
83
76 #if no-defaultcacerts
84 #if no-defaultcacerts
77 $ hg clone https://localhost:$HGPORT/ copy-pull
85 $ hg clone https://localhost:$HGPORT/ copy-pull
86 (unable to load * certificates; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this message) (glob) (?)
78 abort: localhost certificate error: no certificate received
87 abort: localhost certificate error: no certificate received
79 (set hostsecurity.localhost:certfingerprints=sha256:62:09:97:2f:97:60:e3:65:8f:12:5d:78:9e:35:a1:36:7a:65:4b:0e:9f:ac:db:c3:bc:6e:b6:a3:c0:16:e0:30 config setting or use --insecure to connect insecurely)
88 (set hostsecurity.localhost:certfingerprints=sha256:62:09:97:2f:97:60:e3:65:8f:12:5d:78:9e:35:a1:36:7a:65:4b:0e:9f:ac:db:c3:bc:6e:b6:a3:c0:16:e0:30 config setting or use --insecure to connect insecurely)
80 [255]
89 [255]
@@ -77,6 +77,7 b' we are able to load CA certs:'
77 this patch series consists of 1 patches.
77 this patch series consists of 1 patches.
78
78
79
79
80 (unable to load * certificates; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this message) (glob) (?)
80 abort: localhost certificate error: no certificate received
81 abort: localhost certificate error: no certificate received
81 (set hostsecurity.localhost:certfingerprints=sha256:62:09:97:2f:97:60:e3:65:8f:12:5d:78:9e:35:a1:36:7a:65:4b:0e:9f:ac:db:c3:bc:6e:b6:a3:c0:16:e0:30 config setting or use --insecure to connect insecurely)
82 (set hostsecurity.localhost:certfingerprints=sha256:62:09:97:2f:97:60:e3:65:8f:12:5d:78:9e:35:a1:36:7a:65:4b:0e:9f:ac:db:c3:bc:6e:b6:a3:c0:16:e0:30 config setting or use --insecure to connect insecurely)
82 [255]
83 [255]
General Comments 0
You need to be logged in to leave comments. Login now