openssl.git
20 months agoTolerate a bad record version in TLSv1.3 plaintext records
Matt Caswell [Wed, 24 Aug 2022 15:02:23 +0000 (16:02 +0100)]
Tolerate a bad record version in TLSv1.3 plaintext records

When a server responds to a second TLSv1.3 ClientHello it is required to
set the legacy_record_version to 0x0303 (TLSv1.2). The client is required
to ignore that field even if it is wrong. The recent changes to the read
record layer in PR #18132 made the record layer stricter and it was
checking that the legacy_record_version was the correct value. This
caused connection failures when talking to buggy servers that set the
wrong legacy_record_version value.

We make us more tolerant again.

Fixes #19051

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19058)

20 months agoAdd design requirements for QUIC packet demuxer
Tomas Mraz [Thu, 5 May 2022 06:59:27 +0000 (08:59 +0200)]
Add design requirements for QUIC packet demuxer

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18249)

20 months agoERR: Make CRYPTO_malloc() and friends report ERR_R_MALLOC_FAILURE
Dr. David von Oheimb [Mon, 12 Apr 2021 08:01:51 +0000 (10:01 +0200)]
ERR: Make CRYPTO_malloc() and friends report ERR_R_MALLOC_FAILURE

Fixes #6251

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/14833)

20 months agoConvert serverinfo in SSL_CTX_use_serverinfo() to v2.
Daniel Fiala [Tue, 24 May 2022 13:11:58 +0000 (15:11 +0200)]
Convert serverinfo in SSL_CTX_use_serverinfo() to v2.

Fixes openssl#18183.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18614)

20 months agoAdd missing ')' to command help
Pauli [Wed, 24 Aug 2022 01:40:13 +0000 (11:40 +1000)]
Add missing ')' to command help

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19049)

20 months agoDrop the optimisation level for ppc64le cross-compile
Matt Caswell [Wed, 24 Aug 2022 14:10:56 +0000 (15:10 +0100)]
Drop the optimisation level for ppc64le cross-compile

The default cross compiler (gcc 9.4.0) for ppc64le on Ubunut 20.04 seems
buggy and causes a seg fault in sslapitest. This doesn't impact any other
CI cross compile platforms and does not seem to impact the gcc 10.3.0 cross
compiler.

We just drop the optimisation level on that platform.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19056)

20 months agoUpdates for OSSL_TIME changes
Hugo Landau [Mon, 15 Aug 2022 15:45:17 +0000 (16:45 +0100)]
Updates for OSSL_TIME changes

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18676)

20 months agoQUIC ACK Manager, Statistics Manager and Congestion Control API
Hugo Landau [Tue, 28 Jun 2022 12:52:48 +0000 (13:52 +0100)]
QUIC ACK Manager, Statistics Manager and Congestion Control API

This is the initial implementation of the ACK Manager for OpenSSL's QUIC
support, with supporting design documentation and tests.

Because the ACK Manager also depends on the Statistics Manager, it is
also implemented here. The Statistics Manager is quite simple, so this
does not amount to a large amount of extra code.

Because the ACK Manager depends on a congestion controller, it adds a
no-op congestion controller, which uses the previously workshopped
congestion control API.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18676)

20 months agoCMP: correct handling of fallback subject in OSSL_CMP_CTX_setup_CRM() and its doc
Dr. David von Oheimb [Mon, 1 Aug 2022 18:34:19 +0000 (20:34 +0200)]
CMP: correct handling of fallback subject in OSSL_CMP_CTX_setup_CRM() and its doc

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18929)

20 months agoCMP: fix crash in check_transactionID_or_nonce() on 'actual' being NULL
Dr. David von Oheimb [Mon, 1 Aug 2022 18:18:09 +0000 (20:18 +0200)]
CMP: fix crash in check_transactionID_or_nonce() on 'actual' being NULL

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18929)

20 months agoCRMF: make create_popo_signature() check that pubkey and pkey match
Dr. David von Oheimb [Mon, 1 Aug 2022 16:54:06 +0000 (18:54 +0200)]
CRMF: make create_popo_signature() check that pubkey and pkey match

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18930)

20 months agoadd missing CRMF API function OSSL_CRMF_CERTTEMPLATE_get0_publicKey()
Dr. David von Oheimb [Mon, 1 Aug 2022 14:47:04 +0000 (16:47 +0200)]
add missing CRMF API function OSSL_CRMF_CERTTEMPLATE_get0_publicKey()

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18930)

20 months agoX509: clean up doc and implementation of X509{,_REQ}_check_private_key()
Dr. David von Oheimb [Mon, 1 Aug 2022 15:43:00 +0000 (17:43 +0200)]
X509: clean up doc and implementation of X509{,_REQ}_check_private_key()

Also constify X509_REQ_get0_pubkey() and X509_REQ_check_private_key().

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18930)

20 months agox509_att.c: improve error checking and reporting and coding style
Dr. David von Oheimb [Mon, 1 Aug 2022 14:33:35 +0000 (16:33 +0200)]
x509_att.c: improve error checking and reporting and coding style

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18931)

20 months agoadd missing doc of X509_REQ_get_extensions() and X509_REQ_add_extensions{,_nid}()
Dr. David von Oheimb [Mon, 1 Aug 2022 14:35:42 +0000 (16:35 +0200)]
add missing doc of X509_REQ_get_extensions() and X509_REQ_add_extensions{,_nid}()

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18931)

20 months agoX509_REQ_get_extensions: add error queue entry on ill-formed extensions attribute
Dr. David von Oheimb [Mon, 1 Aug 2022 13:06:35 +0000 (15:06 +0200)]
X509_REQ_get_extensions: add error queue entry on ill-formed extensions attribute

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18931)

20 months agoutil/wrap.pl.in: If the subprocess died with a signal, let's re-signal it
Richard Levitte [Mon, 22 Aug 2022 16:40:54 +0000 (18:40 +0200)]
util/wrap.pl.in: If the subprocess died with a signal, let's re-signal it

A simple 'kill' of the same signal on our own process should do it.
This will allow the shell that this is running under to catch it
properly, and output something if it usually does that.

Fixes #19041

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19042)

20 months agoFix the return type for the rlayer_skip_early_data callback
Matt Caswell [Tue, 23 Aug 2022 13:45:32 +0000 (14:45 +0100)]
Fix the return type for the rlayer_skip_early_data callback

There was a copy & paste error in the definition of the
rlayer_skip_early_data callback. The return type is supposed to
be "int" but it was defined as a pointer type. This was causing
test failures on some platforms.

Fixes #19037

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/19048)

20 months agorl->enc_ctx must be non-NULL and cipher must be set
Tomas Mraz [Fri, 19 Aug 2022 10:28:42 +0000 (12:28 +0200)]
rl->enc_ctx must be non-NULL and cipher must be set

Otherwise ssl3_cipher() cannot work properly.

Fixes Coverity CID 1509401

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19027)

20 months agoDo not use RLAYERfatal on NULL RLAYER
Tomas Mraz [Fri, 19 Aug 2022 10:19:55 +0000 (12:19 +0200)]
Do not use RLAYERfatal on NULL RLAYER

or on record layer that is to be freed anyway.

Fixes Coverity CID 15094021509403

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19027)

20 months agoCoverity 1508532: out of bounds access
Pauli [Mon, 22 Aug 2022 01:06:57 +0000 (11:06 +1000)]
Coverity 1508532: out of bounds access

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19033)

20 months agoOSSL_HTTP_REQ_CTX_nbio: add support for partial content-type string matching
Dr. David von Oheimb [Tue, 28 Jun 2022 15:23:45 +0000 (17:23 +0200)]
OSSL_HTTP_REQ_CTX_nbio: add support for partial content-type string matching

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18675)

20 months agoapp_http_tls_cb() and tls_error_hint(): code cleanup
Dr. David von Oheimb [Tue, 28 Jun 2022 10:10:49 +0000 (12:10 +0200)]
app_http_tls_cb() and tls_error_hint(): code cleanup

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18675)

20 months agoMakefile: Generate crypto objects only as far as needed
Dr. David von Oheimb [Tue, 11 May 2021 13:35:43 +0000 (15:35 +0200)]
Makefile: Generate crypto objects only as far as needed

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/15224)

20 months agoMakefile: Call mknum.pl on 'make ordinals' only if needed
Dr. David von Oheimb [Tue, 11 May 2021 10:59:03 +0000 (12:59 +0200)]
Makefile: Call mknum.pl on 'make ordinals' only if needed

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/15224)

20 months agoSupport decode SM2 parameters
K1 [Mon, 18 Jul 2022 17:18:12 +0000 (01:18 +0800)]
Support decode SM2 parameters

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18819)

20 months agoMoving notify check after the no time check
Ryan Kelley [Tue, 16 Aug 2022 05:28:50 +0000 (05:28 +0000)]
Moving notify check after the no time check

CLA: trivial

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19007)

20 months agoopenssl speed fails in FIPS mode
Dmitry Belyavskiy [Tue, 21 Dec 2021 15:52:25 +0000 (16:52 +0100)]
openssl speed fails in FIPS mode

...because it uses md5 for HMAC tests. Skip md5 in case of its
unavailability.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17331)

20 months agoFix typo in migration guide
Tobias Nießen [Sat, 20 Aug 2022 16:56:21 +0000 (18:56 +0200)]
Fix typo in migration guide

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19032)

20 months agoAlways automatically add -DPEDANTIC with enable-ubsan
Tomas Mraz [Fri, 19 Aug 2022 13:48:34 +0000 (15:48 +0200)]
Always automatically add -DPEDANTIC with enable-ubsan

To avoid reports like: #19028

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19029)

20 months agoFix doc-nits
Todd Short [Mon, 22 Aug 2022 18:12:50 +0000 (14:12 -0400)]
Fix doc-nits

PR #19031 updated options that that were listed as commands, these
options were already in openssl-list.pod.in, so they are redundant
in openssl.pod.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19044)

20 months agoevp: Use functions instead of direct structure field references
Tianjia Zhang [Mon, 30 Aug 2021 07:34:06 +0000 (15:34 +0800)]
evp: Use functions instead of direct structure field references

AES and chacha20poly1305 also have some codes that directly reference
the fields in the EVP_CIPHER_CTX structure, such as 'ctx->buf' and
'ctx->encrypt', in order to make the code style uniform, use the
corresponding interface API instead of direct field references.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16465)

20 months agoevp: Simplify ARIA aead cipher definition
Tianjia Zhang [Mon, 30 Aug 2021 06:28:07 +0000 (14:28 +0800)]
evp: Simplify ARIA aead cipher definition

Remove fixed macro variables, only keep the cipher mode name and
key length.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16465)

20 months agoAdd BSD-armv4 target based on linux-armv4
Piotr Kubaj [Fri, 29 Jul 2022 10:47:29 +0000 (12:47 +0200)]
Add BSD-armv4 target based on linux-armv4

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18910)

21 months agoClarify dashes are required for openssl list command
Jeff Croxell [Fri, 19 Aug 2022 02:30:20 +0000 (21:30 -0500)]
Clarify dashes are required for openssl list command

Fixes #19013

CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19031)

21 months agoUpdate gitignore
Todd Short [Thu, 18 Aug 2022 15:05:43 +0000 (11:05 -0400)]
Update gitignore

Add test/timing_load_creds

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19021)

21 months agoBIO_sendmmsg/BIO_recvmmsg (API only)
Hugo Landau [Mon, 1 Aug 2022 09:33:00 +0000 (10:33 +0100)]
BIO_sendmmsg/BIO_recvmmsg (API only)

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18923)

21 months agoLimit the size of various MAXCHUNK definitions
Pauli [Mon, 15 Aug 2022 04:49:17 +0000 (14:49 +1000)]
Limit the size of various MAXCHUNK definitions

The current code has issues when sizeof(long) <> sizeof(size_t).  The two
types are assumed to be interchangeable and them being different will
cause crashes and endless loops.

This fix limits the maximum chunk size for many of the symmetric ciphers
to 2^30 bytes.  This chunk size limits the amount of data that will
be encrypted/decrypted in one lump.  The code internally handles block
of data later than the chunk limit, so this will present no difference
to the caller.  Any loss of efficiency due to limiting the chunking to
1Gbyte rather than more should be insignificant.

Fixes Coverity issues:
    15084981508500 - 15085051508507 - 15085271508529 - 1508533,
    1508535 - 150853715085391508541 - 15085491508551 - 1508569 &
    1508571 - 1508582.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18997)

21 months agoCoverity: misuses of time_t
Pauli [Tue, 16 Aug 2022 01:05:02 +0000 (11:05 +1000)]
Coverity: misuses of time_t

Coverity 1508506:

    Fixes a bug in the cookie code which would have caused problems for
    ten minutes before and after the lower 32 bits of time_t rolled over.

Coverity 1508534 & 1508540:

    Avoid problems when the lower 32 bits of time_t roll over by delaying
    the cast to integer until after the time delta has been computed.

Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19004)

21 months agoCheck record layer callbacks are non-null
Matt Caswell [Tue, 9 Aug 2022 14:52:27 +0000 (15:52 +0100)]
Check record layer callbacks are non-null

The current libssl code always ensures that the callbacks are non-null.
However, the record layer itself wasn't checkthing this. We ensure it does.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoFormatting cleanups
Matt Caswell [Wed, 27 Jul 2022 13:20:23 +0000 (14:20 +0100)]
Formatting cleanups

Some minor formatting cleanups and other minor tweaks.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove redefinition of macros
Matt Caswell [Wed, 27 Jul 2022 15:44:01 +0000 (16:44 +0100)]
Remove redefinition of macros

Some macros were redefined in ssl3_cbc.c. We remove the redefinitions

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove redefinition of SSL_AD_NO_ALERT
Matt Caswell [Wed, 27 Jul 2022 13:54:48 +0000 (14:54 +0100)]
Remove redefinition of SSL_AD_NO_ALERT

The SSL_AD_NO_ALERT value was defined in two places. We centralise its
definition.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoEnsure the rrl object is set to NULL after it is freed
Matt Caswell [Wed, 27 Jul 2022 13:52:13 +0000 (14:52 +0100)]
Ensure the rrl object is set to NULL after it is freed

Once we free the rrl object we should NULL it to prevent a dangling ref
to it. Otherwise we could get a double free.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRename some functions to be more consistent
Matt Caswell [Wed, 27 Jul 2022 13:50:16 +0000 (14:50 +0100)]
Rename some functions to be more consistent

Some functions in the record layer were called rlayer_*, but most were
called tls_*. We standardise on the latter.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRename DTLS1_BITMAP to DTLS_BITMAP
Matt Caswell [Wed, 27 Jul 2022 13:44:28 +0000 (14:44 +0100)]
Rename DTLS1_BITMAP to DTLS_BITMAP

The 1 in DTLS1 is confusing and is removed. We also tweak the structure
to always be able to track 64 packets regardless of whether we are on a
32 bit or 64 bit system.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove ssl/record/README.md
Matt Caswell [Wed, 27 Jul 2022 13:40:16 +0000 (14:40 +0100)]
Remove ssl/record/README.md

This file contains design details for the old record layer and is no
longer relevant for the new design.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoStandardise type for epoch
Matt Caswell [Wed, 27 Jul 2022 13:37:27 +0000 (14:37 +0100)]
Standardise type for epoch

The value for epoch was being represented internally via various types:
uint16_t, unsigned short, unsigned int, unsigned long

We standardise on uint16_t

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove the SSL3_RECORD read field
Matt Caswell [Wed, 27 Jul 2022 13:28:36 +0000 (14:28 +0100)]
Remove the SSL3_RECORD read field

The read field is no longer used and can be safely removed.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoAdd a CHANGES.md entry for the record layer changes
Matt Caswell [Tue, 26 Jul 2022 15:41:55 +0000 (16:41 +0100)]
Add a CHANGES.md entry for the record layer changes

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoClean up some SCTP releated issues
Matt Caswell [Tue, 26 Jul 2022 14:25:03 +0000 (15:25 +0100)]
Clean up some SCTP releated issues

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoEnsure various record layer options can be updated
Matt Caswell [Tue, 26 Jul 2022 13:34:38 +0000 (14:34 +0100)]
Ensure various record layer options can be updated

We would like the capability for the options/mode/read_ahead settings
to be updateable after the record layer object has been instantiated.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove some redundant code
Matt Caswell [Tue, 26 Jul 2022 11:44:09 +0000 (12:44 +0100)]
Remove some redundant code

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoUpdate the tls13encryptiontest for new read record layer
Matt Caswell [Tue, 26 Jul 2022 11:44:28 +0000 (12:44 +0100)]
Update the tls13encryptiontest for new read record layer

The tls13encryption is an internal test that reaches inside libssl
to test encryption/decryption of records. It needs to be amended for the
new code structure so that it is testing the equivalent things as before.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoImplement a human readable state function for the record layer
Matt Caswell [Fri, 22 Jul 2022 14:38:26 +0000 (15:38 +0100)]
Implement a human readable state function for the record layer

This allows querying of the record layer to get a human readable state
string out. This resolves two outstanding TODO comments and enables us
to remove the rstate variable from s->rlayer.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoCorrect some formatting errors in tls1_meth.c
Matt Caswell [Fri, 22 Jul 2022 14:04:07 +0000 (15:04 +0100)]
Correct some formatting errors in tls1_meth.c

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoMove SSL_MODE_RELEASE_BUFFERS into the read record layer
Matt Caswell [Fri, 22 Jul 2022 13:30:53 +0000 (14:30 +0100)]
Move SSL_MODE_RELEASE_BUFFERS into the read record layer

This resolves an outstanding "TODO" item.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove a redundant TODO
Matt Caswell [Fri, 22 Jul 2022 13:23:25 +0000 (14:23 +0100)]
Remove a redundant TODO

If read_ahead data is left over when a record layer closes down, there is
already code present to push into the "next" BIO. So the TODO removed here
is no longer relevant.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoCleanse the SSLv3 MAC secret when we clean up the read record layer
Matt Caswell [Fri, 22 Jul 2022 13:16:33 +0000 (14:16 +0100)]
Cleanse the SSLv3 MAC secret when we clean up the read 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)

21 months agoMove some fields out of the SSL object and into the record layer object
Matt Caswell [Fri, 22 Jul 2022 11:39:24 +0000 (12:39 +0100)]
Move some fields out of the SSL object and into the record layer object

Fields such as rrlmethod and rrl are entirely related to the record layer,
and so should be in that object.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove an unnecessary setup of the read buffer
Matt Caswell [Thu, 21 Jul 2022 16:17:05 +0000 (17:17 +0100)]
Remove an unnecessary setup of the read buffer

Now everything has been moved to the record layer the additional check
for setting up the read buffer is not needed and can be removed.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoClear away some unused fields and cruft in the record layer
Matt Caswell [Thu, 21 Jul 2022 16:01:54 +0000 (17:01 +0100)]
Clear away some unused fields and cruft in the record layer

Now that the read record layer has moved to the new architecture we can
clear some of the old stuff away.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove some references to rlayer.rstate
Matt Caswell [Thu, 21 Jul 2022 14:39:39 +0000 (15:39 +0100)]
Remove some references to rlayer.rstate

This also fixes ssl3_pending while we are at it

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoEnsure we use a dgram mem BIO for the DTLS record layer
Matt Caswell [Thu, 21 Jul 2022 14:13:46 +0000 (15:13 +0100)]
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)

21 months agoRemove some more redundant TODO(RECLAYER) comments
Matt Caswell [Wed, 20 Jul 2022 14:22:41 +0000 (15:22 +0100)]
Remove some more redundant TODO(RECLAYER) comments

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoResolve a TODO(RECLAYER) in the SSLv3 code
Matt Caswell [Wed, 20 Jul 2022 14:15:32 +0000 (15:15 +0100)]
Resolve a TODO(RECLAYER) in the SSLv3 code

We remove some code outside of the record layer which is no longer
relevant since its functions are now performed by the new record layer
code. This removes a TODO(RECLAYER) as a result.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove some TODO(RECLAYER) comments
Matt Caswell [Wed, 20 Jul 2022 13:49:53 +0000 (14:49 +0100)]
Remove some TODO(RECLAYER) comments

Some TODO(RECLAYER) comments are no longer necessary and can be removed.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove some unnecessary function pointers from OSSL_RECORD_METHOD
Matt Caswell [Tue, 19 Jul 2022 14:49:51 +0000 (15:49 +0100)]
Remove some unnecessary function pointers from OSSL_RECORD_METHOD

We had some temporary function pointers in OSSL_RECORD_METHOD which were
only necessary during the process of refactoring the read record layer.
These are no longer required so can be removed.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoStandardise some DTLS record layer naming
Matt Caswell [Mon, 27 Jun 2022 16:10:59 +0000 (17:10 +0100)]
Standardise some DTLS record layer naming

Remove references to dtls1_* and just use dtls_*

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove some remaining SSL object references from DTLS record layer
Matt Caswell [Fri, 24 Jun 2022 15:45:14 +0000 (16:45 +0100)]
Remove some remaining SSL object references from 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)

21 months agoPush unprocessed DTLS records from one record layer object to next
Matt Caswell [Fri, 24 Jun 2022 15:32:06 +0000 (16:32 +0100)]
Push unprocessed DTLS records from one record layer object to next

We add unprocessed DTLS records to the unprocessed record queue. When
the record layer closes down we write the unprocessed records to the
next record layer object.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove reliance on the SSL object from the DTLS read record layer code
Matt Caswell [Wed, 8 Jun 2022 13:52:44 +0000 (14:52 +0100)]
Remove reliance on the SSL object from the DTLS read record layer code

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoMove some DTLS read code into the read record layer
Matt Caswell [Thu, 2 Jun 2022 15:29:04 +0000 (16:29 +0100)]
Move some DTLS read code into the read 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)

21 months agoRemove some final references to the SSL object in the record layer
Matt Caswell [Wed, 25 May 2022 16:30:33 +0000 (17:30 +0100)]
Remove some final references to the SSL object in the 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)

21 months agoRemove the separation betweeen enc_read_ctx and enc_write_ctx
Matt Caswell [Wed, 25 May 2022 16:19:33 +0000 (17:19 +0100)]
Remove the separation betweeen enc_read_ctx and enc_write_ctx

Similarly with read_hash and write_hash. In the new model we have a
separate record layer object for reading and writing. Therefore we don't
need to distinguish between reading and writing inside the record layer
object in the encryption and md ctxs.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoEnable the record layer to call the ssl_security callback
Matt Caswell [Wed, 25 May 2022 16:10:38 +0000 (17:10 +0100)]
Enable the record layer to call the ssl_security callback

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoUse a record layer specific message callback
Matt Caswell [Wed, 25 May 2022 15:41:30 +0000 (16:41 +0100)]
Use a record layer specific message callback

Don't use the message callback from the SSL object. Instead we use a
wrapper callback so that the record layer does not need to be aware of the
SSL object.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoMove early data counting out of the SSL object and into the record layer
Matt Caswell [Wed, 25 May 2022 14:16:48 +0000 (15:16 +0100)]
Move early data counting out of the SSL object and into the 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)

21 months agoMove the sequence number into the OSSL_RECORD_LAYER object
Matt Caswell [Tue, 24 May 2022 15:00:50 +0000 (16:00 +0100)]
Move the sequence number into the OSSL_RECORD_LAYER object

This removes some references to the SSL object from the 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)

21 months agoRemove use of SSL object for fragment length checking in record layer
Matt Caswell [Mon, 23 May 2022 10:31:53 +0000 (11:31 +0100)]
Remove use of SSL object for fragment length checking in record layer

Pass the max fragment length to the record layer when it is applicable
to avoid the need to go through the SSL object.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove use of ossl_statem_in_error() from the record layer
Matt Caswell [Fri, 20 May 2022 15:58:51 +0000 (16:58 +0100)]
Remove use of ossl_statem_in_error() from the record layer

We remove the dependency on the SSL object. Instead we check if the
record layer has already set an alert code.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoMake the record layer directly aware of EtM
Matt Caswell [Fri, 20 May 2022 15:54:12 +0000 (16:54 +0100)]
Make the record layer directly aware of EtM

We no longer have to go through the SSL object to discover whether EtM has
been negotiated.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove SSL_USE_EXPLICT_IV() from the record layer methods
Matt Caswell [Thu, 19 May 2022 16:11:13 +0000 (17:11 +0100)]
Remove SSL_USE_EXPLICT_IV() from the record layer methods

Instead we introduce RLAYER_USE_EXPLICIT_IV(). This removes a dependency
on the SSL object.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove some use of SSL object from record layer
Matt Caswell [Thu, 19 May 2022 15:58:45 +0000 (16:58 +0100)]
Remove some use of SSL object from record layer

Remove SSL_IS_TLS13() and hello_retry_request

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoUpdate the oqs-provider submodule to a more recent commit
Matt Caswell [Thu, 19 May 2022 14:49:32 +0000 (15:49 +0100)]
Update the oqs-provider submodule to a more recent commit

Also update the oqsprovider.sh file to not run the preptests.sh script
which is no longer required

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoDisallow SSL2_VERSION record version in an SSLv3 record header
Matt Caswell [Wed, 18 May 2022 14:26:04 +0000 (15:26 +0100)]
Disallow SSL2_VERSION record version in an SSLv3 record header

When validate_record_header() gets called it should be able to rely on
the fact that an SSLv2 record version means that the record was received in
SSLv2 format.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoFix some no-comp compilation failures
Matt Caswell [Wed, 18 May 2022 13:30:24 +0000 (14:30 +0100)]
Fix some no-comp compilation failures

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoAdd support for moving data from one epoch to the next
Matt Caswell [Tue, 17 May 2022 15:16:40 +0000 (16:16 +0100)]
Add support for moving data from one epoch to the next

Sometimes data read by a record layer in one epoch is actually intended for
the next epoch. For example in a TLS with read_ahead, the read_ahead data
could contain a KeyUpdate message followed by application data encrypted
with new keys. Therefore we implement a mechanism for passing this data
across the epochs.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoAdd a test for read_ahead data crossing a key change
Matt Caswell [Tue, 17 May 2022 13:36:39 +0000 (14:36 +0100)]
Add a test for read_ahead data crossing a key change

If read_ahead is switched on, it should still work even if the data that
is read cross epochs.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoRemove unneccesary KTLS code from non-KTLS specific files
Matt Caswell [Thu, 12 May 2022 16:21:25 +0000 (17:21 +0100)]
Remove unneccesary KTLS code from non-KTLS specific files

This also moves other protocol specific code to the protocol specific
files.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoMove ktls.c into the record layer
Matt Caswell [Thu, 12 May 2022 16:00:59 +0000 (17:00 +0100)]
Move ktls.c into the 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)

21 months agoDistinguish between fatal and non-fatal errors when creating a record layer
Matt Caswell [Thu, 12 May 2022 15:35:52 +0000 (16:35 +0100)]
Distinguish between fatal and non-fatal errors when creating a 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)

21 months agoImplement KTLS in the new read record layer code
Matt Caswell [Tue, 10 May 2022 17:50:00 +0000 (18:50 +0100)]
Implement KTLS in the new read record layer code

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoMove protocol version specific code into separate files
Matt Caswell [Mon, 9 May 2022 11:00:54 +0000 (12:00 +0100)]
Move protocol version specific code into separate files

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoEnsure various SSL options are passed down to the record layer
Matt Caswell [Fri, 6 May 2022 14:10:00 +0000 (15:10 +0100)]
Ensure various SSL options are passed down to the 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)

21 months agoConvert TLSv1.3 code to use the new read side record layer
Matt Caswell [Fri, 29 Apr 2022 16:13:23 +0000 (17:13 +0100)]
Convert TLSv1.3 code to use the new read side 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)

21 months agoConvert SSLv3 code to use the new read side record layer
Matt Caswell [Thu, 28 Apr 2022 15:57:07 +0000 (16:57 +0100)]
Convert SSLv3 code to use the new read side 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)

21 months agoMove Record layer methods code into a sub-directory
Matt Caswell [Tue, 19 Apr 2022 16:15:54 +0000 (17:15 +0100)]
Move Record layer methods code into a sub-directory

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoMove the TLS1.0/1.1/1.2 record crypto code into the new record layer
Matt Caswell [Mon, 18 Apr 2022 07:57:32 +0000 (08:57 +0100)]
Move the TLS1.0/1.1/1.2 record crypto code into the new record layer

Only done for the read side so far. Still need to do TLS1.3 and SSL3.0.
Also need to separate out KTLS.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

21 months agoConvert ssl3_get_record to tls_read_record
Matt Caswell [Tue, 12 Apr 2022 13:50:28 +0000 (14:50 +0100)]
Convert ssl3_get_record to tls_read_record

We move the old ssl3_get_record function to conform with the new record
layer design.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)