summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlan1120 <lanming@huawei.com>2023-12-19 17:15:58 +0800
committerMatt Caswell <matt@openssl.org>2023-12-20 13:40:18 +0000
commit1eb50745f909a40c60c3a2607355777a931defdf (patch)
tree73208c0e2da945bde1f71120e6b22097a897007e
parentb379538cc78fdc83b8046931301d53d89967ab75 (diff)
Make SSL_clear_options pass new options to record layer
Signed-off-by: lan1120 <lanming@huawei.com> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23045) (cherry picked from commit e8e95f20a9b00ca62d407263110663eba7614683)
-rw-r--r--ssl/ssl_lib.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 0150589fea..cf59d2dfa5 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -6023,6 +6023,7 @@ uint64_t SSL_set_options(SSL *s, uint64_t op)
/* Ignore return value */
sc->rlayer.rrlmethod->set_options(sc->rlayer.rrl, options);
+ sc->rlayer.wrlmethod->set_options(sc->rlayer.wrl, options);
return sc->options;
}
@@ -6035,6 +6036,7 @@ uint64_t SSL_CTX_clear_options(SSL_CTX *ctx, uint64_t op)
uint64_t SSL_clear_options(SSL *s, uint64_t op)
{
SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
+ OSSL_PARAM options[2], *opts = options;
#ifndef OPENSSL_NO_QUIC
if (IS_QUIC(s))
@@ -6044,7 +6046,17 @@ uint64_t SSL_clear_options(SSL *s, uint64_t op)
if (sc == NULL)
return 0;
- return sc->options &= ~op;
+ sc->options &= ~op;
+
+ *opts++ = OSSL_PARAM_construct_uint64(OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS,
+ &sc->options);
+ *opts = OSSL_PARAM_construct_end();
+
+ /* Ignore return value */
+ sc->rlayer.rrlmethod->set_options(sc->rlayer.rrl, options);
+ sc->rlayer.wrlmethod->set_options(sc->rlayer.wrl, options);
+
+ return sc->options;
}
STACK_OF(X509) *SSL_get0_verified_chain(const SSL *s)