From nobody Sat Jun 24 01:45:19 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 4Qnxkl4lgnz4hJxv; Sat, 24 Jun 2023 01:45:19 +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 4Qnxkl4FCHz3hXh; Sat, 24 Jun 2023 01:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687571119; 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=gfA2Xf6915SukldxUjZfB3uIT9i98InStohRLsJNmgs=; b=OzAy7GwuqCZStvJZNhiizRMJVZwd+1bSGBBjvxnEZ7Ve9a7MEgxvAS5jQdfsZ5MIJX44G4 uv/LMoiJnTzkCKbMyQCgsrjuifEXMlVb+LeBohew2Hpmhy0B+IW88++VW5O5ABP32qdeFI D6Ug5rFWxkapaWgl5FPZp/YmxTqhcZDQkMvBLYbBtyvwktGdERzxfk5d5cES5DPFtU7Ly8 0fLuDuH6WwMt3Nnm6cIrniiPsiwDDnzVEDoNxwPmF+pkWfHuh5PDmiZnZf7Hllgq+Sx6np 13olwsMybHYndrXQ9ybbieZXscYqyXhiMoyKHGTsPFHYIw2lTj3DyMOIlKuKZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687571119; 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=gfA2Xf6915SukldxUjZfB3uIT9i98InStohRLsJNmgs=; b=xCbSZj5SorIGPZV5yzOfwuiTX66d85NYZSWrCQu4WvwMHbB+q8qhOBn2W8U77QpLNQ1J/b KQAV7nwMaVzm3MlsLax8k9sblMqyyKM/ZYHmMlo0ddOcC9LgMeNCBcvOnTsTbctvWXDqSl nO9oNFij8k/qlT5vxxvbaDP8VxdTRA481rjhH2uqSciHqsQH4UV2Rkh+WDfEfhRrZBfRdz QWhrocCGhkhdXL87eKGN6E7CHXtqUl6wEHQ/6UugyU9Q7XgYMq0GBaUm9WOSxchZraD3qC xNiEq20SiJ3Vr5scb8I+h7MehxdPzWP4vaUzvCXO4S0U4RTodx0kGTOY+W80wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687571119; a=rsa-sha256; cv=none; b=G3g7XwOJ5UFQVZkvCG9MwrgC96xTQxOTCmP/ZofFy8xdixjd2pa+02nOHNDiYPdxLzM1mk Gsvzd7a/fUBwVXuR6xsm8vTe0GRR1B2Zfs7i6KsBStt733Covp3qkKKbCq0busBY1/rveY 5ClfyfYi5gKlIHBlnbgnOm06vNJE7JvWhsrymv/n8sJTEtI99lz7hdGsDsAb7v3faBG6gA /KLkhCqvBAJto7XIIdt/NWfB/lI33/mUqhleLu0FDjs3Xy43ZoGOFvirlOnbKMnI9UIocj khuIVNQf3a+RYtqTxv/+H+P9LapMQZIKkHKNNfpeZfyjq9nwCl6GYwtejHlT4w== 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 4Qnxkl3JkzzS1b; Sat, 24 Jun 2023 01:45:19 +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 35O1jJwI090069; Sat, 24 Jun 2023 01:45:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35O1jJaD090068; Sat, 24 Jun 2023 01:45:19 GMT (envelope-from git) Date: Sat, 24 Jun 2023 01:45:19 GMT Message-Id: <202306240145.35O1jJaD090068@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: bc1027a77851 - main - libfetch: remove all old OpenSSL support 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc1027a7785166fde9c2a3b48e6e70d198377d4b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=bc1027a7785166fde9c2a3b48e6e70d198377d4b commit bc1027a7785166fde9c2a3b48e6e70d198377d4b Author: Enji Cooper AuthorDate: 2023-06-22 03:53:54 +0000 Commit: Enji Cooper CommitDate: 2023-06-24 08:45:02 +0000 libfetch: remove all old OpenSSL support This change removes pre-OpenSSL 1.1 supporting code and removes/adjusted preprocessor conditionals which were tautilogically true as FreeBSD main has shipped with OpenSSL 1.1+ for some time. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40711 --- lib/libfetch/common.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index f2122d7f45c9..8f3f1c5db30f 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -950,24 +950,8 @@ fetch_ssl_verify_altname(STACK_OF(GENERAL_NAME) *altnames, const char *ns; for (i = 0; i < sk_GENERAL_NAME_num(altnames); ++i) { -#if OPENSSL_VERSION_NUMBER < 0x10000000L - /* - * This is a workaround, since the following line causes - * alignment issues in clang: - * name = sk_GENERAL_NAME_value(altnames, i); - * OpenSSL explicitly warns not to use those macros - * directly, but there isn't much choice (and there - * shouldn't be any ill side effects) - */ - name = (GENERAL_NAME *)SKM_sk_value(void, altnames, i); -#else name = sk_GENERAL_NAME_value(altnames, i); -#endif -#if OPENSSL_VERSION_NUMBER < 0x10100000L - ns = (const char *)ASN1_STRING_data(name->d.ia5); -#else ns = (const char *)ASN1_STRING_get0_data(name->d.ia5); -#endif nslen = (size_t)ASN1_STRING_length(name->d.ia5); if (name->type == GEN_DNS && ip == NULL && @@ -1204,16 +1188,6 @@ 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"); - return (-1); - } - - SSL_load_error_strings(); -#endif - conn->ssl_meth = SSLv23_client_method(); conn->ssl_ctx = SSL_CTX_new(conn->ssl_meth); SSL_CTX_set_mode(conn->ssl_ctx, SSL_MODE_AUTO_RETRY); @@ -1231,7 +1205,7 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) } SSL_set_fd(conn->ssl, conn->sd); -#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) +#if !defined(OPENSSL_NO_TLSEXT) if (!SSL_set_tlsext_host_name(conn->ssl, __DECONST(struct url *, URL)->host)) { fprintf(stderr,