Show More
@@ -249,13 +249,18 def sslkwargs(ui, host): | |||
|
249 | 249 | if cacerts == '!': |
|
250 | 250 | return kws |
|
251 | 251 | |
|
252 | # If a value is set in the config, validate against a path and load | |
|
253 | # and require those certs. | |
|
252 | 254 | if cacerts: |
|
253 | 255 | cacerts = util.expandpath(cacerts) |
|
254 | 256 | if not os.path.exists(cacerts): |
|
255 | 257 | raise error.Abort(_('could not find web.cacerts: %s') % cacerts) |
|
256 | else: | |
|
257 | # CA certs aren't explicitly listed in the config. See if we can load | |
|
258 | # defaults. | |
|
258 | ||
|
259 | kws.update({'ca_certs': cacerts, | |
|
260 | 'cert_reqs': ssl.CERT_REQUIRED}) | |
|
261 | return kws | |
|
262 | ||
|
263 | # No CAs in config. See if we can load defaults. | |
|
259 | 264 |
|
|
260 | 265 |
|
|
261 | 266 |
|
General Comments 0
You need to be logged in to leave comments.
Login now