idnits 2.17.1 draft-ietf-tls-rfc4366-bis-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.i or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? (You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Feb 2009 rather than one of the newer Notices. See https://trustee.ietf.org/license-info/.) Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([RFC5246]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. == The 'Obsoletes: ' line in the draft header should list only the _numbers_ of the RFCs which will be obsoleted by this document (if approved); it should not include the word 'RFC' in the list. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 583 has weird spacing: '...ensions reque...' -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (June 22, 2009) is 5414 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '20' on line 365 ** Downref: Normative reference to an Informational RFC: RFC 2104 ** Obsolete normative reference: RFC 2560 (Obsoleted by RFC 6960) ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 2246 (Obsoleted by RFC 4346) -- Obsolete informational reference (is this intentional?): RFC 3268 (Obsoleted by RFC 5246) -- Obsolete informational reference (is this intentional?): RFC 4346 (Obsoleted by RFC 5246) -- Obsolete informational reference (is this intentional?): RFC 4366 (Obsoleted by RFC 5246, RFC 6066) Summary: 6 errors (**), 0 flaws (~~), 3 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 TLS Working Group Donald Eastlake 3rd 2 INTERNET-DRAFT Stellar Switches 3 Obsoletes: RFC 4366 4 Intended status: Proposed Standard 5 Expires: December 21, 2009 June 22, 2009 7 Transport Layer Security (TLS) Extensions: Extension Definitions 8 10 Status of This Document 12 This Internet-Draft is submitted to IETF in full conformance with the 13 provisions of BCP 78 and BCP 79. This document may contain material 14 from IETF Documents or IETF Contributions published or made publicly 15 available before November 10, 2008. The person(s) controlling the 16 copyright in some of this material may not have granted the IETF 17 Trust the right to allow modifications of such material outside the 18 IETF Standards Process. Without obtaining an adequate license from 19 the person(s) controlling the copyright in such materials, this 20 document may not be modified outside the IETF Standards Process, and 21 derivative works of it may not be created outside the IETF Standards 22 Process, except to format it for publication as an RFC or to 23 translate it into languages other than English. 25 Distribution of this document is unlimited. Comments should be sent 26 to the TLS working group mailing list . 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF), its areas, and its working groups. Note that 30 other groups may also distribute working documents as Internet- 31 Drafts. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 The list of current Internet-Drafts can be accessed at 39 http://www.ietf.org/1id-abstracts.html 41 The list of Internet-Draft Shadow Directories can be accessed at 42 http://www.ietf.org/shadow.html 44 Abstract 46 This document provides specifications for existing TLS extensions. It 47 is a companion document for the TLS 1.2 specification [RFC5246]. The 48 extensions specified are server_name, max_fragment_length, 49 client_certificate_url, trusted_ca_keys, truncated_hmac, and 50 status_request. 52 Acknowledgements 54 This draft is based on material from RFC 4366 for which the authors 55 were S. Blake-Wilson, M. Nystron, D. Hopwood, J. Mikkelsen, and T. 56 Wright. 58 Table of Contents 60 Status of This Document....................................1 61 Abstract...................................................1 62 Acknowledgements...........................................2 63 Table of Contents..........................................2 65 1. Introduction............................................3 66 1.1 Specific Extensions Covered............................3 67 1.2 Conventions Used in This Document......................4 69 2. Extensions to the Handshake Protocol....................5 70 3. Server Name Indication..................................6 71 4. Maximum Fragment Length Negotiation.....................8 72 5. Client Certificate URLs................................10 73 6. Trusted CA Indication..................................13 74 7. Truncated HMAC.........................................15 75 8. Certificate Status Request.............................16 76 9. Error Alerts...........................................18 77 10. IANA Considerations...................................19 79 11. Security Considerations...............................19 80 11.1 Security Considerations for server_name..............19 81 11.2 Security Considerations for max_fragment_length......19 82 11.3 Security Considerations for client_certificate_url...20 83 11.4 Security Considerations for trusted_ca_keys..........21 84 11.5 Security Considerations for truncated_hmac...........21 85 11.6 Security Considerations for status_request...........21 87 12. Normative References..................................22 88 13. Informative References................................22 90 Annex A: pkipath MIME Type Registration...................24 91 Annex B: Changes from RFC 4366............................26 92 Author's Address..........................................27 93 Copyright and IPR Provisions..............................28 95 1. Introduction 97 The TLS (Transport Layer Security) Protocol Version 1.2 is specified 98 in [RFC5246]. That specification includes the framework for 99 extensions to TLS, considerations in designing such extensions (see 100 Section 7.4.1.4 of [RFC5246]), and IANA Considerations for the 101 allocation of new extension code points; however, it does not specify 102 any particular extensions other than Signature Algorithms (see 103 Section 7.4.1.4.1 of [RFC5246]). 105 This document provides the specifications for existing TLS 106 extensions. It is, for the most part, the adaptation and editing of 107 material from [RFC4366], which covered TLS extensions for TLS 1.0 108 [RFC2246] and TLS 1.1 [RFC4346]. 110 1.1 Specific Extensions Covered 112 The extensions described here focus on extending the functionality 113 provided by the TLS protocol message formats. Other issues, such as 114 the addition of new cipher suites, are deferred. 116 The extension types defined in this document are: 118 enum { 119 server_name(0), max_fragment_length(1), 120 client_certificate_url(2), trusted_ca_keys(3), 121 truncated_hmac(4), status_request(5), (65535) 122 } ExtensionType; 124 Specifically, the extensions described in this document: 126 - Allow TLS clients to provide to the TLS server the name of the 127 server they are contacting. This functionality is desirable in 128 order to facilitate secure connections to servers that host 129 multiple 'virtual' servers at a single underlying network address. 131 - Allow TLS clients and servers to negotiate the maximum fragment 132 length to be sent. This functionality is desirable as a result of 133 memory constraints among some clients, and bandwidth constraints 134 among some access networks. 136 - Allow TLS clients and servers to negotiate the use of client 137 certificate URLs. This functionality is desirable in order to 138 conserve memory on constrained clients. 140 - Allow TLS clients to indicate to TLS servers which CA root keys 141 they possess. This functionality is desirable in order to prevent 142 multiple handshake failures involving TLS clients that are only 143 able to store a small number of CA root keys due to memory 144 limitations. 146 - Allow TLS clients and servers to negotiate the use of truncated 147 MACs. This functionality is desirable in order to conserve 148 bandwidth in constrained access networks. 150 - Allow TLS clients and servers to negotiate that the server sends 151 the client certificate status information (e.g., an Online 152 Certificate Status Protocol (OCSP) [RFC2560] response) during a 153 TLS handshake. This functionality is desirable in order to avoid 154 sending a Certificate Revocation List (CRL) over a constrained 155 access network and therefore save bandwidth. 157 TLS clients and servers may use the extensions described in this 158 document. The extensions are designed to be backwards compatible, 159 meaning that TLS clients that support the extensions can talk to TLS 160 servers that do not support the extensions, and vice versa. 162 1.2 Conventions Used in This Document 164 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 165 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 166 document are to be interpreted as described in [RFC2119]. 168 2. Extensions to the Handshake Protocol 170 This document specifies the use of two new handshake messages, 171 "CertificateURL" and "CertificateStatus". These messages are 172 described in Section 5 and Section 8, respectively. The new 173 handshake message structure therefore becomes: 175 enum { 176 hello_request(0), client_hello(1), server_hello(2), 177 certificate(11), server_key_exchange (12), 178 certificate_request(13), server_hello_done(14), 179 certificate_verify(15), client_key_exchange(16), 180 finished(20), certificate_url(21), certificate_status(22), 181 (255) 182 } HandshakeType; 184 struct { 185 HandshakeType msg_type; /* handshake type */ 186 uint24 length; /* bytes in message */ 187 select (HandshakeType) { 188 case hello_request: HelloRequest; 189 case client_hello: ClientHello; 190 case server_hello: ServerHello; 191 case certificate: Certificate; 192 case server_key_exchange: ServerKeyExchange; 193 case certificate_request: CertificateRequest; 194 case server_hello_done: ServerHelloDone; 195 case certificate_verify: CertificateVerify; 196 case client_key_exchange: ClientKeyExchange; 197 case finished: Finished; 198 case certificate_url: CertificateURL; 199 case certificate_status: CertificateStatus; 200 } body; 201 } Handshake; 203 3. Server Name Indication 205 TLS does not provide a mechanism for a client to tell a server the 206 name of the server it is contacting. It may be desirable for clients 207 to provide this information to facilitate secure connections to 208 servers that host multiple 'virtual' servers at a single underlying 209 network address. 211 In order to provide any of the server names, clients MAY include an 212 extension of type "server_name" in the (extended) client hello. The 213 "extension_data" field of this extension SHALL contain 214 "ServerNameList" where: 216 struct { 217 NameType name_type; 218 select (name_type) { 219 case host_name: HostName; 220 } name; 221 } ServerName; 223 enum { 224 host_name(0), (255) 225 } NameType; 227 opaque HostName<1..2^16-1>; 229 struct { 230 ServerName server_name_list<1..2^16-1> 231 } ServerNameList; 233 If the server understood the client hello extension but does not 234 recognize any of the server names, it SHOULD send an 235 unrecognized_name(112) alert (which MAY be fatal). 237 Currently, the only server names supported are DNS hostnames; 238 however, this does not imply any dependency of TLS on DNS, and other 239 name types may be added in the future (by an RFC that updates this 240 document). TLS MAY treat provided server names as opaque data and 241 pass the names and types to the application. 243 "HostName" contains the fully qualified DNS hostname of the server, 244 as understood by the client. The hostname is represented as a byte 245 string using ASCII encoding without a trailing dot. 247 Literal IPv4 and IPv6 addresses are not permitted in "HostName". 249 It is RECOMMENDED that clients include an extension of type 250 "server_name" in the client hello whenever they locate a server by a 251 supported name type. 253 A server that receives a client hello containing the "server_name" 254 extension MAY use the information contained in the extension to guide 255 its selection of an appropriate certificate to return to the client, 256 and/or other aspects of security policy. In this event, the server 257 SHALL include an extension of type "server_name" in the (extended) 258 server hello. The "extension_data" field of this extension SHALL be 259 empty. 261 If an application negotiates a server name using an application 262 protocol and then upgrades to TLS, and if a server_name extension is 263 sent, then the extension SHOULD contain the same name that was 264 negotiated in the application protocol. If the server_name is 265 established in the TLS session handshake, the client SHOULD NOT 266 attempt to request a different server name at the application layer. 268 4. Maximum Fragment Length Negotiation 270 Without this extension, TLS specifies a fixed maximum plaintext 271 fragment length of 2^14 bytes. It may be desirable for constrained 272 clients to negotiate a smaller maximum fragment length due to memory 273 limitations or bandwidth limitations. 275 In order to negotiate smaller maximum fragment lengths, clients MAY 276 include an extension of type "max_fragment_length" in the (extended) 277 client hello. The "extension_data" field of this extension SHALL 278 contain: 280 enum{ 281 2^9(1), 2^10(2), 2^11(3), 2^12(4), (255) 282 } MaxFragmentLength; 284 whose value is the desired maximum fragment length. The allowed 285 values for this field are: 2^9, 2^10, 2^11, and 2^12. 287 Servers that receive an extended client hello containing a 288 "max_fragment_length" extension MAY accept the requested maximum 289 fragment length by including an extension of type 290 "max_fragment_length" in the (extended) server hello. The 291 "extension_data" field of this extension SHALL contain a 292 "MaxFragmentLength" whose value is the same as the requested maximum 293 fragment length. 295 If a server receives a maximum fragment length negotiation request 296 for a value other than the allowed values, it MUST abort the 297 handshake with an "illegal_parameter" alert. Similarly, if a client 298 receives a maximum fragment length negotiation response that differs 299 from the length it requested, it MUST also abort the handshake with 300 an "illegal_parameter" alert. 302 Once a maximum fragment length other than 2^14 has been successfully 303 negotiated, the client and server MUST immediately begin fragmenting 304 messages (including handshake messages), to ensure that no fragment 305 larger than the negotiated length is sent. Note that TLS already 306 requires clients and servers to support fragmentation of handshake 307 messages. 309 The negotiated length applies for the duration of the session 310 including session resumptions. 312 The negotiated length limits the input that the record layer may 313 process without fragmentation (that is, the maximum value of 314 TLSPlaintext.length; see [RFC5246], Section 6.2.1). Note that the 315 output of the record layer may be larger. For example, if the 316 negotiated length is 2^9=512, then for currently defined cipher 317 suites (those defined in [RFC5246], [RFC2712], and [RFC3268]), and 318 when null compression is used, the record layer output can be at most 319 805 bytes: 5 bytes of headers, 512 bytes of application data, 256 320 bytes of padding, and 32 bytes of MAC. This means that in this event 321 a TLS record layer peer receiving a TLS record layer message larger 322 than 805 bytes may discard the message and send a "record_overflow" 323 alert, without decrypting the message. 325 5. Client Certificate URLs 327 Without this extension, TLS specifies that when client authentication 328 is performed, client certificates are sent by clients to servers 329 during the TLS handshake. It may be desirable for constrained clients 330 to send certificate URLs in place of certificates, so that they do 331 not need to store their certificates and can therefore save memory. 333 In order to negotiate sending certificate URLs to a server, clients 334 MAY include an extension of type "client_certificate_url" in the 335 (extended) client hello. The "extension_data" field of this extension 336 SHALL be empty. 338 (Note that it is necessary to negotiate use of client certificate 339 URLs in order to avoid "breaking" existing TLS servers.) 341 Servers that receive an extended client hello containing a 342 "client_certificate_url" extension MAY indicate that they are willing 343 to accept certificate URLs by including an extension of type 344 "client_certificate_url" in the (extended) server hello. The 345 "extension_data" field of this extension SHALL be empty. 347 After negotiation of the use of client certificate URLs has been 348 successfully completed (by exchanging hellos including 349 "client_certificate_url" extensions), clients MAY send a 350 "CertificateURL" message in place of a "Certificate" message as 351 follows (see also Section 2): 353 enum { 354 individual_certs(0), pkipath(1), (255) 355 } CertChainType; 357 struct { 358 CertChainType type; 359 URLAndHash url_and_hash_list<1..2^16-1>; 360 } CertificateURL; 362 struct { 363 opaque url<1..2^16-1>; 364 opaque padding<1>; 365 opaque SHA1Hash[20]; 366 } URLAndHash; 368 Here "url_and_hash_list" contains a sequence of URLs and hashes. 369 Each "url" MUST be an absolute URI reference according to [RFC3986] 370 that can be immediately used to fetch the certificate(s). 372 When X.509 certificates are used, there are two possibilities: 374 - If CertificateURL.type is "individual_certs", each URL refers to a 375 single DER-encoded X.509v3 certificate, with the URL for the client's 376 certificate first. 378 - If CertificateURL.type is "pkipath", the list contains a single 379 URL referring to a DER-encoded certificate chain, using the type 380 PkiPath described in Annex A. 382 When any other certificate format is used, the specification that 383 describes use of that format in TLS should define the encoding format 384 of certificates or certificate chains, and any constraint on their 385 ordering. 387 The "padding" byte MUST be 0x01. It is present to make the structure 388 backwards compatible. 390 The hash corresponding to each URL is the SHA-1 hash of the 391 certificate or certificate chain (in the case of X.509 certificates, 392 the DER-encoded certificate or the DER-encoded PkiPath). 394 Note that when a list of URLs for X.509 certificates is used, the 395 ordering of URLs is the same as that used in the TLS Certificate 396 message (see [RFC5246], Section 7.4.2), but opposite to the order in 397 which certificates are encoded in PkiPath. In either case, the self- 398 signed root certificate MAY be omitted from the chain, under the 399 assumption that the server must already possess it in order to 400 validate it. 402 Servers receiving "CertificateURL" SHALL attempt to retrieve the 403 client's certificate chain from the URLs and then process the 404 certificate chain as usual. A cached copy of the content of any URL 405 in the chain MAY be used, provided that the SHA-1 hash matches the 406 hash of the cached copy. 408 Servers that support this extension MUST support the 'http' URI 409 scheme for certificate URLs, and MAY support other schemes. Use of 410 other schemes than 'http', 'https', or 'ftp' may create unexpected 411 problems. 413 If the protocol used is HTTP, then the HTTP server can be configured 414 to use the Cache-Control and Expires directives described in 415 [RFC2616] to specify whether and for how long certificates or 416 certificate chains should be cached. 418 The TLS server is not required to follow HTTP redirects when 419 retrieving the certificates or certificate chain. The URLs used in 420 this extension SHOULD therefore be chosen not to depend on such 421 redirects. 423 If the protocol used to retrieve certificates or certificate chains 424 returns a MIME-formatted response (as HTTP does), then the following 425 MIME Content-Types SHALL be used: when a single X.509v3 certificate 426 is returned, the Content-Type is "application/pkix-cert" [RFC2585], 427 and when a chain of X.509v3 certificates is returned, the Content- 428 Type is "application/pkix-pkipath" Annex A. 430 The server MUST check that the SHA-1 hash of the contents of the 431 object retrieved from that URL (after decoding any MIME Content- 432 Transfer-Encoding) matches the given hash. If any retrieved object 433 does not have the correct SHA-1 hash, the server MUST abort the 434 handshake with a bad_certificate_hash_value(114) alert. This alert is 435 always fatal. 437 Clients may choose to send either "Certificate" or "CertificateURL" 438 after successfully negotiating the option to send certificate URLs. 439 The option to send a certificate is included to provide flexibility 440 to clients possessing multiple certificates. 442 If a server encounters an unreasonable delay in obtaining 443 certificates in a given CertificateURL, it SHOULD time out and signal 444 a certificate_unobtainable(111) error alert. This alert MAY be fatal; 445 for example, if client authentication is required by the server for 446 the handshake to continue. 448 6. Trusted CA Indication 450 Constrained clients that, due to memory limitations, possess only a 451 small number of CA root keys may wish to indicate to servers which 452 root keys they possess, in order to avoid repeated handshake 453 failures. 455 In order to indicate which CA root keys they possess, clients MAY 456 include an extension of type "trusted_ca_keys" in the (extended) 457 client hello. The "extension_data" field of this extension SHALL 458 contain "TrustedAuthorities" where: 460 struct { 461 TrustedAuthority trusted_authorities_list<0..2^16-1>; 462 } TrustedAuthorities; 464 struct { 465 IdentifierType identifier_type; 466 select (identifier_type) { 467 case pre_agreed: struct {}; 468 case key_sha1_hash: SHA1Hash; 469 case x509_name: DistinguishedName; 470 case cert_sha1_hash: SHA1Hash; 471 } identifier; 472 } TrustedAuthority; 474 enum { 475 pre_agreed(0), key_sha1_hash(1), x509_name(2), 476 cert_sha1_hash(3), (255) 477 } IdentifierType; 479 opaque DistinguishedName<1..2^16-1>; 481 Here "TrustedAuthorities" provides a list of CA root key identifiers 482 that the client possesses. Each CA root key is identified via either: 484 - "pre_agreed": no CA root key identity supplied. 486 - "key_sha1_hash": contains the SHA-1 hash of the CA root key. For 487 Digital Signature Algorithm (DSA) and Elliptic Curve Digital 488 Signature Algorithm (ECDSA) keys, this is the hash of the 489 "subjectPublicKey" value. For RSA keys, the hash is of the big- 490 endian byte string representation of the modulus without any 491 initial 0-valued bytes. (This copies the key hash formats deployed 492 in other environments.) 494 - "x509_name": contains the DER-encoded X.509 DistinguishedName of 495 the CA. 497 - "cert_sha1_hash": contains the SHA-1 hash of a DER-encoded 498 Certificate containing the CA root key. 500 Note that clients may include none, some, or all of the CA root keys 501 they possess in this extension. 503 Note also that it is possible that a key hash or a Distinguished Name 504 alone may not uniquely identify a certificate issuer (for example, if 505 a particular CA has multiple key pairs). However, here we assume this 506 is the case following the use of Distinguished Names to identify 507 certificate issuers in TLS. 509 The option to include no CA root keys is included to allow the client 510 to indicate possession of some pre-defined set of CA root keys. 512 Servers that receive a client hello containing the "trusted_ca_keys" 513 extension MAY use the information contained in the extension to guide 514 their selection of an appropriate certificate chain to return to the 515 client. In this event, the server SHALL include an extension of type 516 "trusted_ca_keys" in the (extended) server hello. The 517 "extension_data" field of this extension SHALL be empty. 519 7. Truncated HMAC 521 Currently defined TLS cipher suites use the MAC construction HMAC 522 [RFC2104] to authenticate record layer communications. In TLS, the 523 entire output of the hash function is used as the MAC tag. However, 524 it may be desirable in constrained environments to save bandwidth by 525 truncating the output of the hash function to 80 bits when forming 526 MAC tags. 528 In order to negotiate the use of 80-bit truncated HMAC, clients MAY 529 include an extension of type "truncated_hmac" in the extended client 530 hello. The "extension_data" field of this extension SHALL be empty. 532 Servers that receive an extended hello containing a "truncated_hmac" 533 extension MAY agree to use a truncated HMAC by including an extension 534 of type "truncated_hmac", with empty "extension_data", in the 535 extended server hello. 537 Note that if new cipher suites are added that do not use HMAC, and 538 the session negotiates one of these cipher suites, this extension 539 will have no effect. It is strongly recommended that any new cipher 540 suites using other MACs consider the MAC size an integral part of the 541 cipher suite definition, taking into account both security and 542 bandwidth considerations. 544 If HMAC truncation has been successfully negotiated during a TLS 545 handshake, and the negotiated cipher suite uses HMAC, both the client 546 and the server pass this fact to the TLS record layer along with the 547 other negotiated security parameters. Subsequently during the 548 session, clients and servers MUST use truncated HMACs, calculated as 549 specified in [RFC2104]. That is, SecurityParameters.mac_length is 10 550 bytes, and only the first 10 bytes of the HMAC output are transmitted 551 and checked. Note that this extension does not affect the calculation 552 of the pseudo-random function (PRF) as part of handshaking or key 553 derivation. 555 The negotiated HMAC truncation size applies for the duration of the 556 session including session resumptions. 558 8. Certificate Status Request 560 Constrained clients may wish to use a certificate-status protocol 561 such as OCSP [RFC2560] to check the validity of server certificates, 562 in order to avoid transmission of CRLs and therefore save bandwidth 563 on constrained networks. This extension allows for such information 564 to be sent in the TLS handshake, saving roundtrips and resources. 566 In order to indicate their desire to receive certificate status 567 information, clients MAY include an extension of type 568 "status_request" in the (extended) client hello. The "extension_data" 569 field of this extension SHALL contain "CertificateStatusRequest" 570 where: 572 struct { 573 CertificateStatusType status_type; 574 select (status_type) { 575 case ocsp: OCSPStatusRequest; 576 } request; 577 } CertificateStatusRequest; 579 enum { ocsp(1), (255) } CertificateStatusType; 581 struct { 582 ResponderID responder_id_list<0..2^16-1>; 583 Extensions request_extensions; 584 } OCSPStatusRequest; 586 opaque ResponderID<1..2^16-1>; 587 opaque Extensions<0..2^16-1>; 589 In the OCSPStatusRequest, the "ResponderIDs" provides a list of OCSP 590 responders that the client trusts. A zero-length "responder_id_list" 591 sequence has the special meaning that the responders are implicitly 592 known to the server, e.g., by prior arrangement. "Extensions" is a 593 DER encoding of OCSP request extensions. 595 Both "ResponderID" and "Extensions" are DER-encoded ASN.1 types as 596 defined in [RFC2560]. "Extensions" is imported from [RFC5280]. A 597 zero-length "request_extensions" value means that there are no 598 extensions (as opposed to a zero-length ASN.1 SEQUENCE, which is not 599 valid for the "Extensions" type). 601 In the case of the "id-pkix-ocsp-nonce" OCSP extension, [RFC2560] is 602 unclear about its encoding; for clarification, the nonce MUST be a 603 DER-encoded OCTET STRING, which is encapsulated as another OCTET 604 STRING (note that implementations based on an existing OCSP client 605 will need to be checked for conformance to this requirement). 607 Servers that receive a client hello containing the "status_request" 608 extension MAY return a suitable certificate status response to the 609 client along with their certificate. If OCSP is requested, they 610 SHOULD use the information contained in the extension when selecting 611 an OCSP responder and SHOULD include request_extensions in the OCSP 612 request. 614 Servers return a certificate response along with their certificate by 615 sending a "CertificateStatus" message immediately after the 616 "Certificate" message (and before any "ServerKeyExchange" or 617 "CertificateRequest" messages). If a server returns a 618 "CertificateStatus" message, then the server MUST have included an 619 extension of type "status_request" with empty "extension_data" in the 620 extended server hello. The "CertificateStatus" message is conveyed 621 using the handshake message type "certificate_status" as follows (see 622 also Section 2): 624 struct { 625 CertificateStatusType status_type; 626 select (status_type) { 627 case ocsp: OCSPResponse; 628 } response; 629 } CertificateStatus; 631 opaque OCSPResponse<1..2^24-1>; 633 An "ocsp_response" contains a complete, DER-encoded OCSP response 634 (using the ASN.1 type OCSPResponse defined in [RFC2560]). Only one 635 OCSP response may be sent. 637 Note that a server MAY also choose not to send a "CertificateStatus" 638 message, even if has received a "status_request" extension in the 639 client hello message and has sent a "status_request" extension in the 640 server hello message. 642 Note in addition that a server MUST NOT send the "CertificateStatus" 643 message unless it received a "status_request" extension in the client 644 hello message and sent a "status_request" extension in the server 645 hello message. 647 Clients requesting an OCSP response and receiving an OCSP response in 648 a "CertificateStatus" message MUST check the OCSP response and abort 649 the handshake if the response is not satisfactory with 650 bad_certificate_status_response(113) alert. This alert is always 651 fatal. 653 9. Error Alerts 655 Four new error alerts are defined for use with the TLS extensions 656 defined in this document. To avoid "breaking" existing clients and 657 servers, these alerts MUST NOT be sent unless the sending party has 658 received an extended hello message from the party they are 659 communicating with. These error alerts are conveyed using the 660 following syntax. The new alerts are the last four, as indicated by 661 the comments on the same line as the error alert number. 663 enum { 664 close_notify(0), 665 unexpected_message(10), 666 bad_record_mac(20), 667 decryption_failed(21), 668 record_overflow(22), 669 decompression_failure(30), 670 handshake_failure(40), 671 /* 41 is not defined, for historical reasons */ 672 bad_certificate(42), 673 unsupported_certificate(43), 674 certificate_revoked(44), 675 certificate_expired(45), 676 certificate_unknown(46), 677 illegal_parameter(47), 678 unknown_ca(48), 679 access_denied(49), 680 decode_error(50), 681 decrypt_error(51), 682 export_restriction(60), 683 protocol_version(70), 684 insufficient_security(71), 685 internal_error(80), 686 user_canceled(90), 687 no_renegotiation(100), 688 unsupported_extension(110), 689 certificate_unobtainable(111), /* new */ 690 unrecognized_name(112), /* new */ 691 bad_certificate_status_response(113), /* new */ 692 bad_certificate_hash_value(114), /* new */ 693 (255) 694 } AlertDescription; 696 "certificate_unobtainable" is described in Section 5. 697 "unrecognized_name" is described in Section 3. 698 "bad_certificate_status_response" is described in Section 8. 699 "bad_certificate_hash_value" is described in Section 5. 701 10. IANA Considerations 703 IANA Considerations for TLS Extensions and the creation of a Registry 704 therefore are covered in Section 12 of [RFC5246] except for the 705 registration of MIME type application/pkix-pkipath. This MIME type 706 has already been registered but is reproduced in Annex A for 707 convenience. 709 The IANA TLS extensions registry entries that reference [RFC4366] 710 should be updated to reference this document on its publication as an 711 RFC. 713 11. Security Considerations 715 General Security Considerations for TLS Extensions are covered in 716 [RFC5246]. Security Considerations for particular extensions 717 specified in this document are given below. 719 In general, implementers should continue to monitor the state of the 720 art and address any weaknesses identified. 722 11.1 Security Considerations for server_name 724 If a single server hosts several domains, then clearly it is 725 necessary for the owners of each domain to ensure that this satisfies 726 their security needs. Apart from this, server_name does not appear to 727 introduce significant security issues. 729 Implementations MUST ensure that a buffer overflow does not occur, 730 whatever the values of the length fields in server_name. 732 11.2 Security Considerations for max_fragment_length 734 The maximum fragment length takes effect immediately, including for 735 handshake messages. However, that does not introduce any security 736 complications that are not already present in TLS, since TLS requires 737 implementations to be able to handle fragmented handshake messages. 739 Note that as described in Section 4, once a non-null cipher suite has 740 been activated, the effective maximum fragment length depends on the 741 cipher suite and compression method, as well as on the negotiated 742 max_fragment_length. This must be taken into account when sizing 743 buffers, and checking for buffer overflow. 745 11.3 Security Considerations for client_certificate_url 747 Support for client_certificate_url involves the server's acting as a 748 client in another URI scheme dependent protocol. The server 749 therefore becomes subject to many of the same security concerns that 750 clients of the URI scheme are subject to, with the added concern that 751 the client can attempt to prompt the server to connect to some 752 (possibly weird-looking) URL. 754 In general, this issue means that an attacker might use the server to 755 indirectly attack another host that is vulnerable to some security 756 flaw. It also introduces the possibility of denial of service attacks 757 in which an attacker makes many connections to the server, each of 758 which results in the server's attempting a connection to the target 759 of the attack. 761 Note that the server may be behind a firewall or otherwise able to 762 access hosts that would not be directly accessible from the public 763 Internet. This could exacerbate the potential security and denial of 764 service problems described above, as well as allow the existence of 765 internal hosts to be confirmed when they would otherwise be hidden. 767 The detailed security concerns involved will depend on the URI 768 schemes supported by the server. In the case of HTTP, the concerns 769 are similar to those that apply to a publicly accessible HTTP proxy 770 server. In the case of HTTPS, loops and deadlocks may be created, and 771 this should be addressed. In the case of FTP, attacks arise that are 772 similar to FTP bounce attacks. 774 As a result of this issue, it is RECOMMENDED that the 775 client_certificate_url extension should have to be specifically 776 enabled by a server administrator, rather than be enabled by default. 777 It is also RECOMMENDED that URI schemes be enabled by the 778 administrator individually, and only a minimal set of schemes be 779 enabled. Unusual protocols that offer limited security or whose 780 security is not well understood SHOULD be avoided. 782 As discussed in [RFC3986], URLs that specify ports other than the 783 default may cause problems, as may very long URLs (which are more 784 likely to be useful in exploiting buffer overflow bugs). 786 Also note that HTTP caching proxies are common on the Internet, and 787 some proxies do not check for the latest version of an object 788 correctly. If a request using HTTP (or another caching protocol) goes 789 through a misconfigured or otherwise broken proxy, the proxy may 790 return an out-of-date response. 792 11.4 Security Considerations for trusted_ca_keys 794 It is possible that which CA root keys a client possesses could be 795 regarded as confidential information. As a result, the CA root key 796 indication extension should be used with care. 798 The use of the SHA-1 certificate hash alternative ensures that each 799 certificate is specified unambiguously. As for the previous 800 extension, it was not believed necessary to use both MD5 and SHA-1 801 hashes. 803 11.5 Security Considerations for truncated_hmac 805 It is possible that truncated MACs are weaker than "un-truncated" 806 MACs. However, no significant weaknesses are currently known or 807 expected to exist for HMAC with MD5 or SHA-1, truncated to 80 bits. 809 Note that the output length of a MAC need not be as long as the 810 length of a symmetric cipher key, since forging of MAC values cannot 811 be done off-line: in TLS, a single failed MAC guess will cause the 812 immediate termination of the TLS session. 814 Since the MAC algorithm only takes effect after all handshake 815 messages that affect extension parameters have been authenticated by 816 the hashes in the Finished messages, it is not possible for an active 817 attacker to force negotiation of the truncated HMAC extension where 818 it would not otherwise be used (to the extent that the handshake 819 authentication is secure). Therefore, in the event that any security 820 problem were found with truncated HMAC in the future, if either the 821 client or the server for a given session were updated to take the 822 problem into account, it would be able to veto use of this extension. 824 11.6 Security Considerations for status_request 826 If a client requests an OCSP response, it must take into account that 827 an attacker's server using a compromised key could (and probably 828 would) pretend not to support the extension. In this case, a client 829 that requires OCSP validation of certificates SHOULD either contact 830 the OCSP server directly or abort the handshake. 832 Use of the OCSP nonce request extension (id-pkix-ocsp-nonce) may 833 improve security against attacks that attempt to replay OCSP 834 responses; see Section 4.4.1 of [RFC2560] for further details. 836 12. Normative References 838 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 839 Hashing for Message Authentication", RFC 2104, February 1997. 841 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 842 Requirement Levels", BCP 14, RFC 2119, March 1997. 844 [RFC2560] Myers, M., Ankney, R., Malpani, A., Galperin, S., and C. 845 Adams, "X.509 Internet Public Key Infrastructure Online Certificate 846 Status Protocol - OCSP", RFC 2560, June 1999. 848 [RFC2585] Housley, R. and P. Hoffman, "Internet X.509 Public Key 849 Infrastructure Operational Protocols: FTP and HTTP", RFC 2585, May 850 1999. 852 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, 853 L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- 854 HTTP/1.1", RFC 2616, June 1999. 856 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 857 Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 858 2005. 860 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 861 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 863 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 864 Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure 865 Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, 866 May 2008 868 13. Informative References 870 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 871 RFC 2246, January 1999. 873 [RFC2712] Medvinsky, A. and M. Hur, "Addition of Kerberos Cipher 874 Suites to Transport Layer Security (TLS)", RFC 2712, October 1999. 876 [RFC3268] Chown, P., "Advanced Encryption Standard (AES) Ciphersuites 877 for Transport Layer Security (TLS)", RFC 3268, June 2002. 879 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 880 (TLS) Protocol Version 1.1", RFC 4346, April 2006. 882 [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., 883 and T. Wright, "Transport Layer Security (TLS) Extensions", RFC 4366, 884 April 2006. 886 [X509-4th] ITU-T Recommendation X.509 (2000) | ISO/IEC 9594-8:2001, 887 "Information Systems - Open Systems Interconnection - The Directory: 888 Public key and attribute certificate frameworks." 890 [X509-4th-TC1] ITU-T Recommendation X.509(2000) Corrigendum 1(2001) | 891 ISO/IEC 9594-8:2001/Cor.1:2002, Technical Corrigendum 1 to ISO/IEC 892 9594:8:2001. 894 Annex A: pkipath MIME Type Registration 896 The MIME type application/pkix-pkipath has been registered. A copy 897 of its template is included here for convenience: 899 MIME media type name: application 900 MIME subtype name: pkix-pkipath 901 Required parameters: none 903 Optional parameters: version (default value is "1") 905 Encoding considerations: 906 This MIME type is a DER encoding of the ASN.1 type PkiPath, 907 defined as follows: 908 PkiPath ::= SEQUENCE OF Certificate 909 PkiPath is used to represent a certification path. Within the 910 sequence, the order of certificates is such that the subject of 911 the first certificate is the issuer of the second certificate, 912 etc. 913 This is identical to the definition published in [X509-4th-TC1]; 914 note that it is different from that in [X509-4th]. 916 All Certificates MUST conform to [RFC5280]. (This should be 917 interpreted as a requirement to encode only PKIX-conformant 918 certificates using this type. It does not necessarily require 919 that all certificates that are not strictly PKIX-conformant must 920 be rejected by relying parties, although the security consequences 921 of accepting any such certificates should be considered 922 carefully.) 924 DER (as opposed to BER) encoding MUST be used. If this type is 925 sent over a 7-bit transport, base64 encoding SHOULD be used. 927 Security considerations: 928 The security considerations of [X509-4th] and [RFC5280] (or any 929 updates to them) apply, as well as those of any protocol that uses 930 this type (e.g., TLS). 932 Note that this type only specifies a certificate chain that can be 933 assessed for validity according to the relying party's existing 934 configuration of trusted CAs; it is not intended to be used to 935 specify any change to that configuration. 937 Interoperability considerations: 938 No specific interoperability problems are known with this type, 939 but for recommendations relating to X.509 certificates in general, 940 see [RFC5280]. 942 Published specification: [RFC4366], and [RFC5280]. 944 Applications which use this media type: TLS. It may also be used by 945 other protocols, or for general interchange of PKIX certificate 946 chains. 948 Additional information: 949 Magic number(s): DER-encoded ASN.1 can be easily recognized. 950 Further parsing is required to distinguish it from other ASN.1 951 types. 952 File extension(s): .pkipath 953 Macintosh File Type Code(s): not specified 955 Person & email address to contact for further information: 956 Magnus Nystrom 958 Intended usage: COMMON 960 Change controller: IESG 962 Annex B: Changes from RFC 4366 964 The significant changes between RFC 4366 and this document are 965 described below. 967 RFC 4366 described both general extension mechanisms (for the TLS 968 handshake and client and server hellos) as well as specific 969 extensions. RFC 4366 was associated with RFC 4346, TLS 1.1. The 970 client and server Hello extension mechanisms have been moved into RFC 971 5246, TLS 1.2, so this document, which is associated with RFC 5246, 972 includes only the handshake extension mechanisms and the specific 973 extensions from RFC 4366. RFC 5246 also specifies the unknown 974 extension error and new extension specification considerations so 975 that material has been removed from this document. 977 The Server Name extension now specifies only ASCII representation, 978 eliminating UTF-8. 980 The Client Certificate URLs extension has been changed to make the 981 presence of a hash mandatory. 983 The material was also re-organized in minor ways. For example, 984 information as to which errors are fatal is moved from the one "Error 985 Alerts" section to the individual extension specifications. 987 Author's Address 989 Donald Eastlake 3rd 990 Stellar Switches, Inc. 991 155 Beaver Street 992 Milford, MA 01757 USA 994 Tel: +1-508-634-2066 995 Email: d3e3e3@gmail.com 997 Copyright and IPR Provisions 999 Copyright (c) 2009 IETF Trust and the persons identified as the 1000 document authors. All rights reserved. 1002 This document is subject to BCP 78 and the IETF Trust's Legal 1003 Provisions Relating to IETF Documents in effect on the date of 1004 publication of this document (http://trustee.ietf.org/license-info). 1005 Please review these documents carefully, as they describe your rights 1006 and restrictions with respect to this document. 1008 The definitive version of an IETF Document is that published by, or 1009 under the auspices of, the IETF. Versions of IETF Documents that are 1010 published by third parties, including those that are translated into 1011 other languages, should not be considered to be definitive versions 1012 of IETF Documents. The definitive version of these Legal Provisions 1013 is that published by, or under the auspices of, the IETF. Versions of 1014 these Legal Provisions that are published by third parties, including 1015 those that are translated into other languages, should not be 1016 considered to be definitive versions of these Legal Provisions. For 1017 the avoidance of doubt, each Contributor to the IETF Standards 1018 Process licenses each Contribution that he or she makes as part of 1019 the IETF Standards Process to the IETF Trust pursuant to the 1020 provisions of RFC 5378. No language to the contrary, or terms, 1021 conditions or rights that differ from or are inconsistent with the 1022 rights and licenses granted under RFC 5378, shall have any effect and 1023 shall be null and void, whether published or posted by such 1024 Contributor, or included with or in such Contribution.