On Sat, Jul 24, 2021 at 07:26:53PM +0100, Stuart Henderson wrote:
> any salt users around who can test this?
The regress/lib/libssl/tlsfuzzer tests exercise M2Crypto quite well.
They pass.
ok tb
with one comment below.
> Index: patches/patch-src_SWIG__bio_i
> ===================================================================
> RCS file: patches/patch-src_SWIG__bio_i
> diff -N patches/patch-src_SWIG__bio_i
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_SWIG__bio_i 24 Jul 2021 18:25:28 -0000
> @@ -0,0 +1,34 @@
> +$OpenBSD: patch-SWIG__bio_i,v 1.4 2018/04/25 16:51:05 jasper Exp $
> +
> +BIO_meth_new() and BIO_meth_free() are non-static in LibreSSL
The patch description makes no sense to me.
Presumably the patch itself is a leftover from before we had BIO_meth
stuff. I think it should be dropped: we should be using libcrypto's
version, not a reimplementation.
> +
> +Index: src/SWIG/_bio.i
> +--- src/SWIG/_bio.i.orig
> ++++ src/SWIG/_bio.i
> +@@ -293,8 +293,12 @@ int bio_should_write(BIO* a) {
> + }
> +
> + /* Macros for things not defined before 1.1.0 */
> +-#if OPENSSL_VERSION_NUMBER < 0x10100000L
> +-static BIO_METHOD *
> ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
> ++
> ++#if !defined(LIBRESSL_VERSION_NUMBER)
> ++static
> ++#endif
> ++BIO_METHOD *
> + BIO_meth_new( int type, const char *name )
> + {
> + BIO_METHOD *method = malloc( sizeof(BIO_METHOD) );
> +@@ -306,7 +310,10 @@ BIO_meth_new( int type, const char *name )
> + return method;
> + }
> +
> +-static void
> ++#if !defined(LIBRESSL_VERSION_NUMBER)
> ++static
> ++#endif
> ++void
> + BIO_meth_free( BIO_METHOD *meth )
> + {
> + if ( meth == NULL ) {