Skip to content

Commit c046680

Browse files
security-context -> enclave
Signed-off-by: Mikael Arguedas <[email protected]>
1 parent d090059 commit c046680

File tree

10 files changed

+32
-32
lines changed

10 files changed

+32
-32
lines changed

rmw_fastrtps_cpp/src/init_rmw_context_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ init_context_impl(rmw_context_t * context)
6363
context->options.domain_id,
6464
&context->options.security_options,
6565
(context->options.localhost_only == RMW_LOCALHOST_ONLY_ENABLED) ? 1 : 0,
66-
context->options.security_context,
66+
context->options.enclave,
6767
common_context.get()),
6868
[&](CustomParticipantInfo * participant_info) {
6969
if (RMW_RET_OK != rmw_fastrtps_shared_cpp::destroy_participant(participant_info)) {
@@ -173,7 +173,7 @@ init_context_impl(rmw_context_t * context)
173173
}
174174
common_context->graph_cache.add_participant(
175175
common_context->gid,
176-
context->options.security_context);
176+
context->options.enclave);
177177

178178
graph_guard_condition.release();
179179
publisher.release();

rmw_fastrtps_cpp/src/rmw_node_names.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ rmw_get_node_names(
4141
}
4242

4343
rmw_ret_t
44-
rmw_get_node_names_with_security_contexts(
44+
rmw_get_node_names_with_enclaves(
4545
const rmw_node_t * node,
4646
rcutils_string_array_t * node_names,
4747
rcutils_string_array_t * node_namespaces,
48-
rcutils_string_array_t * security_contexts)
48+
rcutils_string_array_t * enclaves)
4949
{
50-
return rmw_fastrtps_shared_cpp::__rmw_get_node_names_with_security_contexts(
51-
eprosima_fastrtps_identifier, node, node_names, node_namespaces, security_contexts);
50+
return rmw_fastrtps_shared_cpp::__rmw_get_node_names_with_enclaves(
51+
eprosima_fastrtps_identifier, node, node_names, node_namespaces, enclaves);
5252
}
5353
} // extern "C"

rmw_fastrtps_dynamic_cpp/src/init_rmw_context_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ init_context_impl(rmw_context_t * context)
6363
context->options.domain_id,
6464
&context->options.security_options,
6565
(context->options.localhost_only == RMW_LOCALHOST_ONLY_ENABLED) ? 1 : 0,
66-
context->options.security_context,
66+
context->options.enclave,
6767
common_context.get()),
6868
[&](CustomParticipantInfo * participant_info) {
6969
if (RMW_RET_OK != rmw_fastrtps_shared_cpp::destroy_participant(participant_info)) {
@@ -174,7 +174,7 @@ init_context_impl(rmw_context_t * context)
174174
}
175175
common_context->graph_cache.add_participant(
176176
common_context->gid,
177-
context->options.security_context);
177+
context->options.enclave);
178178

179179
graph_guard_condition.release();
180180
publisher.release();

rmw_fastrtps_dynamic_cpp/src/rmw_node_names.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ rmw_get_node_names(
4141
}
4242

4343
rmw_ret_t
44-
rmw_get_node_names_with_security_contexts(
44+
rmw_get_node_names_with_enclaves(
4545
const rmw_node_t * node,
4646
rcutils_string_array_t * node_names,
4747
rcutils_string_array_t * node_namespaces,
48-
rcutils_string_array_t * security_contexts)
48+
rcutils_string_array_t * enclaves)
4949
{
50-
return rmw_fastrtps_shared_cpp::__rmw_get_node_names_with_security_contexts(
51-
eprosima_fastrtps_identifier, node, node_names, node_namespaces, security_contexts);
50+
return rmw_fastrtps_shared_cpp::__rmw_get_node_names_with_enclaves(
51+
eprosima_fastrtps_identifier, node, node_names, node_namespaces, enclaves);
5252
}
5353
} // extern "C"

rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/custom_participant_info.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ class ParticipantListener : public eprosima::fastrtps::ParticipantListener
7878
if (name_found == map.end()) {
7979
return;
8080
}
81-
auto security_context =
81+
auto enclave =
8282
std::string(name_found->second.begin(), name_found->second.end());
8383

8484
context->graph_cache.add_participant(
8585
rmw_fastrtps_shared_cpp::create_rmw_gid(
8686
identifier_, info.info.m_guid),
87-
security_context);
87+
enclave);
8888
break;
8989
}
9090
case eprosima::fastrtps::rtps::ParticipantDiscoveryInfo::REMOVED_PARTICIPANT:

rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/participant.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ create_participant(
3232
size_t domain_id,
3333
const rmw_security_options_t * security_options,
3434
bool localhost_only,
35-
const char * security_context,
35+
const char * enclave,
3636
rmw_dds_common::Context * common_context);
3737

3838
RMW_FASTRTPS_SHARED_CPP_PUBLIC

rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/rmw_common.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,12 @@ __rmw_init_event(
126126

127127
RMW_FASTRTPS_SHARED_CPP_PUBLIC
128128
rmw_ret_t
129-
__rmw_get_node_names_with_security_contexts(
129+
__rmw_get_node_names_with_enclaves(
130130
const char * identifier,
131131
const rmw_node_t * node,
132132
rcutils_string_array_t * node_names,
133133
rcutils_string_array_t * node_namespaces,
134-
rcutils_string_array_t * security_contexts);
134+
rcutils_string_array_t * enclaves);
135135

136136
RMW_FASTRTPS_SHARED_CPP_PUBLIC
137137
rmw_ret_t

rmw_fastrtps_shared_cpp/src/participant.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ rmw_fastrtps_shared_cpp::create_participant(
140140
size_t domain_id,
141141
const rmw_security_options_t * security_options,
142142
bool localhost_only,
143-
const char * security_context,
143+
const char * enclave,
144144
rmw_dds_common::Context * common_context)
145145
{
146146
if (!security_options) {
@@ -167,16 +167,16 @@ rmw_fastrtps_shared_cpp::create_participant(
167167

168168
participantAttrs.rtps.builtin.domainId = static_cast<uint32_t>(domain_id);
169169

170-
size_t length = snprintf(nullptr, 0, "securitycontext=%s;", security_context) + 1;
170+
size_t length = snprintf(nullptr, 0, "securitycontext=%s;", enclave) + 1;
171171
participantAttrs.rtps.userData.resize(length);
172172
int written = snprintf(
173173
reinterpret_cast<char *>(participantAttrs.rtps.userData.data()),
174-
length, "securitycontext=%s;", security_context);
174+
length, "securitycontext=%s;", enclave);
175175
if (written < 0 || written > static_cast<int>(length) - 1) {
176176
RMW_SET_ERROR_MSG("failed to populate user_data buffer");
177177
return nullptr;
178178
}
179-
participantAttrs.rtps.setName(security_context);
179+
participantAttrs.rtps.setName(enclave);
180180

181181
bool leave_middleware_default_qos = false;
182182
const char * env_value;

rmw_fastrtps_shared_cpp/src/rmw_init.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ rmw_init_options_init(
3939
init_options->implementation_identifier = identifier;
4040
init_options->allocator = allocator;
4141
init_options->impl = nullptr;
42-
init_options->security_context = NULL;
42+
init_options->enclave = NULL;
4343
init_options->domain_id = RMW_DEFAULT_DOMAIN_ID;
4444
init_options->security_options = rmw_get_default_security_options();
4545
init_options->localhost_only = RMW_LOCALHOST_ONLY_DEFAULT;
@@ -64,19 +64,19 @@ rmw_init_options_copy(
6464
const rcutils_allocator_t * allocator = &src->allocator;
6565
rmw_ret_t ret = RMW_RET_OK;
6666

67-
allocator->deallocate(dst->security_context, allocator->state);
67+
allocator->deallocate(dst->enclave, allocator->state);
6868
*dst = *src;
69-
dst->security_context = NULL;
69+
dst->enclave = NULL;
7070
dst->security_options = rmw_get_zero_initialized_security_options();
7171

72-
dst->security_context = rcutils_strdup(src->security_context, *allocator);
73-
if (src->security_context && !dst->security_context) {
72+
dst->enclave = rcutils_strdup(src->enclave, *allocator);
73+
if (src->enclave && !dst->enclave) {
7474
ret = RMW_RET_BAD_ALLOC;
7575
goto fail;
7676
}
7777
return rmw_security_options_copy(&src->security_options, allocator, &dst->security_options);
7878
fail:
79-
allocator->deallocate(dst->security_context, allocator->state);
79+
allocator->deallocate(dst->enclave, allocator->state);
8080
return ret;
8181
}
8282

@@ -91,7 +91,7 @@ rmw_init_options_fini(const char * identifier, rmw_init_options_t * init_options
9191
init_options->implementation_identifier,
9292
identifier,
9393
return RMW_RET_INCORRECT_RMW_IMPLEMENTATION);
94-
allocator.deallocate(init_options->security_context, allocator.state);
94+
allocator.deallocate(init_options->enclave, allocator.state);
9595
rmw_security_options_fini(&init_options->security_options, &allocator);
9696
*init_options = rmw_get_zero_initialized_init_options();
9797
return RMW_RET_OK;

rmw_fastrtps_shared_cpp/src/rmw_node_names.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ __rmw_get_node_names(
6969
}
7070

7171
rmw_ret_t
72-
__rmw_get_node_names_with_security_contexts(
72+
__rmw_get_node_names_with_enclaves(
7373
const char * identifier,
7474
const rmw_node_t * node,
7575
rcutils_string_array_t * node_names,
7676
rcutils_string_array_t * node_namespaces,
77-
rcutils_string_array_t * security_contexts)
77+
rcutils_string_array_t * enclaves)
7878
{
7979
if (!node) {
8080
RMW_SET_ERROR_MSG("null node handle");
@@ -86,7 +86,7 @@ __rmw_get_node_names_with_security_contexts(
8686
if (rmw_check_zero_rmw_string_array(node_namespaces) != RMW_RET_OK) {
8787
return RMW_RET_ERROR;
8888
}
89-
if (rmw_check_zero_rmw_string_array(security_contexts) != RMW_RET_OK) {
89+
if (rmw_check_zero_rmw_string_array(enclaves) != RMW_RET_OK) {
9090
return RMW_RET_ERROR;
9191
}
9292
if (node->implementation_identifier != identifier) {
@@ -99,7 +99,7 @@ __rmw_get_node_names_with_security_contexts(
9999
return common_context->graph_cache.get_node_names(
100100
node_names,
101101
node_namespaces,
102-
security_contexts,
102+
enclaves,
103103
&allocator);
104104
}
105105
} // namespace rmw_fastrtps_shared_cpp

0 commit comments

Comments
 (0)