Show More
@@ -89,16 +89,18 b' def _verifycert(cert, hostname):' | |||
|
89 | 89 | # busted on those versions. |
|
90 | 90 | |
|
91 | 91 | def sslkwargs(ui, host): |
|
92 | cacerts = ui.config('web', 'cacerts') | |
|
93 | 92 | forcetls = ui.configbool('ui', 'tls', default=True) |
|
94 | 93 | if forcetls: |
|
95 | 94 | ssl_version = PROTOCOL_TLSv1 |
|
96 | 95 | else: |
|
97 | 96 | ssl_version = PROTOCOL_SSLv23 |
|
98 | hostfingerprint = ui.config('hostfingerprints', host) | |
|
99 | 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 | 104 | cacerts = util.expandpath(cacerts) |
|
103 | 105 | if not os.path.exists(cacerts): |
|
104 | 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