Skip to content

Commit c714132

Browse files
committed
fix: Changed OpenSSL check inside configure.am
In OpenSSL 1.1.0 the `EVP_MD_CTX_create()` and `EVP_MD_CTX_destroy()` functions were renamed to `EVP_MD_CTX_new()` and `EVP_MD_CTX_free()`. Because a check for `EVP_MD_CTX_create()` was in place inside configure.am, building with newer OpenSSL versions could not be done. Checking for `EVP_MD_CTX_create` function from configure.am was replaced with a check for `CRYPTO_new_ex_data()` function. Because a [compatibility layer][1] was introduced in OpenSSL 1.1.0, no code changes are necessary. Fixes: vstakhov#203 [1]: https://github.com/openssl/openssl/blob/OpenSSL_1_1_0/include/openssl/evp.h#L500-L502
1 parent ac5b370 commit c714132

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

configure.ac

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ AC_ARG_ENABLE([utils],
7373
AM_CONDITIONAL([UTILS], [test x$utils = xtrue])
7474

7575
AS_IF([test "x$enable_signatures" = "xyes"], [
76-
AC_SEARCH_LIBS([EVP_MD_CTX_create], [crypto], [
76+
AC_SEARCH_LIBS([CRYPTO_new_ex_data], [crypto], [
7777
AC_DEFINE(HAVE_OPENSSL, 1, [Define to 1 if you have the 'crypto' library (-lcrypto).])
7878
LIBCRYPTO_LIB="-lcrypto"
7979
LIBS_EXTRA="${LIBS_EXTRA} -lcrypto"
80-
], [AC_MSG_ERROR([unable to find the EVP_MD_CTX_create() function])])
80+
], [AC_MSG_ERROR([unable to find the CRYPTO_new_ex_data() function])])
8181
])
8282
AC_SUBST(LIBCRYPTO_LIB)
8383
AC_PATH_PROG(PANDOC, pandoc, [/non/existent])

0 commit comments

Comments
 (0)