diff options
author | Benjamin Kaduk <bkaduk@akamai.com> | 2018-02-28 14:49:59 -0600 |
---|---|---|
committer | Benjamin Kaduk <kaduk@mit.edu> | 2018-02-28 21:47:09 -0600 |
commit | c39e4048b538ec76313c264e860cfb5cd677a9ac (patch) | |
tree | 015f67d475a23ee0ec42c4fa8f18c37171bf65dd /doc/man3 | |
parent | d91f45688c2d0bfcc5b3b57fb20cc80b010eef0b (diff) | |
download | openssl-new-c39e4048b538ec76313c264e860cfb5cd677a9ac.tar.gz |
Do not set a nonzero default max_early_data
When early data support was first added, this seemed like a good
idea, as it would allow applications to just add SSL_read_early_data()
calls as needed and have things "Just Work". However, for applications
that do not use TLS 1.3 early data, there is a negative side effect.
Having a nonzero max_early_data in a SSL_CTX (and thus, SSL objects
derived from it) means that when generating a session ticket,
tls_construct_stoc_early_data() will indicate to the client that
the server supports early data. This is true, in that the implementation
of TLS 1.3 (i.e., OpenSSL) does support early data, but does not
necessarily indicate that the server application supports early data,
when the default value is nonzero. In this case a well-intentioned
client would send early data along with its resumption attempt, which
would then be ignored by the server application, a waste of network
bandwidth.
Since, in order to successfully use TLS 1.3 early data, the application
must introduce calls to SSL_read_early_data(), it is not much additional
burden to require that the application also calls
SSL_{CTX_,}set_max_early_data() in order to enable the feature; doing
so closes this scenario where early data packets would be sent on
the wire but ignored.
Update SSL_read_early_data.pod accordingly, and make s_server and
our test programs into applications that are compliant with the new
requirements on applications that use early data.
Fixes #4725
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5483)
Diffstat (limited to 'doc/man3')
-rw-r--r-- | doc/man3/SSL_read_early_data.pod | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/man3/SSL_read_early_data.pod b/doc/man3/SSL_read_early_data.pod index d9167569e4..a420e73238 100644 --- a/doc/man3/SSL_read_early_data.pod +++ b/doc/man3/SSL_read_early_data.pod @@ -101,7 +101,9 @@ was rejected or SSL_EARLY_DATA_NOT_SENT if no early data was sent. This function may be called by either the client or the server. A server uses the SSL_read_early_data() function to receive early data on a -connection. As for SSL_write_early_data() this must be the first IO function +connection for which early data has been enabled using +SSL_CTX_set_max_early_data() or SSL_set_max_early_data(). As for +SSL_write_early_data(), this must be the first IO function called on a connection, i.e. it must occur before any calls to L<SSL_write_ex(3)>, L<SSL_read_ex(3)>, L<SSL_accept(3)>, L<SSL_do_handshake(3)>, or other similar functions. @@ -165,12 +167,16 @@ further action taken. When a session is created between a server and a client the server will specify the maximum amount of any early data that it will accept on any future -connection attempt. By default this is approximately 16k. A server may override -this default value by calling SSL_CTX_set_max_early_data() or +connection attempt. By default the server does not accept early data; a +server may indicate support for early data by calling +SSL_CTX_set_max_early_data() or SSL_set_max_early_data() to set it for the whole SSL_CTX or an individual SSL object respectively. Similarly the SSL_CTX_get_max_early_data() and SSL_get_max_early_data() functions can be used to obtain the current maximum early data settings for the SSL_CTX and SSL objects respectively. +Generally a server application will either use both of SSL_read_early_data() +and SSL_CTX_set_max_early_data() (or SSL_set_max_early_data()), or neither +of them, since there is no practical benefit from using only one of them. In the event that the current maximum early data setting for the server is different to that originally specified in a session that a client is resuming |