summaryrefslogtreecommitdiffstats
path: root/test/tls-provider.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/tls-provider.c')
-rw-r--r--test/tls-provider.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/tls-provider.c b/test/tls-provider.c
index adbe88da52..8dfc3bcc7d 100644
--- a/test/tls-provider.c
+++ b/test/tls-provider.c
@@ -210,6 +210,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;
ret &= cb(dummygroup, arg);
}
@@ -817,9 +819,10 @@ unsigned int randomize_tls_group_id(OSSL_LIB_CTX *libctx)
return 0;
/*
* Ensure group_id is within the IANA Reserved for private use range
- * (65024-65279)
+ * (65024-65279).
+ * Carve out NUM_DUMMY_GROUPS ids for properly registering those.
*/
- group_id %= 65279 - 65024;
+ group_id %= 65279 - NUM_DUMMY_GROUPS - 65024;
group_id += 65024;
/* Ensure we did not already issue this group_id */