Try to fix intermittent CI failures in sslapitest

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/23705)
This commit is contained in:
Bernd Edlinger 2024-02-28 07:14:08 +01:00
parent 6d42be3af7
commit a24f29bbb4

View File

@ -385,6 +385,8 @@ static int tls_prov_get_capabilities(void *provctx, const char *capability,
if (strcmp(capability, "TLS-GROUP") == 0) {
/* Register our 2 groups */
OPENSSL_assert(xor_group.group_id >= 65024
&& xor_group.group_id < 65279 - NUM_DUMMY_GROUPS);
ret = cb(xor_group_params, arg);
ret &= cb(xor_kemgroup_params, arg);
@ -396,6 +398,7 @@ static int tls_prov_get_capabilities(void *provctx, const char *capability,
for (i = 0; i < NUM_DUMMY_GROUPS; i++) {
OSSL_PARAM dummygroup[OSSL_NELEM(xor_group_params)];
unsigned int dummygroup_id;
memcpy(dummygroup, xor_group_params, sizeof(xor_group_params));
@ -411,7 +414,8 @@ static int tls_prov_get_capabilities(void *provctx, const char *capability,
dummygroup[0].data = dummy_group_names[i];
dummygroup[0].data_size = strlen(dummy_group_names[i]) + 1;
/* assign unique group IDs also to dummy groups for registration */
*((int *)(dummygroup[3].data)) = 65279 - NUM_DUMMY_GROUPS + i;
dummygroup_id = 65279 - NUM_DUMMY_GROUPS + i;
dummygroup[3].data = (unsigned char*)&dummygroup_id;
ret &= cb(dummygroup, arg);
}
}