From owner-svn-ports-all@freebsd.org Wed Jan 13 11:18:29 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 349DC4D8745; Wed, 13 Jan 2021 11:18:29 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DG4gn10lpz4Vq2; Wed, 13 Jan 2021 11:18:29 +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 1100116756; Wed, 13 Jan 2021 11:18:29 +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 10DBISZg014047; Wed, 13 Jan 2021 11:18:28 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 10DBIShi014046; Wed, 13 Jan 2021 11:18:28 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <202101131118.10DBIShi014046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Wed, 13 Jan 2021 11:18:28 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r561456 - in head/net/stone: . files X-SVN-Group: ports-head X-SVN-Commit-Author: danfe X-SVN-Commit-Paths: in head/net/stone: . files X-SVN-Commit-Revision: 561456 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: Wed, 13 Jan 2021 11:18:29 -0000 Author: danfe Date: Wed Jan 13 11:18:28 2021 New Revision: 561456 URL: https://svnweb.freebsd.org/changeset/ports/561456 Log: Unbreak the build against contemporary versions of OpenSSL. PR: 251783 Added: head/net/stone/files/patch-stone.c (contents, props changed) Modified: head/net/stone/Makefile Modified: head/net/stone/Makefile ============================================================================== --- head/net/stone/Makefile Wed Jan 13 10:55:06 2021 (r561455) +++ head/net/stone/Makefile Wed Jan 13 11:18:28 2021 (r561456) @@ -31,11 +31,6 @@ MAKE_ARGS= SSL_FLAGS="-DUSE_SSL -I${OPENSSLINC}" \ SSL_LIBS="-L${OPENSSLLIB} -lssl -lcrypto" LIBS="-DUNIX_DAEMON" .endif -.if ${SSL_DEFAULT} == base -BROKEN_FreeBSD_12= incomplete definition of type 'struct ssl_session_st' -BROKEN_FreeBSD_13= incomplete definition of type 'struct ssl_session_st' -.endif - post-patch: @${REINPLACE_CMD} -e '/^CFLAGS/d' ${WRKSRC}/${MAKEFILE} Added: head/net/stone/files/patch-stone.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/stone/files/patch-stone.c Wed Jan 13 11:18:28 2021 (r561456) @@ -0,0 +1,58 @@ +--- stone.c.orig 2008-02-04 23:00:00 UTC ++++ stone.c +@@ -2452,15 +2452,16 @@ int modPairDest(Pair *p1, struct sockaddr *dst, sockle + unsigned char **match; + if (Debug > 2) { + char str[SSL_MAX_SSL_SESSION_ID_LENGTH * 2 + 1]; +- int len = sess->session_id_length; ++ const unsigned char *sid; unsigned len; ++ sid = SSL_SESSION_get_id(sess, &len); + int i; + if (len > SSL_MAX_SSL_SESSION_ID_LENGTH) + len = SSL_MAX_SSL_SESSION_ID_LENGTH; + for (i=0; i < len; i++) +- sprintf(&str[i*2], "%02x", sess->session_id[i]); ++ sprintf(&str[i*2], "%02x", sid[i]); + str[i*2] = '\0'; + message(LOG_DEBUG, "%d TCP %d: SSL session ID=%s len=%d", +- p2->stone->sd, p2->sd, str, sess->session_id_length); ++ p2->stone->sd, p2->sd, str, len); + } + match = SSL_SESSION_get_ex_data(sess, MatchIndex); + if (match && p2->stone->ssl_server) { +@@ -3265,7 +3266,7 @@ int doSSL_accept(Pair *pair) { + if (Debug > 7) + message(LOG_DEBUG, "%d TCP %d: SSL_accept ret=%d, state=%x, " + "finished=%x, in_init=%x/%x", pair->stone->sd, +- sd, ret, SSL_state(ssl), SSL_is_init_finished(ssl), ++ sd, ret, SSL_get_state(ssl), SSL_is_init_finished(ssl), + SSL_in_init(ssl), SSL_in_accept_init(ssl)); + if (ret > 0) { /* success */ + if (SSL_in_accept_init(ssl)) { +@@ -8875,7 +8876,7 @@ void sslopts_default(SSLOpts *opts, int isserver) { + opts->meth = SSLv23_server_method(); + #elif !defined(OPENSSL_NO_SSL3) + opts->meth = SSLv3_server_method(); +-#elif !defined(OPENSSL_NO_SSL2) ++#elif !defined(OPENSSL_NO_SSL2) && OPENSSL_VERSION_NUMBER < 0x10100000L + opts->meth = SSLv2_server_method(); + #endif + } else { +@@ -8885,7 +8886,7 @@ void sslopts_default(SSLOpts *opts, int isserver) { + opts->meth = SSLv23_client_method(); + #elif !defined(OPENSSL_NO_SSL3) + opts->meth = SSLv3_client_method(); +-#elif !defined(OPENSSL_NO_SSL2) ++#elif !defined(OPENSSL_NO_SSL2) && OPENSSL_VERSION_NUMBER < 0x10100000L + opts->meth = SSLv2_client_method(); + #endif + } +@@ -8976,7 +8977,7 @@ int sslopts(int argc, int argi, char *argv[], SSLOpts + if (isserver) opts->meth = SSLv3_server_method(); + else opts->meth = SSLv3_client_method(); + #endif +-#ifndef OPENSSL_NO_SSL2 ++#if !defined(OPENSSL_NO_SSL2) && OPENSSL_VERSION_NUMBER < 0x10100000L + } else if (!strcmp(argv[argi], "ssl2")) { + if (isserver) opts->meth = SSLv2_server_method(); + else opts->meth = SSLv2_client_method();