Only send custom extensions where we have received one in the ClientHello
We already did this for ServerHello and EncryptedExtensions. We should be doing it for Certificate and HelloRetryRequest as well. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3298)
This commit is contained in:
parent
84c34ba876
commit
7f533d6fa1
1 changed files with 4 additions and 5 deletions
|
@ -181,11 +181,10 @@ int custom_ext_add(SSL *s, int context, WPACKET *pkt, X509 *x, size_t chainidx,
|
|||
|
||||
if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO
|
||||
| SSL_EXT_TLS1_3_SERVER_HELLO
|
||||
| SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS)) != 0) {
|
||||
/*
|
||||
* For ServerHello/EncryptedExtensions only send extensions present
|
||||
* in ClientHello.
|
||||
*/
|
||||
| SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS
|
||||
| SSL_EXT_TLS1_3_CERTIFICATE
|
||||
| SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)) != 0) {
|
||||
/* Only send extensions present in ClientHello. */
|
||||
if (!(meth->ext_flags & SSL_EXT_FLAG_RECEIVED))
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue