OpenSSL in Python (move to variant?)

Adam Mercer ram at macports.org
Sun Nov 27 09:22:48 PST 2011


On Sun, Nov 27, 2011 at 04:39, Joshua Root <jmr at macports.org> wrote:

> How does the difficulty of converting OpenSSL-using code to CommonCrypto
> compare to GnuTLS or NSS?

I believe CommonCrypto provides an OpenSSL compatibile API; for
example, if you're using the MD5...() routines from OpenSSL, defined
in openssl/md5.h, if you have the following:

#if defined(__APPLE__)
#define COMMON_DIGEST_FOR_OPENSSL
#include <CommonCrypto/CommonDigest.h>
#define MD5 CC_MD5
#else
#include <openssl/md5.h>
#endif

then the above will cause you to use CommonCrypto instead?

Cheers

Adam

PS: I haven't tested this. But something like this came up at work and
this was the offered solution.


More information about the macports-dev mailing list