TLS v1.3 Support:主流 Web 客户端和服务端对 TLSv1.3 的支持情况

作者:gc(at)sysin.org,主页:www.sysin.org

为什么要使用 TLS v1.3

TLS 1.3 是时隔九年对 TLS 1.2 等之前版本的新升级,也是迄今为止改动最大的一次。针对目前已知的安全威胁,IETF(Internet Engineering Task Force,互联网工程任务组)制定 TLS 1.3 的新标准,使其有望成为有史以来最安全,但也最复杂的 TLS 协议。

TLS 1.3 与之前的协议有较大差异,主要在于:

  • 相比过去的的版本,引入了新的密钥协商机制 — PSK
  • 支持 0-RTT 数据传输,在建立连接时节省了往返时间
  • 废弃了 3DES、RC4、AES-CBC 等加密组件,废弃了 SHA1、MD5 等哈希算法
  • ServerHello 之后的所有握手消息采取了加密操作,可见明文大大减少
  • 不再允许对加密报文进行压缩、不再允许双方发起重协商
  • DSA 证书不再允许在 TLS 1.3 中使用

对比旧协议中的不足,TLS 1.3 确实可以称得上是向前迈了一大步。既避免之前版本出现的缺陷,也减少了 TLS 握手的时间。

总结一下,TLS 1.3 与以前的版本相比具有如下两个大的优势:更快的访问速度和更强的安全性!

TLS 1.0 和 TLS 1.1 是分别于 1996 年和 2006 年发布的老版协议,使用的是弱加密算法和系统。比如 SHA-1 和 MD5,这些算法和系统十分脆弱,存在重大安全漏洞,容易受到降级攻击的严重影响,而在 2008 年和 2017 年分别发布了协议的新版本,即 TLS 1.2TLS 1.3,无疑更优于旧版本,使用起来也更安全。

2018 年,在春季 TLS 1.3 版本发布之后,苹果、谷歌、Mozilla 和微软四大浏览器制造商于 2018 年 10 月联合宣布计划在 2020 年初取消对 TLS 1.0 和 TLS 1.1 的支持。

主流浏览器客户端都提供了禁用 TLS 1.0 和 TLS 1.1 协议的大致期限:

Browser Name Date
Microsoft IE and Edge First half of 2020
Mozilla Firefox March 2020
Safari/Webkit March 2020
Google Chrome January 2020

客户端支持

浏览器

Modern: Modern clients that support TLS 1.3, with no need for backwards compatibility

Configuration Firefox Android Chrome Edge Internet Explorer Java OpenSSL Opera Safari
Modern 63 10.0 70 75 11 1.1.1 57 12.1

参看:https://wiki.mozilla.org/Security/Server_Side_TLS

curl

7.52.0 - December 21 2016,curl: introduce the --tlsv1.3 option to force TLS 1.3

使用参数 --tlsv1.3,可以通过 curl --help 查看是否支持该参数

服务端支持

F5 BIG-IP TLSv1_3

BIG-IP v14 开始支持 TLSv1_3(In BIG-IP 14.0.0, the BIG-IP system adds limited support for Transport Layer Security (TLS) 1.3. Starting in BIG-IP 14.1.0.1 and later, this support was updated to provide production level support for TLS 1.3.)

By default, TLS 1.3 is disabled. To enable TLS 1.3, you must remove the No TLSv1.3 option from the Enabled Options list in the Configuration utility for the Client SSL and Server SSL profiles

You can view a list of TLS 1.3 supported ciphers and groups using the following TMOS Shell (tmsh) commands:

  • To view the supported client-side ciphers, use the following command:

    tmsh run util clientssl-ciphers TLSv1_3

  • To view the supported server-side ciphers, use the following command:

    tmsh run util serverssl-ciphers TLSv1_3

配置启用 TLSv1_3

编辑 ClientSSL Profle:

Ciphers:选择 Cipher Group,下拉选择 f5-secure

Options:Options List…

Enabled Options,

Disable No TLSv1.3

添加,No TLSv1 和 TLSv1.1,保留默认的“Don’t insert empty fragments”

IIS & Windows TLSv1.3

IIS 10 & Windows Server 2019 正式版尚未支持,参看

最新的 Windows Insider Preview 已经支持 TLS 1.3

the latest Windows Insider Preview Builds for Schannel’s TLS 1.3 support.

Nginx TLSv1.3

The TLSv1.1 and TLSv1.2 parameters (1.1.13, 1.0.12) work only when OpenSSL 1.0.1 or higher is used.

The TLSv1.3 parameter (1.13.0) works only when OpenSSL 1.1.1 built with TLSv1.3 support is used.

More info on the NGINX documentation

参考配置:启用 HTTP/2、TLSv1.3、推荐的Ciphers、HSTS

server {
    listen       443 ssl http2; # HTTP/2 Enable
    server_name  www.sysin.org;
    ssl_certificate     www.sysin.org.crt;
    ssl_certificate_key www.sysin.org.key;
    ssl_protocols       TLSv1.2 TLSv1.3; # Requires nginx >= 1.13.0 else use TLSv1.2
    ssl_ciphers  ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;
    add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload";
    ...
}

Apache httpd TLSv1.3

版本要求:

Apache version 2.4.36 or greater. (网上文章传言 2.4.38 是错误的!)

OpenSSL version 1.1.1 or greater.

CentOS 8 和 Ubuntu 20.04 自带软件包满足要求,低版本需要编译安装。

[root@c8 ~]# openssl version
OpenSSL 1.1.1c FIPS  28 May 2019

[root@c8 ~]# dnf list httpd
Installed Packages
httpd.x86_64        2.4.37-21.module_el8.2.0+382+15b0afa8        @AppStream
root@u20:~# openssl version
OpenSSL 1.1.1f  31 Mar 2020

root@u20:~# apt list apache2
Listing... Done
apache2/focal 2.4.41-4ubuntu3 amd64

启用 TLS 1.3 和 1.2

The Apache version 2.4.36 or higher versions support TLS v1.3. You must upgrade Apache packages before enabled TLS 1.3 in SSL settings.

 SSLProtocol -all +TLSv1.2 +TLSv1.3

配置项如下所示:

<VirtualHost *:443>
    ServerName www.sysin.org
    DocumentRoot /var/www/html

    SSLEngine on
    SSLProtocol -all +TLSv1.2 +TLSv1.3
    SSLCertificateFile "/path/to/www.sysin.org.cert"
    SSLCertificateKeyFile "/path/to/www.sysin.org.key"
</VirtualHost>

记得重启 Apache 服务才能生效。

猜你喜欢

转载自blog.csdn.net/netgc/article/details/107960224