#13 pyOpenSSL doesn't build with OpenSSL 0.9.8 / VC7.1

closed-fixed
nobody
None
5
2008-03-12
2005-08-03
No

pyOpenSSL does build fine with VC6 and OpenSSL 0.9.8.

However if you try to create a Windows build for Python
2.4 which requires using VC7.1 (.NET 2003), you get
lots of errors when compiling connection.c.

The fix is easy, albeit a hack and not a real solution:

Edit the file src\ssl\x509name.h:

"""
#define crypto_X509Name_Check(v) ((v)->ob_type ==
&crypto_X509Name_Type)

/* Fix needed to compile pyOpenSSL with VC7.1: */
#ifdef OPENSSL_SYS_WIN32
/* Under Win32 these are defined in wincrypt.h */
#undef X509_NAME
#undef X509_CERT_PAIR
#endif

typedef struct {
"""

With this fix, pyOpenSSL builds against Py2.4. I'm not
sure whether this is due to how pyOpenSSL includes the
OpenSSL header files, but it looks like this is the
cause of the problem.

Perhaps including OpenSSL *before* Python.h would help
- not sure, haven't tested it.

Another hint: you can easily build Windows installers
using the following commands:

set SSL=..\openssl-0.9.8
python setup.py build_ext -I %SSL%\inc32 -L
%SSL%\out32dll bdist_wininst -c -o

Discussion

  • Jp Calderone

    Jp Calderone - 2008-03-12

    Logged In: YES
    user_id=366566
    Originator: NO

    Compilation works with MSVC7.1 now (as well as mingw32).

     
  • Jp Calderone

    Jp Calderone - 2008-03-12
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks