Merge pull request #109 from C4K3/openssl110
authorFelix Morgner <felix.morgner@gmail.com>
Sat, 29 Apr 2017 10:41:15 +0000 (12:41 +0200)
committerGitHub <noreply@github.com>
Sat, 29 Apr 2017 10:41:15 +0000 (12:41 +0200)
Fix error compiling with openssl 1.1.0

configure.ac
src/ssli_openssl.c

index 67716422b78bf84cee22c099c35ecd14b997c319..7664aa4379f3f4f36e1f48eba6d9772b927580b4 100644 (file)
@@ -113,8 +113,8 @@ AS_IF([test "x$with_ssl" = xmbedtls], [
 ])
 AS_IF([test "x$with_ssl" = xopenssl], [
        AC_CHECK_HEADERS([openssl/ssl.h], [], [AC_MSG_ERROR([could not find openssl/ssl.h])])
-       AC_CHECK_LIB([crypto], [BN_init], [], [AC_MSG_ERROR([could not find libcrypto])])
-       AC_CHECK_LIB([ssl], [SSL_library_init], [], [AC_MSG_ERROR([could not find libssl])])
+       AC_CHECK_LIB([crypto], [CRYPTO_new_ex_data], [], [AC_MSG_ERROR([could not find libcrypto])])
+       AC_CHECK_LIB([ssl], [SSL_new], [], [AC_MSG_ERROR([could not find libssl])])
 ])
 AS_IF([test "x$with_ssl" = xgnutls], [
        AC_CHECK_HEADERS([gnutls/gnutls.h], [], [AC_MSG_ERROR([could not find gnutls/gnutls.h])])
index 009119d6280dddda18d0b46d754e029e3970f8f7..8ff1bcf41400c02eaef71e85b0a7463e8aff27dd 100644 (file)
@@ -411,7 +411,7 @@ static int verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
      * it for something special
      */
     if (!preverify_ok && (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT)) {
-           X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, 256);
+           X509_NAME_oneline(X509_get_issuer_name(err_cert), buf, 256);
            Log_warn("issuer= %s", buf);
     }
     return 1;