Fix the Padding extension
authorMatt Caswell <matt@openssl.org>
Thu, 16 Mar 2017 10:18:39 +0000 (10:18 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 16 Mar 2017 15:37:41 +0000 (15:37 +0000)
commitd702ad121c18b43f61832318a9e61b8d42aaa06c
treebec8c8019aa72db4c83ce75a5afb1a90a4330238
parent635b7d3f2a3a4c1caaf772dc9a6c1cdcb958f6fe
Fix the Padding extension

In OpenSSL 1.1.0 the padding extension MUST be last because it calculates
the length of everything that has been written into the ClientHello to
determine whether it needs to be padded or not. With TLSv1.3 that isn't
possible because the specification requires that the PSK extension is last.
Therefore we need to fix the padding extension to take account of any PSK
extension that will be later added.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2968)
ssl/statem/extensions.c
ssl/statem/extensions_clnt.c