aboutsummaryrefslogtreecommitdiffstats
path: root/test/cipherlist_test.c
diff options
context:
space:
mode:
authorErik Lax <erik@datahack.se>2021-07-30 00:47:46 +0200
committerTomas Mraz <tomas@openssl.org>2021-09-30 12:20:01 +0200
commitd1b26ddbf6a9165c71884eff228300e3d83be1b1 (patch)
tree65f74cb2910cb94b05e684da9eb9e5833dade00d /test/cipherlist_test.c
parent398ae8231650c4bd8ddff0e5efd38233c23b1ca0 (diff)
downloadopenssl-d1b26ddbf6a9165c71884eff228300e3d83be1b1.tar.gz
Allow cipher strings to be given using its standard name
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16179)
Diffstat (limited to 'test/cipherlist_test.c')
-rw-r--r--test/cipherlist_test.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/cipherlist_test.c b/test/cipherlist_test.c
index 2d166e2b46..c46e431b00 100644
--- a/test/cipherlist_test.c
+++ b/test/cipherlist_test.c
@@ -244,10 +244,26 @@ end:
return result;
}
+/* SSL_CTX_set_cipher_list matching with cipher standard name */
+static int test_stdname_cipherlist(void)
+{
+ SETUP_CIPHERLIST_TEST_FIXTURE();
+ if (!TEST_true(SSL_CTX_set_cipher_list(fixture->server, TLS1_RFC_RSA_WITH_AES_128_SHA))
+ || !TEST_true(SSL_CTX_set_cipher_list(fixture->client, TLS1_RFC_RSA_WITH_AES_128_SHA))) {
+ goto end;
+ }
+ result = 1;
+end:
+ tear_down(fixture);
+ fixture = NULL;
+ return result;
+}
+
int setup_tests(void)
{
ADD_TEST(test_default_cipherlist_implicit);
ADD_TEST(test_default_cipherlist_explicit);
ADD_TEST(test_default_cipherlist_clear);
+ ADD_TEST(test_stdname_cipherlist);
return 1;
}