Rationalise RECORD_LAYER_clear() and clear_record_layer()
authorMatt Caswell <matt@openssl.org>
Thu, 18 Jan 2024 12:08:52 +0000 (12:08 +0000)
committerMatt Caswell <matt@openssl.org>
Wed, 31 Jan 2024 10:10:55 +0000 (10:10 +0000)
commit4a0e4849af1588dfe9d7e01738acc96799b83447
tree61b2a7786c577fb5d979e3d8b892dd59305aa485
parenta86714041d8a5868c629e9027e28c6d1dacde5f9
Rationalise RECORD_LAYER_clear() and clear_record_layer()

We had two functions which were very similarly named, that did almost the
same thing, but not quite. We bring the two together. Doing this also fixes
a possible bug where some data may not be correctly freed when the
RECORD_LAYER_clear() version was used.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23256)
ssl/record/rec_layer_s3.c
ssl/record/record.h
ssl/ssl_lib.c