From patchwork Thu Apr 15 01:45:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1740 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.27.255.53]) by backend30.mail.ord1d.rsapps.net with LMTP id YPVZHqMneGCpEwAAIUCqbw (envelope-from ) for ; Thu, 15 Apr 2021 07:46:43 -0400 Received: from proxy1.mail.iad3a.rsapps.net ([172.27.255.53]) by director8.mail.ord1d.rsapps.net with LMTP id eBY/HqMneGBQIwAAfY0hYg (envelope-from ) for ; Thu, 15 Apr 2021 07:46:43 -0400 Received: from smtp38.gate.iad3a ([172.27.255.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy1.mail.iad3a.rsapps.net with LMTPS id cELLGKMneGCFJAAA8TVjwQ (envelope-from ) for ; Thu, 15 Apr 2021 07:46:43 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp38.gate.iad3a.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=rfc2549.org X-Suspicious-Flag: YES X-Classification-ID: 3f189a70-9de0-11eb-bafb-525400000c92-1-1 Received: from [216.105.38.7] ([216.105.38.7:58650] helo=lists.sourceforge.net) by smtp38.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 29/70-00487-2A728706; Thu, 15 Apr 2021 07:46:43 -0400 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1lX0Ra-0007SO-L7; Thu, 15 Apr 2021 11:45:58 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lX0RZ-0007S2-4K for openvpn-devel@lists.sourceforge.net; Thu, 15 Apr 2021 11:45:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LJPzWAc7a1XLcYrPDWXxRDyWz0STu4fz9XbEdwvVLok=; b=dnmWN/KeVvBe/6v/gQK0q1uiGv 4rF3RkFBdPtEqd6LmTCn3qio37nZhtPKlrG+EwF6rhvGpXYUJz6Fhp0h6JaQAN/EBPdFDMYqAqLgv Mfkc/8WmgYCxwsmD1QXwwPxFbiVwRSCoIipHtm0LsYRNOd5E6CjUQ7ye1Yechu0kyRvo=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=LJPzWAc7a1XLcYrPDWXxRDyWz0STu4fz9XbEdwvVLok=; b=K RlkRlxieJ5+NxWY2RKxb2wlqAt0dkgtiwl9UbEb+S376aQ8njoxPH2M19bYINQ1BYz1N2gZAjw23R MeOf1KcZ79MAjZdjO7/b60E+zQmyTslqyQOnh50RdWzOwwl5CR1hRJg07Th2JLaYvs5d+5kXpJ3Jj VYOLzc+Yq7I+klc0=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1lX0RU-0099eq-7I for openvpn-devel@lists.sourceforge.net; Thu, 15 Apr 2021 11:45:57 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.94 (FreeBSD)) (envelope-from ) id 1lX0RJ-000NCO-I8 for openvpn-devel@lists.sourceforge.net; Thu, 15 Apr 2021 13:45:41 +0200 Received: (nullmailer pid 1001690 invoked by uid 10006); Thu, 15 Apr 2021 11:45:41 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Thu, 15 Apr 2021 13:45:41 +0200 Message-Id: <20210415114541.1001644-1-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: rfc2549.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1lX0RU-0099eq-7I Subject: [Openvpn-devel] [PATCH] Remove LibreSSL specific defines not needed for modern LibreSSL X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox Most of the functions remove were either already have a version check against LibreSSL 2.9.0 or are also now deprecated in LibreSSL as well according to the man pages in OpenBSD 6.8 like SSL_CTX_set_ecdh_auto and SSL_library_init. Signed-off-by: Arne Schwabe Acked-by: Antonio Quartulli --- src/openvpn/ssl_openssl.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index cb8ac7727..73b51276c 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -76,7 +76,7 @@ int mydata_index; /* GLOBAL */ void tls_init_lib(void) { -#if (OPENSSL_VERSION_NUMBER < 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) +#if OPENSSL_VERSION_NUMBER < 0x10100000L SSL_library_init(); #ifndef ENABLE_SMALL SSL_load_error_strings(); @@ -90,7 +90,7 @@ tls_init_lib(void) void tls_free_lib(void) { -#if (OPENSSL_VERSION_NUMBER < 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) +#if OPENSSL_VERSION_NUMBER < 0x10100000L EVP_cleanup(); #ifndef ENABLE_SMALL ERR_free_strings(); @@ -705,7 +705,7 @@ tls_ctx_load_ecdh_params(struct tls_root_ctx *ctx, const char *curve_name } else { -#if (OPENSSL_VERSION_NUMBER < 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) +#if OPENSSL_VERSION_NUMBER < 0x10100000L /* OpenSSL 1.0.2 and newer can automatically handle ECDH parameter * loading */ @@ -1310,9 +1310,7 @@ err: return 0; } -#if ((OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) \ - || LIBRESSL_VERSION_NUMBER > 0x2090000fL) \ - && !defined(OPENSSL_NO_EC) +#if OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(OPENSSL_NO_EC) /* called when EC_KEY is destroyed */ static void @@ -1457,9 +1455,7 @@ tls_ctx_use_management_external_key(struct tls_root_ctx *ctx) goto cleanup; } } -#if ((OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) \ - || LIBRESSL_VERSION_NUMBER > 0x2090000fL) \ - && !defined(OPENSSL_NO_EC) +#if (OPENSSL_VERSION_NUMBER > 0x10100000L) && !defined(OPENSSL_NO_EC) else if (EVP_PKEY_id(pkey) == EVP_PKEY_EC) { if (!tls_ctx_use_external_ec_key(ctx, pkey)) @@ -2147,8 +2143,7 @@ show_available_tls_ciphers_list(const char *cipher_list, crypto_msg(M_FATAL, "Cannot create SSL object"); } -#if (OPENSSL_VERSION_NUMBER < 0x1010000fL) \ - || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER <= 0x2090000fL) +#if OPENSSL_VERSION_NUMBER < 0x1010000fL STACK_OF(SSL_CIPHER) *sk = SSL_get_ciphers(ssl); #else STACK_OF(SSL_CIPHER) *sk = SSL_get1_supported_ciphers(ssl);