diff options
author | Matt Caswell <matt@openssl.org> | 2017-01-13 17:00:49 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-01-30 10:18:19 +0000 |
commit | ec15acb6bc554b8f87a519c3519f5bf4d367ded9 (patch) | |
tree | ca7810034fa64bb1218a04b3d4c22741bc166667 /ssl/statem/extensions.c | |
parent | a2b7e65526d92123f143cc7f248b4ac017372faf (diff) |
Construct the client side psk extension for TLSv1.3
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2259)
Diffstat (limited to 'ssl/statem/extensions.c')
-rw-r--r-- | ssl/statem/extensions.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ssl/statem/extensions.c b/ssl/statem/extensions.c index dc992010ec..5837720eb7 100644 --- a/ssl/statem/extensions.c +++ b/ssl/statem/extensions.c @@ -264,12 +264,20 @@ static const EXTENSION_DEFINITION ext_defs[] = { NULL, NULL, NULL, tls_construct_stoc_cryptopro_bug, NULL, NULL }, { - /* Last in the list because it must be added as the last extension */ + /* Must be immediately before pre_shared_key */ + /* TODO(TLS1.3): Fix me */ TLSEXT_TYPE_padding, EXT_CLIENT_HELLO, NULL, /* We send this, but don't read it */ NULL, NULL, NULL, tls_construct_ctos_padding, NULL + }, + { + /* Required by the TLSv1.3 spec to always be the last extension */ + TLSEXT_TYPE_psk, + EXT_CLIENT_HELLO | EXT_TLS1_3_SERVER_HELLO | EXT_TLS_IMPLEMENTATION_ONLY + | EXT_TLS1_3_ONLY, + NULL, NULL, NULL, NULL, tls_construct_ctos_psk, NULL } }; |