Skip to content

Commit a041967

Browse files
committed
expose list of availabe keyexe like ciphersuites
1 parent 455f3db commit a041967

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

include/picotls/openssl.h

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ extern ptls_key_exchange_algorithm_t ptls_openssl_x25519mlkem768;
8484
#endif
8585

8686
extern ptls_key_exchange_algorithm_t *ptls_openssl_key_exchanges[];
87+
extern ptls_key_exchange_algorithm_t *ptls_openssl_key_exchanges_all[];
8788

8889
extern ptls_cipher_algorithm_t ptls_openssl_aes128ecb;
8990
extern ptls_cipher_algorithm_t ptls_openssl_aes128ctr;

lib/openssl.c

+14
Original file line numberDiff line numberDiff line change
@@ -2202,6 +2202,20 @@ ptls_key_exchange_algorithm_t ptls_openssl_x25519mlkem768 = {.id = PTLS_GROUP_X2
22022202
.exchange = x25519mlkem768_exchange};
22032203
#endif
22042204
ptls_key_exchange_algorithm_t *ptls_openssl_key_exchanges[] = {&ptls_openssl_secp256r1, NULL};
2205+
ptls_key_exchange_algorithm_t *ptls_openssl_key_exchanges_all[] = {
2206+
#if PTLS_OPENSSL_HAVE_X25519MLKEM768
2207+
&ptls_openssl_x25519mlkem768,
2208+
#endif
2209+
#if PTLS_OPENSSL_HAVE_SECP521R1
2210+
&ptls_openssl_secp521r1,
2211+
#endif
2212+
#if PTLS_OPENSSL_HAVE_SECP384R1
2213+
&ptls_openssl_secp384r1,
2214+
#endif
2215+
#if PTLS_OPENSSL_HAVE_X25519
2216+
&ptls_openssl_x25519,
2217+
#endif
2218+
&ptls_openssl_secp256r1, NULL};
22052219
ptls_cipher_algorithm_t ptls_openssl_aes128ecb = {
22062220
"AES128-ECB", PTLS_AES128_KEY_SIZE, PTLS_AES_BLOCK_SIZE, 0 /* iv size */, sizeof(struct cipher_context_t),
22072221
aes128ecb_setup_crypto};

0 commit comments

Comments
 (0)