Thu, 07 May 2015 17:15:24 +0900 ssl: prompt passphrase of client key file via ui.getpass() (issue4648)
Yuya Nishihara <yuya@tcha.org> [Thu, 07 May 2015 17:15:24 +0900] rev 25415
ssl: prompt passphrase of client key file via ui.getpass() (issue4648) This is necessary to communicate with third-party tools through command-server channel. This requires SSLContext backported to Python 2.7.9+. It doesn't look nice to pass ui by sslkwargs, but I think it is the only way to do without touching various client codes including httpclient (aka http2). ui is mandatory if certfile is specified, so it has no default value. BTW, test-check-commit-hg.t complains that ssl_wrap_socket() has foo_bar naming. Should I bulk-replace it to sslwrapsocket() ?
Thu, 07 May 2015 17:02:20 +0900 https: do not inherit httplib.HTTPSConnection that creates unused SSLContext
Yuya Nishihara <yuya@tcha.org> [Thu, 07 May 2015 17:02:20 +0900] rev 25414
https: do not inherit httplib.HTTPSConnection that creates unused SSLContext HTTPSConnection of Python 2.7.9 creates SSLContext in __init__, which involves a password prompt for decrypting the private key. This means the password was asked twice, one for unused SSLContext, and next for our ssl function. Because our httpsconnection replaces connect() method at all, we can simply drop httplib.HTTPSConnection. Instead, class and instance attributes are copied from it. HTTPSConnection of Python 2.7.8 and 2.6.9 seem to have no such problem. https://hg.python.org/cpython/file/v2.7.9/Lib/httplib.py#l1183
Thu, 07 May 2015 17:38:22 +0900 test-https: test basic functions of client certificate authentication
Yuya Nishihara <yuya@tcha.org> [Thu, 07 May 2015 17:38:22 +0900] rev 25413
test-https: test basic functions of client certificate authentication Because hgweb doesn't support client certificates, I just patched it to require client certificates that are signed and verified by the server certificate. This won't be ideal for production servers, but should be okay for the test. The encrypted key file will be used by future patches. I couldn't figure out a way to redirect a password prompt provided by OpenSSL, so it isn't tested for now.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 +3000 +10000 tip