Can't compile M2Crypto

Ng Pheng Siong ngps at
Mon Oct 1 17:39:25 CEST 2001

According to Florent <greenpenguinNOSPAM at>:
> I have installed from the source Python-1.5.2, SWIG-1.3.6 and
> openssl-0.9.6b.

I think you're picking up the wrong OpenSSL on your system.

> _m2crypto_wrap.c:1264: warning: passing arg 2 of `HMAC_Update' discards
> qualifiers from pointer target type

Here's what 0.9.4's HMAC_Update looks like:

    $ egrep HMAC_Update /usr/include/openssl/hmac.h
    void HMAC_Update(HMAC_CTX *ctx,unsigned char *key, int len);

Here's what 0.9.6's looks like:

    $ egrep HMAC_Update /usr/local/include/openssl/hmac.h
    void HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, int len);

> _m2crypto_wrap.c:1635: conflicting types for `DHparams_print'
> /usr/include/openssl/dh.h:132: previous declaration of `DHparams_print'

The OpenSSL you're linking with is probably built without -DBIO.

> _m2crypto_wrap.c:2678: `SSL_MODE_AUTO_RETRY' undeclared (first use in this
> function)

SSL_MODE_AUTO_RETRY is new in 0.9.6. 0.9.4 doesn't have it.

Check that you are indeed using the correct OpenSSL includes and libraries.

Ng Pheng Siong <ngps at> *

More information about the Python-list mailing list