diff options
author | Matt Caswell <matt@openssl.org> | 2022-07-21 15:13:46 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2022-08-18 16:38:13 +0100 |
commit | db1a505ced696b104b03a072079e663cceecf692 (patch) | |
tree | d5515ea6e6482269c369bc215e6fd707f54dfdb9 /ssl/record/rec_layer_s3.c | |
parent | 499b2c4654a28838924b60cab754fffa7b9f5609 (diff) | |
download | openssl-new-db1a505ced696b104b03a072079e663cceecf692.tar.gz |
Ensure we use a dgram mem BIO for the DTLS record layer
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)
Diffstat (limited to 'ssl/record/rec_layer_s3.c')
-rw-r--r-- | ssl/record/rec_layer_s3.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c index b695556211..30796f2024 100644 --- a/ssl/record/rec_layer_s3.c +++ b/ssl/record/rec_layer_s3.c @@ -1893,7 +1893,10 @@ int ssl_set_new_record_layer(SSL_CONNECTION *s, int version, && level != OSSL_RECORD_PROTECTION_LEVEL_NONE) epoch = DTLS_RECORD_LAYER_get_r_epoch(&s->rlayer) + 1; /* new epoch */ - s->rrlnext = BIO_new(BIO_s_mem()); + if (SSL_CONNECTION_IS_DTLS(s)) + s->rrlnext = BIO_new(BIO_s_dgram_mem()); + else + s->rrlnext = BIO_new(BIO_s_mem()); if (s->rrlnext == NULL) { BIO_free(prev); |