Skip to content

Commit

Permalink
security-context -> enclave
Browse files Browse the repository at this point in the history
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
  • Loading branch information
mikaelarguedas committed Apr 9, 2020
1 parent ce0a94d commit e9c36e7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test_security/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ if(BUILD_TESTING)
find_program(PROGRAM ros2)

set(node_names_list "/publisher;/subscriber;/publisher_missing_key;/publisher_invalid_cert")
set(generate_artifacts_command ${PROGRAM} security generate_artifacts -k ${KEYSTORE_DIRECTORY_NATIVE_PATH} -c ${node_names_list})
set(generate_artifacts_command ${PROGRAM} security generate_artifacts -k ${KEYSTORE_DIRECTORY_NATIVE_PATH} -e ${node_names_list})
execute_process(
COMMAND ${generate_artifacts_command}
RESULT_VARIABLE GENERATE_ARTIFACTS_RESULT
Expand All @@ -352,11 +352,11 @@ if(BUILD_TESTING)
endif()

# deleting key of /publisher_missing_key
file(REMOVE "${KEYSTORE_DIRECTORY}/contexts/publisher_missing_key/key.pem")
file(REMOVE "${KEYSTORE_DIRECTORY}/enclaves/publisher_missing_key/key.pem")

# copy invalid certificate from source tree
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test/test_security_files/publisher_invalid_cert/cert.pem
DESTINATION ${KEYSTORE_DIRECTORY}/contexts/publisher_invalid_cert/
DESTINATION ${KEYSTORE_DIRECTORY}/enclaves/publisher_invalid_cert/
)
call_for_each_rmw_implementation(targets)
endif()
Expand Down
2 changes: 1 addition & 1 deletion test_security/test/test_invalid_secure_node_creation_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ TEST_P(TestSecureNodes, test_invalid_keystore) {
ret = rcl_init_options_init(&init_options, rcl_get_default_allocator());
ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
context = rcl_get_zero_initialized_context();
const char * argv[] = {"--ros-args", "--security-context", test_config.context_name};
const char * argv[] = {"--ros-args", "--enclave", test_config.context_name};
ret = rcl_init(sizeof(argv) / sizeof(char *), argv, &init_options, &context);
if (test_config.should_fail_context_creation) {
ASSERT_EQ(RCL_RET_ERROR, ret);
Expand Down
2 changes: 1 addition & 1 deletion test_security/test/test_secure_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int main(int argc, char ** argv)
"pass a message type\n");
return 1;
}
const char * args[] = {"--ros-args", "--security-context", "/publisher"};
const char * args[] = {"--ros-args", "--enclave", "/publisher"};
rclcpp::init(sizeof(args) / sizeof(char *), args);
std::string message = argv[1];
std::string namespace_ = argv[2];
Expand Down
2 changes: 1 addition & 1 deletion test_security/test/test_secure_subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ int main(int argc, char ** argv)
bool should_timeout =
((0 == strcmp(argv[2], "false")) || (0 == strcmp(argv[2], "0"))) ? false : true;

const char * args[] = {"--ros-args", "--security-context", "/subscriber"};
const char * args[] = {"--ros-args", "--enclave", "/subscriber"};
rclcpp::init(sizeof(args) / sizeof(char *), args);
std::shared_ptr<rclcpp::Node> node = nullptr;
try {
Expand Down

0 comments on commit e9c36e7

Please sign in to comment.