GitHub - cedadev/ndg_httpsclient: HTTPS client implementation for httplib and urllib2 based on PyOpenSSL (original) (raw)

A HTTPS client implementation for

... based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation over the default provided with Python and importantly enables full verification of the SSL peer using pyasn1.

Releases

0.5.1

Thanks to @hugovk for contributions

0.5.0

0.4.4

0.4.3

0.4.2

0.4.1

0.4.0

0.3.3

0.3.2

0.3.1

0.3.0

0.2.0

0.1.0

Initial release

Prerequisites

This has been developed and tested for Python 2.7 with pyOpenSSL 0.13 and 0.14. Version 0.4.0 tested with pyOpenSSL 0.15.1 and Python 2.7 and 3.4.pyasn1 is required for correct SSL verification with subjectAltNames.

Installation

Installation can be performed using easy_install or pip.

Running ndg_httpclient

A simple script for fetching data using HTTP or HTTPS GET from a specified URL.

Parameter:

urlThe URL of the resource to be fetched

Options:

-h, --helpShow help message and exit.

-c FILE, --certificate=FILECertificate file - defaults to $HOME/credentials.pem

-k FILE, --private-key=FILEPrivate key file - defaults to the certificate file

-t DIR, --ca-certificate-dir=DIRTrusted CA certificate file directory.

-d, --debugPrint debug information - this may be useful in solving problems with HTTP or HTTPS access to a server.

-p FILE, --post-data-file=FILEPOST data file

-f FILE, --fetch=FILEOutput file

-n, --no-verify-peerSkip verification of peer certificate.