SSL和TLS-TLS 1.2
- TLS Extensions
-
- Server Name Indication
- Maximum Fragment Length Negotiation
- Client Certificate URL
- Trusted CA Keys
- Truncated HMAC
- Certificate Status Request
- User Mapping
- Authorization
- Certificate Types
- Elliptic Curve Cryptography
- SRP Protocol
- Signature Algorithms
- Heartbeat
- Application-Layer Protocol Negotiation
- Certificate Transparency
- Raw Public Keys
- EtA Instead of AtE
- Session Tickets
- Secure Renegotiation
- Summary
- Cipher Suites
2008年,TLS 1.2(版本号是3.3)发布(RFC 5246)。
TLS 1.2最大的改变是它的扩展机制,允许不改变底层协议的情况下,增加附加功能。
TLS Extensions
客户端和服务器的hello消息里,可以增加一些扩展。这些扩展是向后兼容的。客户端可以调用一个TLS扩展,来扩展它的ClientHello消息,一个扩展了的ClientHello消息就是一个带附加的数据块(扩展列表)的普通的ClientHello消息。记住,这些附加的信息只能扩展ClientHello消息。这样的一个扩展了的ClientHello消息符合规范,不会破坏一个存在的TLS服务器。TLS服务器能接受这样的消息,即使它不理解这些扩展。如果服务器理解这些扩展,它就返回一个扩展了的ServerHello消息。
扩展了的ServerHello消息只能用来响应扩展了的ClientHello消息。
扩展列表的长度没有上限。
每个扩展的结构都相同,有两个属性,两个字节的type和变长的data(可以为空)。比如,一个客户端想初始化安全重新协商扩展,就在ClientHello消息后面附加五个字节(0xFF, 0x01, 0x00, 0x01和0x00)。前两个字节0xFF和0x01,是扩展的类型,接下来的两个字节0x00和0x01是扩展的长度,最后一个字节是扩展数据的内容0x00。
IANA维护TLS参数的注册。其中包括有效的TLS扩展类型。
TLS 1.2 Extension Types and Values
Extension Type | Value | Description |
---|---|---|
server_name | 0 | 服务器名称 |
max_fragment_length | 1 | 最大fragment长度协商 |
client_certificate_url | 2 | 客户端证书URL |
trusted_ca_keys | 3 | Trusted CA keys |
truncated_hmac | 4 | 截断的HMAC |
status_request | 5 | 证书状态请求 |
user_mapping | 6 | User mapping |
client_authz | 7 | 客户端认证 |
server_authz | 8 | 服务器认证 |
cert_type | 9 | 证书类型 |
elliptic_curves | 10 | 椭圆曲线密码学 |
ec_point_formats | 11 | |
srp | 12 | SRP协议 |
supported_signature_algorithms | 13 | 签名算法 |
use_srtp | 14 | SRTP的key建立 |
heartbeat | 15 | Heartbeat |
application_layer-protocol_negotiation | 16 | 协商应用层协议 |
status_request_v2 | 17 | 证书状态请求,版本2 |
signed_certificate_timestamp | 18 | |
client_certificate_type | 19 | 原始公钥 |
server_certificate_type | 20 | 原始公钥 |
encrypt_then_mac | 22 | 使用EtA代替AtE |
extended_master_secret | 23 | 安全重新协商(revisited) |
session_ticket | 35 | Session tickets |
renegotiation_info | 65281 | 安全重新协商 |
New TLS Alert Messages
Alert | Code | Description |
---|---|---|
unsupported_extension | 110 | 发送者(总是客户端)通知接收方,ServerHello消息里有不支持的扩展。永远是fatal |
certificate_unobtainable | 111 | 发送者(总是服务器)通知接收方,不能读取CertificateURL里的证书(链)。可以是fatal |
unrecognized_name | 112 | 发送者(总是服务器)通知接收方,不认识ServerName扩展里的名称。可以是fatal |
bad_certificate_status_response | 113 | 发送者(总是客户端)通知接收方,收到了无效的证书状态响应。永远是fatal |
bad_certificate_hash_value | 114 | 发送者(总是服务器)通知接收方,证书hash与客户端提供的不匹配。永远是fatal |
Server Name Indication
Virtual hosting技术是指同一台机器上部署多个服务,可能使用一个IP地址。假如一个用户在浏览器输入 www.esecurity.ch,一个DN