Show More
@@ -89,16 +89,18 b' def _verifycert(cert, hostname):' | |||||
89 | # busted on those versions. |
|
89 | # busted on those versions. | |
90 |
|
90 | |||
91 | def sslkwargs(ui, host): |
|
91 | def sslkwargs(ui, host): | |
92 | cacerts = ui.config('web', 'cacerts') |
|
|||
93 | forcetls = ui.configbool('ui', 'tls', default=True) |
|
92 | forcetls = ui.configbool('ui', 'tls', default=True) | |
94 | if forcetls: |
|
93 | if forcetls: | |
95 | ssl_version = PROTOCOL_TLSv1 |
|
94 | ssl_version = PROTOCOL_TLSv1 | |
96 | else: |
|
95 | else: | |
97 | ssl_version = PROTOCOL_SSLv23 |
|
96 | ssl_version = PROTOCOL_SSLv23 | |
98 | hostfingerprint = ui.config('hostfingerprints', host) |
|
|||
99 | kws = {'ssl_version': ssl_version, |
|
97 | kws = {'ssl_version': ssl_version, | |
100 | } |
|
98 | } | |
101 | if cacerts and not hostfingerprint: |
|
99 | hostfingerprint = ui.config('hostfingerprints', host) | |
|
100 | if hostfingerprint: | |||
|
101 | return kws | |||
|
102 | cacerts = ui.config('web', 'cacerts') | |||
|
103 | if cacerts: | |||
102 | cacerts = util.expandpath(cacerts) |
|
104 | cacerts = util.expandpath(cacerts) | |
103 | if not os.path.exists(cacerts): |
|
105 | if not os.path.exists(cacerts): | |
104 | raise util.Abort(_('could not find web.cacerts: %s') % cacerts) |
|
106 | raise util.Abort(_('could not find web.cacerts: %s') % cacerts) |
General Comments 0
You need to be logged in to leave comments.
Login now