From owner-svn-ports-all@freebsd.org Mon Mar 15 07:20:57 2021 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 329A7572FBB; Mon, 15 Mar 2021 07:20:57 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DzSWY0b8Nz4Rlf; Mon, 15 Mar 2021 07:20:57 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 078BE4980; Mon, 15 Mar 2021 07:20:57 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 12F7KuNG050444; Mon, 15 Mar 2021 07:20:56 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 12F7KuMQ050442; Mon, 15 Mar 2021 07:20:56 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <202103150720.12F7KuMQ050442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Mon, 15 Mar 2021 07:20:56 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r568438 - in head/net/gsk: . files X-SVN-Group: ports-head X-SVN-Commit-Author: danfe X-SVN-Commit-Paths: in head/net/gsk: . files X-SVN-Commit-Revision: 568438 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2021 07:20:57 -0000 Author: danfe Date: Mon Mar 15 07:20:56 2021 New Revision: 568438 URL: https://svnweb.freebsd.org/changeset/ports/568438 Log: Unbreak the build against contemporary OpenSSL versions by converting to the new BIO_*() API. Added: head/net/gsk/files/patch-src_ssl_gskopensslbiostream.c (contents, props changed) Modified: head/net/gsk/Makefile Modified: head/net/gsk/Makefile ============================================================================== --- head/net/gsk/Makefile Mon Mar 15 07:19:12 2021 (r568437) +++ head/net/gsk/Makefile Mon Mar 15 07:20:56 2021 (r568438) @@ -26,13 +26,6 @@ LDFLAGS+= -L${OPENSSLLIB} OPTIONS_DEFINE= DOCS -.include - -.if ${SSL_DEFAULT} == base -BROKEN_FreeBSD_12= incomplete definition of type 'struct bio_st' -BROKEN_FreeBSD_13= incomplete definition of type 'struct bio_st' -.endif - post-patch: @${REINPLACE_CMD} -e \ '/^SUBDIRS/s|doc||' ${WRKSRC}/Makefile.in @@ -47,4 +40,4 @@ post-install-DOCS-on: ${INSTALL_DATA} ${WRKSRC}/doc/html/*.html ${STAGEDIR}${DOCSDIR}/html ${INSTALL_DATA} ${WRKSRC}/doc/html/*.png ${STAGEDIR}${DOCSDIR}/html -.include +.include Added: head/net/gsk/files/patch-src_ssl_gskopensslbiostream.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/gsk/files/patch-src_ssl_gskopensslbiostream.c Mon Mar 15 07:20:56 2021 (r568438) @@ -0,0 +1,84 @@ +--- src/ssl/gskopensslbiostream.c.orig 2006-05-17 18:39:31 UTC ++++ src/ssl/gskopensslbiostream.c +@@ -106,7 +106,7 @@ bio_gsk_stream_pair_bwrite (BIO *bio, + const char *out, + int length) + { +- GskBufferStream *buffer_stream = GSK_BUFFER_STREAM (bio->ptr); ++ GskBufferStream *buffer_stream = GSK_BUFFER_STREAM (BIO_get_data(bio)); + DEBUG_BIO("bio_gsk_stream_pair_bwrite: writing %d bytes to read-buffer of backend", length); + gsk_buffer_append (gsk_buffer_stream_peek_read_buffer (buffer_stream), out, length); + gsk_buffer_stream_read_buffer_changed (buffer_stream); +@@ -118,7 +118,7 @@ bio_gsk_stream_pair_bread (BIO *bio, + char *in, + int max_length) + { +- GskBufferStream *buffer_stream = GSK_BUFFER_STREAM (bio->ptr); ++ GskBufferStream *buffer_stream = GSK_BUFFER_STREAM (BIO_get_data(bio)); + guint length = gsk_buffer_read (gsk_buffer_stream_peek_write_buffer (buffer_stream), in, max_length); + DEBUG_BIO("bio_gsk_stream_pair_bread: read %u bytes of %d bytes from backend write buffer", length, max_length); + if (length > 0) +@@ -132,7 +132,7 @@ bio_gsk_stream_pair_ctrl (BIO *bio, + long num, + void *ptr) + { +- GskBufferStreamOpenssl *openssl_buffer_stream = GSK_BUFFER_STREAM_OPENSSL (bio->ptr); ++ GskBufferStreamOpenssl *openssl_buffer_stream = GSK_BUFFER_STREAM_OPENSSL (BIO_get_data(bio)); + g_assert (openssl_buffer_stream->bio == bio); + + DEBUG_BIO("bio_gsk_stream_pair_ctrl: called with cmd=%d", cmd); +@@ -161,27 +161,26 @@ bio_gsk_stream_pair_create (BIO *bio) + static int + bio_gsk_stream_pair_destroy (BIO *bio) + { +- GskBufferStream *buffer_stream = GSK_BUFFER_STREAM (bio->ptr); ++ GskBufferStream *buffer_stream = GSK_BUFFER_STREAM (BIO_get_data(bio)); + DEBUG_BIO("bio_gsk_stream_pair_destroy (%p)", bio); + if (buffer_stream == NULL) + return FALSE; + g_object_unref (buffer_stream); +- bio->ptr = NULL; ++ BIO_set_data(bio, NULL); + return TRUE; + } + +-static BIO_METHOD bio_method_gsk_stream_pair = ++static BIO_METHOD *bio_method_gsk_stream_pair = NULL; ++ ++static BIO_METHOD *create_bio_method_gsk_stream_pair(void) + { +- 22, /* type: this is quite a hack */ +- "GskStream-BIO", /* name */ +- bio_gsk_stream_pair_bwrite, /* bwrite */ +- bio_gsk_stream_pair_bread, /* bread */ +- NULL, /* bputs */ +- NULL, /* bgets */ +- bio_gsk_stream_pair_ctrl, /* ctrl */ +- bio_gsk_stream_pair_create, /* create */ +- bio_gsk_stream_pair_destroy, /* destroy */ +- NULL /* callback_ctrl */ ++ BIO_METHOD *bm = BIO_meth_new(BIO_get_new_index(), "GskStream-BIO"); ++ BIO_meth_set_write(bm, bio_gsk_stream_pair_bwrite); ++ BIO_meth_set_read(bm, bio_gsk_stream_pair_bread); ++ BIO_meth_set_ctrl(bm, bio_gsk_stream_pair_ctrl); ++ BIO_meth_set_create(bm, bio_gsk_stream_pair_create); ++ BIO_meth_set_destroy(bm, bio_gsk_stream_pair_destroy); ++ return bm; + }; + + +@@ -207,9 +206,11 @@ gsk_openssl_bio_stream_pair (BIO **bio_ou + { + GskBufferStreamOpenssl *openssl_stream = g_object_new (GSK_TYPE_BUFFER_STREAM_OPENSSL, NULL); + GskStream *stream = GSK_STREAM (openssl_stream); +- *bio_out = BIO_new (&bio_method_gsk_stream_pair); +- (*bio_out)->ptr = g_object_ref (stream); +- (*bio_out)->init = TRUE; /// HMM... ++ if (bio_method_gsk_stream_pair == NULL) ++ bio_method_gsk_stream_pair = create_bio_method_gsk_stream_pair(); ++ *bio_out = BIO_new (bio_method_gsk_stream_pair); ++ BIO_set_data(*bio_out, g_object_ref (stream)); ++ BIO_set_init(*bio_out, TRUE); /// HMM... + *stream_out = GSK_BUFFER_STREAM (stream); + openssl_stream->bio = *bio_out; + return TRUE;