Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

security-context -> enclave #414

Merged
merged 1 commit into from
Apr 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions test_security/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,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 @@ -355,11 +355,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
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