Mercurial > hg
comparison tests/test-https.t @ 12784:763be3cd084a
hgweb: use Pythons ssl module for HTTPS serve when using Python 2.6 or later
pyOpenSSL apparently doesn't work for Python 2.7 and isn't very actively
maintained.
The built-in ssl module seems like a long-term winner, so we now use that with
Python 2.6 and higher.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Wed, 20 Oct 2010 20:19:34 +0200 |
parents | 949dfdb3ad2d |
children | 2fa2e6444645 |
comparison
equal
deleted
inserted
replaced
12783:191d0fd5c2fd | 12784:763be3cd084a |
---|---|
1 Proper https client requires the built-in ssl from Python 2.6, | 1 Proper https client requires the built-in ssl from Python 2.6. |
2 and https serve requires the full OpenSSL module. | |
3 | 2 |
4 $ "$TESTDIR/hghave" ssl || exit 80 | 3 $ "$TESTDIR/hghave" ssl || exit 80 |
5 | |
6 HTTPS serve seems to be broken on Python 2.7: | |
7 | |
8 $ [ "`python -c 'import sys; print sys.version_info[:2]'`" = '(2, 6)' ] || exit 80 | |
9 | 4 |
10 Certificates created with: | 5 Certificates created with: |
11 printf '.\n.\n.\n.\n.\nlocalhost\nhg@localhost\n' | \ | 6 printf '.\n.\n.\n.\n.\nlocalhost\nhg@localhost\n' | \ |
12 openssl req -newkey rsa:512 -keyout priv.pem -nodes -x509 -days 9000 -out pub.pem | 7 openssl req -newkey rsa:512 -keyout priv.pem -nodes -x509 -days 9000 -out pub.pem |
13 Can be dumped with: | 8 Can be dumped with: |