diff options
author | John Baldwin <jhb@FreeBSD.org> | 2020-12-23 15:28:34 -0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-06-21 09:28:43 +0200 |
commit | e1fdd5262e4a45ce3aaa631768e877ee7b6da21b (patch) | |
tree | c08ffb9f4cc57464e8af09e885c0bf5f53320ca8 /include | |
parent | b6c276e77295e6d9f99b83c64c3c7df5ca8c5d97 (diff) |
Refactor KTLS tests to better support TLS 1.3.
- Use SSL_set_ciphersuites for TLS 1.3 tests instead of using
SSL_set_cipher_list.
- Don't bother passing a sequence number size to KTLS test functions.
These functions always test TLS (and not DTLS) for which the
sequence size is always the same. In addition, even for DTLS the
check in question (verifying that the sequence number fields in SSL
do not change) should still pass when doing a before/after
comparison of the field.
- Define a helper structure to hold the TLS version and cipher name
for a single KTLS test.
- Define an array of such structures with valid KTLS ciphers and move
#ifdef's for TLS versions and supported ciphers out of test
functions and instead use them to define the valid members of this
array. This also permits using TLS 1.3 cipher suite names for
TLS 1.3 tests.
- Use separate tests per cipher for test_ktls to give more
fine-grained pass/fail results as is already done for
test_ktls_sendfile.
- While here, rename test_ktls_sendfile to execute_test_ktls_sendfile
and test_ktls_sendfile_anytls to test_ktls_sendfile. This is more
consistent with the naming used for test_ktls as well as other tests
in this file.
- Close the file descriptors used for temporary sockets in ktls tests.
- Don't assume that KTLS is supported for all compile-time supported
cipher suites at runtime. If the kernel fails to offload a given
cipher suite, skip the test rather than failing it. FreeBSD kernels
may not offload all of the cipher suites supported by its KTLS if a
suitable driver or KTLS backend is not present.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15814)
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/ktls.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/include/internal/ktls.h b/include/internal/ktls.h index b572e681c5..95492fd065 100644 --- a/include/internal/ktls.h +++ b/include/internal/ktls.h @@ -41,12 +41,6 @@ # define OPENSSL_KTLS_AES_GCM_256 # define OPENSSL_KTLS_TLS13 -/* - * Only used by the tests in sslapitest.c. - */ -# define TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE 8 -# define TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE 8 - typedef struct tls_enable ktls_crypto_info_t; /* |