Hello, FYI I just pushed a quick and dirty solution to the build failure in
Ubuntu, and now it builds fine with openssl 3.0
--- caml-crush-1.0.12.orig/configure.ac
+++ caml-crush-1.0.12/configure.ac
@@ -705,8 +705,6 @@ then
AC_MSG_ERROR(Cannot find symbol in
openssl library.))
AC_CHECK_LIB(ssl, SSL_connect, OPENSSL_LIB="-lssl",
AC_MSG_ERROR(Cannot find symbol in
openssl library.))
- AC_CHECK_LIB(ssl, SSL_get_peer_certificate,
OPENSSL_LIB="-lssl",
- AC_MSG_ERROR(Cannot find symbol in
openssl library.))
AC_CHECK_LIB(ssl, SSL_get_verify_result,
OPENSSL_LIB="-lssl",
AC_MSG_ERROR(Cannot find symbol in
openssl library.))
AC_CHECK_LIB(ssl, SSL_shutdown, OPENSSL_LIB="-lssl",
--- caml-crush-1.0.12.orig/src/client-lib/modwrap_crpc_ssl.c
+++ caml-crush-1.0.12/src/client-lib/modwrap_crpc_ssl.c
@@ -826,6 +826,10 @@ int start_openssl(int sock)
return -1;
}
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L && !defined
SSL_get_peer_certificate)
+#define SSL_get_peer_certificate(s) SSL_get1_peer_certificate(s)
+#endif
+
/* Obtain the server certificate. */
peercert = SSL_get_peer_certificate(ssl);
if (peercert == NULL) {
It was taken from https://forum.nginx.org/read.php?29,292175
G.
On Wed, 30 Jun 2021 09:22:58 +0100 Thomas Calderon <calderon.tho...@gmail.com>
wrote:
Thanks for the report.
I've been meaning to push an update to fix some other issues with Caml
Crush and recent Ocaml versions.
On Sun, Jun 27, 2021 at 11:45 AM Kurt Roeckx <k...@roeckx.be> wrote:
> Package: caml-crush
> Version: 1.0.10-4
>
> Hi,
>
> Your package is failing to build against OpenSSL 3.0 beta 1. The
> log file show:
> configure:6589: checking for SSL_get_peer_certificate in -lssl
> configure:6614: gcc -o conftest -g -O2
> -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat
> -Werror=format-security -I/usr/lib/ocaml -Wdate-time -D_FORTIFY_SOURCE=2
> -I/usr/lib/ocaml -Wl,-z,relro conftest.c -lssl -lc >&5
> /usr/bin/ld: /tmp/cc4uEWWT.o: in function `main':
> ./build-SERVER/conftest.c:38: undefined reference to
> `SSL_get_peer_certificate'
> collect2: error: ld returned 1 exit status
> configure:6614: $? = 1
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "cam-crush"
> | #define PACKAGE_TARNAME "cam-crush"
> | #define PACKAGE_VERSION "1.0.10"
> | #define PACKAGE_STRING "cam-crush 1.0.10"
> | #define PACKAGE_BUGREPORT ""
> | #define PACKAGE_URL ""
> | #define STDC_HEADERS 1
> | #define HAVE_SYS_TYPES_H 1
> | #define HAVE_SYS_STAT_H 1
> | #define HAVE_STDLIB_H 1
> | #define HAVE_STRING_H 1
> | #define HAVE_MEMORY_H 1
> | #define HAVE_STRINGS_H 1
> | #define HAVE_INTTYPES_H 1
> | #define HAVE_STDINT_H 1
> | #define HAVE_UNISTD_H 1
> | #define HAVE_CAML_MLVALUES_H 1
> | #define HAVE_CAML_CAMLIDLRUNTIME_H 1
> | #define HAVE_DLFCN_H 1
> | #define HAVE_PTHREAD_H 1
> | #define HAVE_RPC_RPC_H 1
> | #define HAVE_RPC_CLNT_H 1
> | #define HAVE_LIBC 1
> | #define HAVE_OPENSSL_SSL_H 1
> | /* end confdefs.h. */
> |
> | /* Override any GCC internal prototype to avoid an error.
> | Use char because int might match the return type of a GCC
> | builtin and then its argument prototype would still apply. */
> | #ifdef __cplusplus
> | extern "C"
> | #endif
> | char SSL_get_peer_certificate ();
> | int
Description: Fix openssl3.0 build failure due to renamed symbol
Author: Gianfranco Costamagna <locutusofb...@debian.org>
Origin: https://forum.nginx.org/read.php?29,292175
Last-Update: 2022-02-18
--- caml-crush-1.0.12.orig/configure.ac
+++ caml-crush-1.0.12/configure.ac
@@ -705,8 +705,6 @@ then
AC_MSG_ERROR(Cannot find symbol in openssl library.))
AC_CHECK_LIB(ssl, SSL_connect, OPENSSL_LIB="-lssl",
AC_MSG_ERROR(Cannot find symbol in openssl library.))
- AC_CHECK_LIB(ssl, SSL_get_peer_certificate, OPENSSL_LIB="-lssl",
- AC_MSG_ERROR(Cannot find symbol in openssl library.))
AC_CHECK_LIB(ssl, SSL_get_verify_result, OPENSSL_LIB="-lssl",
AC_MSG_ERROR(Cannot find symbol in openssl library.))
AC_CHECK_LIB(ssl, SSL_shutdown, OPENSSL_LIB="-lssl",
--- caml-crush-1.0.12.orig/src/client-lib/modwrap_crpc_ssl.c
+++ caml-crush-1.0.12/src/client-lib/modwrap_crpc_ssl.c
@@ -826,6 +826,10 @@ int start_openssl(int sock)
return -1;
}
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L && !defined SSL_get_peer_certificate)
+#define SSL_get_peer_certificate(s) SSL_get1_peer_certificate(s)
+#endif
+
/* Obtain the server certificate. */
peercert = SSL_get_peer_certificate(ssl);
if (peercert == NULL) {