summaryrefslogtreecommitdiffstats
path: root/test/tls-provider.c
diff options
context:
space:
mode:
authorNicola Tuveri <nic.tuv@gmail.com>2020-09-28 01:16:29 +0200
committerNicola Tuveri <nic.tuv@gmail.com>2020-10-14 17:42:59 +0200
commitc1a74f59ac799087c511d641cb086722817b805b (patch)
tree5d8ae19144d619a20ef2ab87d39bee7aea674d54 /test/tls-provider.c
parent[test][tls-provider] Add 2nd pluggable tls group for KEM (diff)
downloadopenssl-c1a74f59ac799087c511d641cb086722817b805b.tar.xz
openssl-c1a74f59ac799087c511d641cb086722817b805b.zip
Define OSSL_CAPABILITY_TLS_GROUP_IS_KEM
Note that with this commit the optional parameter is introduced, but libssl still ignores it. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13018)
Diffstat (limited to 'test/tls-provider.c')
-rw-r--r--test/tls-provider.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/tls-provider.c b/test/tls-provider.c
index c8a378d3be..d890e9a04b 100644
--- a/test/tls-provider.c
+++ b/test/tls-provider.c
@@ -49,6 +49,7 @@ struct tls_group_st {
unsigned int maxtls;
unsigned int mindtls;
unsigned int maxdtls;
+ unsigned int is_kem; /* boolean */
};
#define XORGROUP_NAME "xorgroup"
@@ -59,7 +60,8 @@ static struct tls_group_st xor_group = {
TLS1_3_VERSION, /* mintls */
0, /* maxtls */
-1, /* mindtls */
- -1 /* maxdtls */
+ -1, /* maxdtls */
+ 0 /* is_kem */
};
#define XORKEMGROUP_NAME "xorkemgroup"
@@ -70,7 +72,8 @@ static struct tls_group_st xor_kemgroup = {
TLS1_3_VERSION, /* mintls */
0, /* maxtls */
-1, /* mindtls */
- -1 /* maxdtls */
+ -1, /* maxdtls */
+ 1 /* is_kem */
};
#define ALGORITHM "XOR"
@@ -90,6 +93,7 @@ static const OSSL_PARAM xor_group_params[] = {
OSSL_PARAM_int(OSSL_CAPABILITY_TLS_GROUP_MAX_TLS, &xor_group.maxtls),
OSSL_PARAM_int(OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS, &xor_group.mindtls),
OSSL_PARAM_int(OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS, &xor_group.maxdtls),
+ OSSL_PARAM_uint(OSSL_CAPABILITY_TLS_GROUP_IS_KEM, &xor_group.is_kem),
OSSL_PARAM_END
};
@@ -108,6 +112,7 @@ static const OSSL_PARAM xor_kemgroup_params[] = {
OSSL_PARAM_int(OSSL_CAPABILITY_TLS_GROUP_MAX_TLS, &xor_kemgroup.maxtls),
OSSL_PARAM_int(OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS, &xor_kemgroup.mindtls),
OSSL_PARAM_int(OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS, &xor_kemgroup.maxdtls),
+ OSSL_PARAM_uint(OSSL_CAPABILITY_TLS_GROUP_IS_KEM, &xor_kemgroup.is_kem),
OSSL_PARAM_END
};