Philip's fix works for me on CentOS 5.6: [keshav@jambu src]$ cat /etc/redhat-release CentOS release 5.6 (Final) [keshav@jambu src]$ python -V Python 2.4.3 [keshav@jambu src]$ grep "#define OPENSSL_VERSION_TEXT" /usr/include/openssl/opensslv.h #define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008" #define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8e-rhel5 01 Jul 2008" [keshav@jambu src]$ tar xf pyOpenSSL-0.13.tar.gz [keshav@jambu src]$ cd pyOpenSSL-0.13 [keshav@jambu pyOpenSSL-0.13]$ wget https://launchpadlibrarian.net/89536825/pyOpenSSL-0.13.centos5.patch &> /dev/null [keshav@jambu pyOpenSSL-0.13]$ patch -p1 < pyOpenSSL-0.13.centos5.patch patching file OpenSSL/ssl/connection.c patching file OpenSSL/ssl/context.c [keshav@jambu pyOpenSSL-0.13]$ ./setup.py build /usr/lib64/python2.4/distutils/dist.py:236: UserWarning: Unknown distribution option: 'zip_safe' warnings.warn(msg) running build running build_py creating build creating build/lib.linux-x86_64-2.4 creating build/lib.linux-x86_64-2.4/OpenSSL copying OpenSSL/__init__.py -> build/lib.linux-x86_64-2.4/OpenSSL copying OpenSSL/tsafe.py -> build/lib.linux-x86_64-2.4/OpenSSL copying OpenSSL/version.py -> build/lib.linux-x86_64-2.4/OpenSSL creating build/lib.linux-x86_64-2.4/OpenSSL/test copying OpenSSL/test/__init__.py -> build/lib.linux-x86_64-2.4/OpenSSL/test copying OpenSSL/test/util.py -> build/lib.linux-x86_64-2.4/OpenSSL/test copying OpenSSL/test/test_crypto.py -> build/lib.linux-x86_64-2.4/OpenSSL/test copying OpenSSL/test/test_rand.py -> build/lib.linux-x86_64-2.4/OpenSSL/test copying OpenSSL/test/test_ssl.py -> build/lib.linux-x86_64-2.4/OpenSSL/test running build_ext building 'OpenSSL.crypto' extension creating build/temp.linux-x86_64-2.4 creating build/temp.linux-x86_64-2.4/OpenSSL creating build/temp.linux-x86_64-2.4/OpenSSL/crypto gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/crypto/crypto.c -o build/temp.linux-x86_64-2.4/OpenSSL/crypto/crypto.o gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/crypto/x509.c -o build/temp.linux-x86_64-2.4/OpenSSL/crypto/x509.o gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/crypto/x509name.c -o build/temp.linux-x86_64-2.4/OpenSSL/crypto/x509name.o gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/crypto/pkey.c -o build/temp.linux-x86_64-2.4/OpenSSL/crypto/pkey.o gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/crypto/x509store.c -o build/temp.linux-x86_64-2.4/OpenSSL/crypto/x509store.o gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/crypto/x509req.c -o build/temp.linux-x86_64-2.4/OpenSSL/crypto/x509req.o gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/crypto/x509ext.c -o build/temp.linux-x86_64-2.4/OpenSSL/crypto/x509ext.o gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/crypto/pkcs7.c -o build/temp.linux-x86_64-2.4/OpenSSL/crypto/pkcs7.o gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/crypto/pkcs12.c -o build/temp.linux-x86_64-2.4/OpenSSL/crypto/pkcs12.o gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/crypto/netscape_spki.c -o build/temp.linux-x86_64-2.4/OpenSSL/crypto/netscape_spki.o gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/crypto/revoked.c -o build/temp.linux-x86_64-2.4/OpenSSL/crypto/revoked.o gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/crypto/crl.c -o build/temp.linux-x86_64-2.4/OpenSSL/crypto/crl.o gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/util.c -o build/temp.linux-x86_64-2.4/OpenSSL/util.o gcc -pthread -shared build/temp.linux-x86_64-2.4/OpenSSL/crypto/crypto.o build/temp.linux-x86_64-2.4/OpenSSL/crypto/x509.o build/temp.linux-x86_64-2.4/OpenSSL/crypto/x509name.o build/temp.linux-x86_64-2.4/OpenSSL/crypto/pkey.o build/temp.linux-x86_64-2.4/OpenSSL/crypto/x509store.o build/temp.linux-x86_64-2.4/OpenSSL/crypto/x509req.o build/temp.linux-x86_64-2.4/OpenSSL/crypto/x509ext.o build/temp.linux-x86_64-2.4/OpenSSL/crypto/pkcs7.o build/temp.linux-x86_64-2.4/OpenSSL/crypto/pkcs12.o build/temp.linux-x86_64-2.4/OpenSSL/crypto/netscape_spki.o build/temp.linux-x86_64-2.4/OpenSSL/crypto/revoked.o build/temp.linux-x86_64-2.4/OpenSSL/crypto/crl.o build/temp.linux-x86_64-2.4/OpenSSL/util.o -lssl -lcrypto -o build/lib.linux-x86_64-2.4/OpenSSL/crypto.so building 'OpenSSL.rand' extension creating build/temp.linux-x86_64-2.4/OpenSSL/rand gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/rand/rand.c -o build/temp.linux-x86_64-2.4/OpenSSL/rand/rand.o gcc -pthread -shared build/temp.linux-x86_64-2.4/OpenSSL/rand/rand.o build/temp.linux-x86_64-2.4/OpenSSL/util.o -lssl -lcrypto -o build/lib.linux-x86_64-2.4/OpenSSL/rand.so building 'OpenSSL.SSL' extension creating build/temp.linux-x86_64-2.4/OpenSSL/ssl gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/ssl/connection.c -o build/temp.linux-x86_64-2.4/OpenSSL/ssl/connection.o gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/ssl/context.c -o build/temp.linux-x86_64-2.4/OpenSSL/ssl/context.o OpenSSL/ssl/context.c:255: warning: ‘global_tlsext_servername_callback’ defined but not used gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c OpenSSL/ssl/ssl.c -o build/temp.linux-x86_64-2.4/OpenSSL/ssl/ssl.o gcc -pthread -shared build/temp.linux-x86_64-2.4/OpenSSL/ssl/connection.o build/temp.linux-x86_64-2.4/OpenSSL/ssl/context.o build/temp.linux-x86_64-2.4/OpenSSL/ssl/ssl.o build/temp.linux-x86_64-2.4/OpenSSL/util.o -lssl -lcrypto -o build/lib.linux-x86_64-2.4/OpenSSL/SSL.so [keshav@jambu pyOpenSSL-0.13]$