From nobody Fri May 26 13:21:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QSQYs4xVyz4Wk78; Fri, 26 May 2023 13:21:53 +0000 (UTC) (envelope-from git@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 4QSQYs0zmKz3PPN; Fri, 26 May 2023 13:21:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685107313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R/tREswVPR8lNWY2RqtEeZubrmXtFIalQDRR1IJqsSE=; b=ovyLlsHeCa/mrjrSsyzfgorJgwtDL3IABfZH4LPlx0QrAeA5Dje8ZwV6hXhnc5rtnincG9 83xASTtH/HK+DwzglO+h+tD5jNF4uNGp4cSn6XuCsSD7fN4HsEUtxtj03oEOdRnnN7LJWp nA5FBHhr/sdF84JrIXRUSyLSavHb8RFrTneEBgVnD1C/RemZtsybnWd9rwvPoQvDHhj8qA jA3d1X6ttPAwsOTtFp+VsIlZQJHES2q+++PB0ej32oszlk5j7PUUFKKfAsZoG9j5dTWYMU 7/HtxHR7wYhjySsTGIJd08a6ozZNyp41yKbEctCQ58o9HFHNVkiARiWf3oCn/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685107313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R/tREswVPR8lNWY2RqtEeZubrmXtFIalQDRR1IJqsSE=; b=TFxhM+cI377omI/eHtgyWb7KdQquxHztKTKd85imKzBa+ATcceUqP7sVAp9T4LLKOrvBUa QsU77DJE0Hodm/K8DatasQOdVN9tfRA8lIvkPMPS4QS7qEOvIep+vKBGeO6mwO9t89AhO1 gIWlL1Dl5yB/e39wLOqJKWLB8PHfcx9dXqZl1Mwe44dCNZUF4lHlNOjdAY4AwNNeX1Yhwl RsM8y9D7mCMQlJktzpnle3LFJ5/Evq2mfnEeNz8cVR2uCdtLhH+eIkv3XgL2SBS47nyr9i A09PI5gFBolGSKDT5Epnd7RpLll01RY1ce8Su17EfR2aoJNdbCHyvtiS88TZ/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685107313; a=rsa-sha256; cv=none; b=uHT9Ob6r2TKykDO9M8umwQPLV4wFSwS9hdPAxMEyioC92CY6y7lpbOiM5Bi8Qj00iDO6Er ZCTw1f8+jhrRWtZb2kQRCQoj8p2D3+p3rQiosV0rhm5VtOoEOCwIkfpqE1h/DR/guxV+RX GFCZaSi2d3HoKCtCg4rNdNcvyihrMjIhU0fV+BrXHGT3F7gnF5IAX/iTHW1KUDlUeUlv3P n4ob1akIxtgjRALmAmJ5h8kcssvnQMmU2rMVaVW7xNt2DikA1gSF8y8VIQ4Zwe7ilGzN4Y rR8K/Bg/N6s9XgSjuc6iEJnLn7ze0mwOVTkYoZdnk8/1Vywc1JBqXAYpsJzOLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QSQYs046Sz17f8; Fri, 26 May 2023 13:21:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34QDLqx9034235; Fri, 26 May 2023 13:21:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34QDLqiT034234; Fri, 26 May 2023 13:21:52 GMT (envelope-from git) Date: Fri, 26 May 2023 13:21:52 GMT Message-Id: <202305261321.34QDLqiT034234@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: b01c10d25d06 - main - auditdistd: Avoid calling deprecated OpenSSL functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b01c10d25d06047e45c3d5dc6a4e757a9b35ab78 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b01c10d25d06047e45c3d5dc6a4e757a9b35ab78 commit b01c10d25d06047e45c3d5dc6a4e757a9b35ab78 Author: Ed Maste AuthorDate: 2023-05-25 19:17:13 +0000 Commit: Ed Maste CommitDate: 2023-05-26 13:15:25 +0000 auditdistd: Avoid calling deprecated OpenSSL functions As of OpenSSL 1.1 SSL_library_init() and SSL_load_error_strings() are deprecated. There are replacement initialization functions but they do not need to be called: "As of version 1.1.0 OpenSSL will automatically allocate all resources that it needs so no explicit initialisation is required." Wrap both calls in an OPENSSL_VERSION_NUMBER block. Upstream pull request submitted at https://github.com/openbsm/openbsm/pull/82 PR: 271615 Reviewed by: ngie Event: Kitchener-Waterloo Hackathon 202305 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40273 --- contrib/openbsm/bin/auditdistd/proto_tls.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/openbsm/bin/auditdistd/proto_tls.c b/contrib/openbsm/bin/auditdistd/proto_tls.c index 31673084d5b5..4de2bbd9f9fa 100644 --- a/contrib/openbsm/bin/auditdistd/proto_tls.c +++ b/contrib/openbsm/bin/auditdistd/proto_tls.c @@ -371,8 +371,10 @@ tls_exec_client(const char *user, int startfd, const char *srcaddr, if (proto_connect(saddr, daddr, timeout, &tcp) == -1) exit(EX_TEMPFAIL); +#if OPENSSL_VERSION_NUMBER < 0x10100000L SSL_load_error_strings(); SSL_library_init(); +#endif /* * TODO: On FreeBSD we could move this below sandbox() once libc and @@ -663,8 +665,10 @@ tls_exec_server(const char *user, int startfd, const char *privkey, sockfd = startfd; tcpfd = startfd + 1; +#if OPENSSL_VERSION_NUMBER < 0x10100000L SSL_load_error_strings(); SSL_library_init(); +#endif sslctx = SSL_CTX_new(TLS_server_method()); if (sslctx == NULL)