!22881 added client/server password

Merge pull request !22881 from anancds/node
This commit is contained in:
i-robot 2021-09-03 12:34:20 +00:00 committed by Gitee
commit da69703896
3 changed files with 10 additions and 3 deletions

View File

@ -408,6 +408,10 @@ PYBIND11_MODULE(_c_expression, m) {
.def("scheduler_manage_port", &PSContext::scheduler_manage_port, "Get scheduler manage port used to scale out/in.")
.def("set_enable_ssl", &PSContext::set_enable_ssl, "Set PS SSL mode enabled or disabled.")
.def("enable_ssl", &PSContext::enable_ssl, "Get PS SSL mode enabled or disabled.")
.def("set_client_password", &PSContext::set_client_password, "Set the client password to decode the p12 file.")
.def("client_password", &PSContext::client_password, "Get the client password to decode the p12 file.")
.def("set_server_password", &PSContext::set_server_password, "Set the server password to decode the p12 file.")
.def("server_password", &PSContext::server_password, "Get the server password to decode the p12 file.")
.def("set_config_file_path", &PSContext::set_config_file_path,
"Set configuration files required by the communication layer.")
.def("config_file_path", &PSContext::config_file_path,

View File

@ -145,9 +145,8 @@ void Node::ProcessSendDataResp(const std::shared_ptr<MessageMeta> &meta, const P
if (size > 0) {
size_t dest_size = size;
size_t src_size = size;
auto ret = memcpy_s(received_data.get()->data(), dest_size, data, src_size);
if (ret != EOK) {
MS_LOG(EXCEPTION) << "The memcpy_s error, errorno(" << ret << ")";
if (memcpy_s(received_data.get()->data(), dest_size, data, src_size) != EOK) {
MS_LOG(EXCEPTION) << "The memcpy_s error";
}
}
if (it != receive_messages_.end()) {

View File

@ -69,6 +69,8 @@ _set_ps_context_func_map = {
"client_learning_rate": ps_context().set_client_learning_rate,
"worker_step_num_per_iteration": ps_context().set_worker_step_num_per_iteration,
"enable_ps_ssl": ps_context().set_enable_ssl,
"client_password": ps_context().set_client_password,
"server_password": ps_context().set_server_password,
"scheduler_manage_port": ps_context().set_scheduler_manage_port,
"config_file_path": ps_context().set_config_file_path,
"dp_eps": ps_context().set_dp_eps,
@ -102,6 +104,8 @@ _get_ps_context_func_map = {
"client_learning_rate": ps_context().client_learning_rate,
"worker_step_num_per_iteration": ps_context().worker_step_num_per_iteration,
"enable_ps_ssl": ps_context().enable_ssl,
"client_password": ps_context().client_password,
"server_password": ps_context().server_password,
"scheduler_manage_port": ps_context().scheduler_manage_port,
"config_file_path": ps_context().config_file_path
}