Python 2.2 HTTPS support
This is a
Secure Socket Layer (SSL) and HTTPS (
HTTP
over SSL) dynamically loadable extension of
Python 2.2.
Produced by Val Shkolnikov, val@nvsoft.net.
Provided as free source with absolutely no warranty.
Tested under Windows XP only. Should :-) work under any MS Windows.
Unix operation needs work.
The extension is provided in two packages ready for download:
binary ssl_bin.tar.gz
and source ssl_src.tar.gz
Binary package contents
-
README, installation instructions;
-
ACKNOWLEDGEMENTS, list of acknowledgements;
-
COPYING, GNU copying license;
-
COPYING.LIB, GNU library copying license;
-
Makefile,
make
utility command file for installing the package;
-
ssl.pyd, python loadable SSL module;
-
httpsub.py, python module of add-ons to httplib.py,
HTTP and HTTPS classes are re-worked, see the makefile method;
this allows, among other things, transparent utilization of the
chunked transfer encoding support in httplib.py;
-
libssl32.dll, libeay32.dll, SSL DLLs.
Binary package installation
-
install python, specifically Python-2.2,
into a python home directory;
-
unpack the binary package:
gunzip -c <ssl_bin.tar.gz | tar xf -
-
install library files:
-
using cygwin tools:
-
set the PY_DIR variable in Makefile to your python home directory
-
make install_bin
-
brute force :-) :
-
copy files ssl.pyd libssl32.dll libeay32.dll to the DLLS directory
and file httpsub.py to the Lib directory in your python home directory
from current directory;
-
verify operation:
python httpsub.py
Source package contents
-
README, ACKNOWLEDGEMENTS, COPYING,
COPYING.LIB, httpsub,py, see above;
-
Makefile,
make
utility command file for compiling the SSL loadable module
and installing the package under MS Windows;
-
Makefile.unix,
make
utility command file for compiling the SSL loadable
module under Unix (needs work);
-
ssl.c, C source file of the module;
-
ssl.def, a DEF file used in linking the module;
-
OpenSSL-20010810.tar.gz, mingw
compiled openssl package that provides
SSL DLLs and include files, the package is downloaded from
http://www.kix.or.jp/~fujino/openssl;
-
pexports.exe, utility to generate the DEF files for the SSL DLLs,
the utility is downloaded from
http://infoservice.lg.ua/~paul/devel/binutils.html;
-
objects.h, pyconfig.h, replacements for files in the
python Include directory.
Source compilation and installation
-
install python, specifically Python-2.2,
into a python home directory;
-
install the cygwin package
(basic and make);
-
OPTIONAL: install the mingw package,
NB: mingw allows compilation with the MSVC libraries used by python.
The cygwin site supports mingw (see the CFLAGS = -mno-cygwin macro
in Makefile). This step is recommended only if the cygwin
site falls behind the mingw site.
-
unpack the source package:
gunzip -c <ssl_src.tar.gz | tar xf -
-
install and compile the openssl package
or run:
gunzip -c <OpenSSL-20010810.tar.gz | tar xf -
creating the ssl home directory ssl;
-
add the ssl/bin subdirectory to your PATH variable;
-
copy the pexports.exe file to /usr/bin or similar place;
-
set the PY_DIR and SSL_DIR variables in Makefile
to your python and ssl home directories respectively;
-
OPTIONAL: replace files objects.h and pyconfig.h in the
Include
directory of your python home directory with those in the source package
directory,
NB: this step is recommended for Python 1.5 at
http://starship.python.net/crew/kernr/mingw32/Notes.html,
but appears to be unnecessary for the ssl package.
-
run:
make
-
run:
make install
-
verify operation:
python httpsub.py
Note: the software is verified to work with Python 2.2.2.