From nobody Thu May 25 16:22:06 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 4QRtcG2VYPz4V9XK; Thu, 25 May 2023 16:22:06 +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 4QRtcG22jzz3MBB; Thu, 25 May 2023 16:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685031726; 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=cbpQ6kaqXY+WWayoX4aFUIbGWLc+tDXTRGEBs5Px46s=; b=r+cFGs/lrqAIR7HD2jZo4rSTs7YePIRiDXhU4aAwacqYe2Ze4FHCQ7TqtHDnPN4tHzc5bs ap3RucJ71MB3iFvt1U+BnoVY/smZQK3qYqs18guXmEdMu+gbN1rIup4GPLRblxpSiH7Ewz L6lBhE68fR2Z961h6Ff1wv1Z1HM9xjPR6IU/MkHsPmePxXRoeaSU0DnHlMgS23aPc3Y0L4 Ct5STTIAEfok6obv0bofCZcNa9yZ178R8R0cuWZ1pcdOdhNas7AwgIWpe22zTwZ7AxpDok DbDIbcjJ24dm17QOzL0FXt7clRtx7vRRCEsrcFIrlElLq6PbZGVbbCJDmbOmZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685031726; 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=cbpQ6kaqXY+WWayoX4aFUIbGWLc+tDXTRGEBs5Px46s=; b=irPTPiaqbulZpRqYTVp22tnTNZs7ADoJPc9qf0zQvJDCMOcXkLHC7n7L5P2zY33CFCDg6t DhLS/G8OWy9Yjcx8ynF+gQMa5wdEX2CAMYlttWtHWsjPX78I9OJhBtTi1uvVCUSLSCsrnX 6dwojih2cQgKSekIhjvj4BhtIsdGxL5x6UKBThXWHvvA9tUPBRcfk0jIRxZU5juC69rxVO jjKkW9iW+TsAY5HF1gCs3VvGae1uAc4RnyrWfLf1exJlLhrDIrmrCgl1s901e6fq3tbR7B oznHEPmnQYyBteRS7R6rwd+WHOzJ38skmq+NHOmZKsMx3cpW3LrsB3zcvdMUPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685031726; a=rsa-sha256; cv=none; b=i/PR4mMpQ3Tv0jFmieM3pUjejmvhPwGbGFwfZR0H99+DtXQQTE7iyQ0OZ9iLqeejrJUfxC dUwZg/7Yr1n1FTym1wROYSNBTuHVQdIFIyoPodJBxG9OWQt6FpFKcpqe1jPG+RnkPLFlHZ ThZ34S2wtSxUZpHBG9Kc4kw8ryIVX5gVo0MCuXFw5BJoECCuO0bPUOG2jGzbpYoDiQNSjn yFiRTiy3b/jFb74GLvPUxALN2amAl7H+CENyQhFivwt7HGVPZhDr5n4tKmZweRswe5/S8o JSFpKsKV4NMOEHD7AI8dKXdVOt5A6e2SLxg475zUnAx4YWy8DvS1o4dBPVWjMA== 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 4QRtcG160rzWvx; Thu, 25 May 2023 16:22:06 +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 34PGM6qU060354; Thu, 25 May 2023 16:22:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34PGM6mN060353; Thu, 25 May 2023 16:22:06 GMT (envelope-from git) Date: Thu, 25 May 2023 16:22:06 GMT Message-Id: <202305251622.34PGM6mN060353@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: 01aee8c92d93 - main - libfetch: do not call 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: 01aee8c92d936470c44821736e0d9e11ed7ce812 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=01aee8c92d936470c44821736e0d9e11ed7ce812 commit 01aee8c92d936470c44821736e0d9e11ed7ce812 Author: Ed Maste AuthorDate: 2023-05-25 15:24:48 +0000 Commit: Ed Maste CommitDate: 2023-05-25 16:20:15 +0000 libfetch: do not call 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. PR: 271615 Reviewed by: Pierre Pronchery Event: Kitchener-Waterloo Hackathon 202305 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40265 --- lib/libfetch/common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index 7bf487b0db1d..f2122d7f45c9 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -1204,6 +1204,7 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) X509_NAME *name; char *str; +#if OPENSSL_VERSION_NUMBER < 0x10100000L /* Init the SSL library and context */ if (!SSL_library_init()){ fprintf(stderr, "SSL library init failed\n"); @@ -1211,6 +1212,7 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) } SSL_load_error_strings(); +#endif conn->ssl_meth = SSLv23_client_method(); conn->ssl_ctx = SSL_CTX_new(conn->ssl_meth);