Skip to content

Commit 2a2a18b

Browse files
committed
Refs #24046: Enable othercacert in 'fill_access'
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
1 parent d9a6750 commit 2a2a18b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

test/blackbox/common/BlackboxTestsSecurity.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,12 @@ static void fill_sub_auth(
143143
static void fill_access(
144144
PropertyPolicy& policy,
145145
const std::string& governance_file = "governance_only_auth.smime",
146-
const std::string& permissions_file = "permissions.smime")
146+
const std::string& permissions_file = "permissions.smime",
147+
const std::string& permissions_ca_file = "maincacert.pem")
147148
{
148149
policy.properties().emplace_back("dds.sec.access.plugin", "builtin.Access-Permissions");
149150
policy.properties().emplace_back("dds.sec.access.builtin.Access-Permissions.permissions_ca",
150-
"file://" + std::string(certs_path) + "/maincacert.pem");
151+
"file://" + std::string(certs_path) + "/" + permissions_ca_file);
151152
policy.properties().emplace_back("dds.sec.access.builtin.Access-Permissions.governance",
152153
"file://" + std::string(certs_path) + "/" + governance_file);
153154
policy.properties().emplace_back("dds.sec.access.builtin.Access-Permissions.permissions",
@@ -1350,7 +1351,7 @@ TEST(Security, AllowUnauthenticatedParticipants_TwoSecureParticipantsWithDiffere
13501351
sub_property_policy.properties().emplace_back(Property("dds.sec.auth.builtin.PKI-DH.private_key",
13511352
"file://" + std::string(certs_path) + "/othersubkey.pem"));
13521353
fill_access(sub_property_policy, "governance_allow_unauth_all_disabled_access_none_other_ca.smime",
1353-
"permissions_helloworld_securehelloworld_other_ca.smime");
1354+
"permissions_helloworld_securehelloworld_other_ca.smime", "othercacert.pem");
13541355
fill_crypto(sub_property_policy);
13551356

13561357
reader.history_depth(10).
@@ -1411,7 +1412,7 @@ TEST(Security, AllowUnauthenticatedParticipants_TwoParticipantsDifferentCertific
14111412
sub_property_policy.properties().emplace_back(Property("dds.sec.auth.builtin.PKI-DH.private_key",
14121413
"file://" + std::string(certs_path) + "/othersubkey.pem"));
14131414
fill_access(sub_property_policy, "governance_allow_unauth_all_disabled_read_write_enabled_other_ca.smime",
1414-
"permissions_helloworld_securehelloworld_other_ca.smime");
1415+
"permissions_helloworld_securehelloworld_other_ca.smime", "othercacert.pem");
14151416
fill_crypto(sub_property_policy);
14161417

14171418
reader.history_depth(10).

0 commit comments

Comments
 (0)