summaryrefslogtreecommitdiffstats
path: root/test/quicapitest.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2024-11-06 10:59:46 +0100
committerTomas Mraz <tomas@openssl.org>2024-11-08 14:36:17 +0100
commitb10cfd93fd58cc1e9c876be159253b5389dc11a5 (patch)
tree659607a33c0be0bd808467893b82bf0c20c140ce /test/quicapitest.c
parentDon't complain with "no cipher match" for QUIC objects (diff)
downloadopenssl-b10cfd93fd58cc1e9c876be159253b5389dc11a5.tar.xz
openssl-b10cfd93fd58cc1e9c876be159253b5389dc11a5.zip
Add a test for setting TLSv1.2 ciphersuites on a QUIC object
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/25886)
Diffstat (limited to '')
-rw-r--r--test/quicapitest.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/quicapitest.c b/test/quicapitest.c
index 25a9889d48..d384d17cbd 100644
--- a/test/quicapitest.c
+++ b/test/quicapitest.c
@@ -285,7 +285,7 @@ static int test_fin_only_blocking(void)
static int test_ciphersuites(void)
{
SSL_CTX *ctx = SSL_CTX_new_ex(libctx, NULL, OSSL_QUIC_client_method());
- SSL *ssl;
+ SSL *ssl = NULL;
int testresult = 0;
const STACK_OF(SSL_CIPHER) *ciphers = NULL;
const SSL_CIPHER *cipher;
@@ -302,10 +302,20 @@ static int test_ciphersuites(void)
if (!TEST_ptr(ctx))
return 0;
+ /*
+ * Attempting to set TLSv1.2 ciphersuites should succeed, even though they
+ * aren't used in QUIC.
+ */
+ if (!TEST_true(SSL_CTX_set_cipher_list(ctx, "DEFAULT")))
+ goto err;
+
ssl = SSL_new(ctx);
if (!TEST_ptr(ssl))
goto err;
+ if (!TEST_true(SSL_set_cipher_list(ssl, "DEFAULT")))
+ goto err;
+
ciphers = SSL_get_ciphers(ssl);
for (i = 0, j = 0; i < OSSL_NELEM(cipherids); i++) {