LibreSSL currently does not support CMS, so checking for CMS via
OPENSSL_VERSION_NUMBER isn't reliable. Detect CMS support via
autoconf instead.
[ghudson@mit.edu: clarified commit message; minor style changes]
ticket: 7993 (new)
target_version: 1.13
tags: pullup
builtin|openssl)
AC_CHECK_LIB(crypto, PKCS7_get_signer_info, PKINIT_CRYPTO_IMPL_LIBS=-lcrypto)
PKINIT_CRYPTO_IMPL=openssl
+ AC_CHECK_LIB(crypto, CMS_get0_content,
+ [AC_DEFINE([HAVE_OPENSSL_CMS], 1,
+ [Define if OpenSSL supports cms.])])
;;
nss)
if test "${PKINIT_CRYPTO_IMPL_CFLAGS+set}" != set; then
pkinit_pkcs11_code_to_text(int err);
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
-/* Use CMS support present in OpenSSL 1.0 and later. */
+#ifdef HAVE_OPENSSL_CMS
+/* Use CMS support present in OpenSSL. */
#include <openssl/cms.h>
#define pkinit_CMS_get0_content_signed(_cms) CMS_get0_content(_cms)
#define pkinit_CMS_get0_content_data(_cms) CMS_get0_content(_cms)