Compiling one of my source files on Mac OS X10.7 and getting these deprecation warnings:
xxx_evp.c:135:5: 'EVP_MD_CTX_init' is deprecated
xxx_evp.c:137:9: 'EVP_DigestInit_ex' is deprecated
xxx_evp.c:177:9: 'EVP_DigestUpdate' is deprecated
xxx_evp.c:227:13: 'EVP_DigestFinal_ex' is deprecated
xxx_evp.c:235:5: 'EVP_MD_CTX_cleanup' is deprecated
I had another set of OpenSSL deprecation warnings where I was using MD5 functions from openssl/md5.h and was able to switch to a CommonCrypto version of the OpenSSL calls like this:
#if defined(__APPLE__)
# define COMMON_DIGEST_FOR_OPENSSL
# include <CommonCrypto/CommonDigest.h>
#else
# include <openssl/md5.h>
#endif
But I can’t find anything offhand about any kind of OpenSSL compatibility related to these EVP_* calls. Is there something similar I can do to get “free” compatibility support on OS X 10.7 for these OpenSSL EVP_* calls?
I looked in the CommonCrypto headers files in
/usr/include/CommonCrypto/and the only one that notes any OpenSSL compatibility isCommonDigest.h. When the#definesymbolCOMMON_DIGEST_FOR_OPENSSLis defined before this header file is included your code, then the following classes of OpenSSL functions are mapped to their CommonCrypto equivalents:MD2_xxx,MD4_xxxandMD5_xxxSHA_xxx,SHA1_xxx,SHA224_xxx,SHA256_xxx,SHA384_xxxandSHA512_xxxThere does not appear to be any such mapping of the OpenSSL EVP_xxx functions, at least provided as part of CommonCrypto.