使用pyopenssl为httplib和urllib2提供增强的https支持
ndg-httpsclient的Python项目详细描述
- 的https客户端实现
- httplib(python 2)、http.client(python 3)和
- urllib2(python 2)和urllib(python 3)
…基于pyopenssl。pyopenssl提供了一个功能更全面的ssl实现 超过python提供的默认值,而且重要的是,它支持完全验证 使用pyasn1的ssl对等方。
释放量
0.5.1
- Clean up handling for description file - pull in content from this file into setup()
- Allows the nightly build to fail
- Add Trove version classifiers to make it explicit what is supported
- Add python_requires to help pip
- Drop support for EOL Python 2.6 and 3.3
感谢@hugovk的贡献
0.5.0
- Fix to Subject Alternative Name handling to allow for certificates with more than 64 names (max now 1024). Thanks to Matt Pegler
- Fix to subjectAltName string to use byte type for correct matching
- Updated SSL Context objects to default to TLS 1.2
0.4.4
- Updated test certificates
0.4.3
- Fix to ^{tt6}$ namespace package warning issue (https://github.com/cedadev/ndg_httpsclient/issues/3). ^{tt7}$ file now included in ^{tt6}$ directory so that there are no longer warnings with imports when using Python 2.x. Thanks to Max Mauntner for fix.
- Minor fix for installation: set minimum release for ^{tt5}$ to avoid conflicts with Ubuntu install - see https://github.com/cedadev/ndg_httpsclient/issues/5 and https://github.com/cedadev/ndg_httpsclient/pull/10. ^{tt5}$ also becomes mandatory rather than optional package for install. - It required by ^{tt11}$ anyway which is a dependency for ^{tt12}$ from version 0.14.
0.4.2
- Fix to bug in ^{tt13}$ - duplicate open call. Nb. This bug and the fix DO NOT affect the ^{tt14}$ interfaces that this package provides.
0.4.1
- Added explicit ref to Python 3 in classifier text for Python 3 checking tools.
- Moved LICENSE file into package
0.4.0
- Made dual compatible with Python 2 / 3.
0.3.3
- Fix to add in AnotherName for ^{tt15}$ field - added for support for CACert issued certs (thanks to Gu1).
- Fix to HTTP Basic Auth option for ^{tt16}$
- Fix to ^{tt17}$ so that it can pass a function-based callback instead of using ^{tt18}$. In newer versions of OpenSSL (>= 0.14) the latter failed because of a request for ^{tt19}$ attribute.
0.3.2
- Fix to SubjectAltNames support check - should only be enabled if pyasn1 is installed.
- Fix to open_url: HTTP Request object was being created inside if headers is None block - now corrected to create regardless.
- Added http basic auth support to script. (Thanks to Willem van Engen)
0.3.1
- extended utils functions to support keyword for passing additional ^{tt3}$ handlers.
0.3.0
- Added ^{tt21}$ function and added parameter for data to post in ^{tt22}$ and ^{tt23}$ methods.
- fix to ndg.httpsclient.utils module _should_use_proxy and open_url functions
0.2.0
- added support for SSL verification with subjectAltNames using pyasn1
- fixed minor bug - SSL cert DN prefix matching
0.1.0
初始版本
先决条件
这是针对python 2.7和pyopenssl 0.13开发和测试的。 和0.14。0.4.0版使用pyOpenSSL0.15.1和python 2.7进行了测试,并且 3.4条。 ^使用subjectAltNames进行正确的ssl验证需要{tt5}$。
安装
可以使用easy_install或pip执行安装。
运行ndg_httpclient
使用http或https从指定url获取数据的简单脚本。
参数:
- url
- 要获取的资源的url
选项:
- -h,--help
- 显示帮助消息并退出.< /dD>
- -c FILE, --certificate=FILE
- 证书文件-默认为$HOME/credentials.pem
- -k FILE, --private-key=FILE
- 私钥文件-默认为证书文件
- -t DIR, --ca-certificate-dir=DIR
- 受信任的CA证书文件目录。
- -d,--debug
- 打印调试信息-这在解决http或 对服务器的https访问。
- -p FILE, --post-data-file=FILE
- 发布数据文件
- -f FILE, --fetch=FILE
- 输出文件
- -n,--no-verify-peer
- 跳过对等证书的验证。