Show More
@@ -144,12 +144,15 b' def wrapsocket(sock, keyfile, certfile, ' | |||||
144 | # This is a no-op on old Python. |
|
144 | # This is a no-op on old Python. | |
145 | sslcontext.options |= OP_NO_SSLv2 | OP_NO_SSLv3 |
|
145 | sslcontext.options |= OP_NO_SSLv2 | OP_NO_SSLv3 | |
146 |
|
146 | |||
|
147 | # This still works on our fake SSLContext. | |||
|
148 | sslcontext.verify_mode = cert_reqs | |||
|
149 | ||||
147 | if certfile is not None: |
|
150 | if certfile is not None: | |
148 | def password(): |
|
151 | def password(): | |
149 | f = keyfile or certfile |
|
152 | f = keyfile or certfile | |
150 | return ui.getpass(_('passphrase for %s: ') % f, '') |
|
153 | return ui.getpass(_('passphrase for %s: ') % f, '') | |
151 | sslcontext.load_cert_chain(certfile, keyfile, password) |
|
154 | sslcontext.load_cert_chain(certfile, keyfile, password) | |
152 | sslcontext.verify_mode = cert_reqs |
|
155 | ||
153 | if ca_certs is not None: |
|
156 | if ca_certs is not None: | |
154 | sslcontext.load_verify_locations(cafile=ca_certs) |
|
157 | sslcontext.load_verify_locations(cafile=ca_certs) | |
155 | else: |
|
158 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now