From patchwork Thu Oct 11 11:06:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 553 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director9.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id cLxjH87Jv1txLAAAIUCqbw for ; Thu, 11 Oct 2018 18:08:14 -0400 Received: from proxy20.mail.ord1d.rsapps.net ([172.30.191.6]) by director9.mail.ord1d.rsapps.net with LMTP id +INGH87Jv1s9GgAAalYnBA ; Thu, 11 Oct 2018 18:08:14 -0400 Received: from smtp11.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy20.mail.ord1d.rsapps.net with LMTP id mOT6Hs7Jv1uGIwAAsk8m8w ; Thu, 11 Oct 2018 18:08:14 -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: smtp11.gate.ord1d.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: 24cd9ab4-cda2-11e8-b794-5254005f837b-1-1 Received: from [216.105.38.7] ([216.105.38.7:3335] helo=lists.sourceforge.net) by smtp11.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id C8/B5-10353-CC9CFBB5; Thu, 11 Oct 2018 18:08:12 -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 1gAj6h-0003Wx-G3; Thu, 11 Oct 2018 22:06:59 +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 1gAj6f-0003Wr-LV for openvpn-devel@lists.sourceforge.net; Thu, 11 Oct 2018 22:06:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding: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=mu3EUn8iraUUDW8rtbs1iTQp1tk8c0udZJ0cKRZtT8U=; b=AHehgK+Pv2AQdiGB0uENAe0EW7 1HqHCp+W+EdpQnrgwR0E6uZJpNADrQHsGWGWwVte6uoUf6VoksbZiJpTEBqy8NhVvdS4WzjbuCbj/ 5+DpyFTIGOxHwltPn0JkfRsPVSWwktqVH/iWwBAapmic8xXVdB1eJ7JTXdBp6IURwmKg=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version: Content-Type:Content-Transfer-Encoding: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=mu3EUn8iraUUDW8rtbs1iTQp1tk8c0udZJ0cKRZtT8U=; b=gHvH6juOw+UjIAYwLLXsundeLN c3141TdOnqxBTN9sd9mxpsVCyRHWn3As2LOqAymp3QH4bpXtr09tRohgDHqLK4/Q1LH50u1Otjx/0 ixKHy6qlyqt8UJTBbY9hquVQlf1oNOvp5OzqNuVr6n/J/fs5t8JOCKMtiGEO3e2R1oSA=; 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.90_1) id 1gAj6a-006M68-70 for openvpn-devel@lists.sourceforge.net; Thu, 11 Oct 2018 22:06:57 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.91 (FreeBSD)) (envelope-from ) id 1gAj6O-000JMP-2o for openvpn-devel@lists.sourceforge.net; Fri, 12 Oct 2018 00:06:40 +0200 Received: (nullmailer pid 7361 invoked by uid 10006); Thu, 11 Oct 2018 22:06:39 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Fri, 12 Oct 2018 00:06:39 +0200 Message-Id: <20181011220639.7316-1-arne@rfc2549.org> X-Mailer: git-send-email 2.17.1 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1gAj6a-006M68-70 Subject: [Openvpn-devel] [PATCH] Use right function to set TLS1.3 restrictions in show-tls 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: , MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox The last version of the patch used the TLS1.2 version tls_ctx_restrict_ciphers to set the restrictions for both TLS 1.3 and TLS1.2 instead of using tls_ctx_restrict_ciphers_tls13 for TLS1.3. Also fix minor style problem while I am touching the function Acked-by: Gert Doering --- src/openvpn/ssl_openssl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index 6717ded0..da573cfa 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -2002,15 +2002,16 @@ show_available_tls_ciphers_list(const char *cipher_list, if (tls13) { SSL_CTX_set_min_proto_version(tls_ctx.ctx, TLS1_3_VERSION); + tls_ctx_restrict_ciphers_tls13(&tls_ctx, cipher_list); } else #endif { SSL_CTX_set_max_proto_version(tls_ctx.ctx, TLS1_2_VERSION); + tls_ctx_restrict_ciphers(&tls_ctx, cipher_list); } tls_ctx_set_cert_profile(&tls_ctx, tls_cert_profile); - tls_ctx_restrict_ciphers(&tls_ctx, cipher_list); SSL *ssl = SSL_new(tls_ctx.ctx); if (!ssl) @@ -2039,7 +2040,8 @@ show_available_tls_ciphers_list(const char *cipher_list, else if (NULL == pair) { /* No translation found, print warning */ - printf("%s (No IANA name known to OpenVPN, use OpenSSL name.)\n", cipher_name); + printf("%s (No IANA name known to OpenVPN, use OpenSSL name.)\n", + cipher_name); } else {