@@ -423,7 +423,8 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::signCertifica
423423 std::stringstream sign_cert_cmd_line;
424424 sign_cert_cmd_line << " openssl x509 -req -sha256 -days 3650 -in " << csr_filename << " -CA " << ca_cert_path << " -CAkey "
425425 << ca_cert_key_path << " -CAcreateserial -out " << certificate_filename;
426- int err = WEXITSTATUS (system (sign_cert_cmd_line.str ().c_str ()));
426+ int system_ret = system (sign_cert_cmd_line.str ().c_str ());
427+ int err = WEXITSTATUS (system_ret);
427428 cout << " Command line : " << sign_cert_cmd_line.str () << " => " << err << endl;
428429
429430 // Check if the certificate has been generated
@@ -433,7 +434,8 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::signCertifica
433434 std::string bundle_filename = certificate_filename + " .bundle" ;
434435 std::stringstream generate_bundle_cmd_line;
435436 generate_bundle_cmd_line << " cat " << certificate_filename << " " << ca_cert_path << " > " << bundle_filename;
436- err = WEXITSTATUS (system (generate_bundle_cmd_line.str ().c_str ()));
437+ int bundle_ret = system (generate_bundle_cmd_line.str ().c_str ());
438+ err = WEXITSTATUS (bundle_ret);
437439 cout << " Command line : " << generate_bundle_cmd_line.str () << " => " << err << endl;
438440 if (std::filesystem::exists (bundle_filename))
439441 {
@@ -611,7 +613,8 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::iso15118SignC
611613 std::stringstream sign_cert_cmd_line;
612614 sign_cert_cmd_line << " openssl x509 -req -sha256 -days 3650 -in " << csr_filename << " -CA " << ca_cert_path << " -CAkey "
613615 << ca_cert_key_path << " -CAcreateserial -out " << certificate_filename;
614- int err = WEXITSTATUS (system (sign_cert_cmd_line.str ().c_str ()));
616+ int system_ret = system (sign_cert_cmd_line.str ().c_str ());
617+ int err = WEXITSTATUS (system_ret);
615618 cout << " Command line : " << sign_cert_cmd_line.str () << " => " << err << endl;
616619
617620 // Check if the certificate has been generated
@@ -621,7 +624,8 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::iso15118SignC
621624 std::string bundle_filename = certificate_filename + " .bundle" ;
622625 std::stringstream generate_bundle_cmd_line;
623626 generate_bundle_cmd_line << " cat " << certificate_filename << " " << ca_cert_path << " > " << bundle_filename;
624- err = WEXITSTATUS (system (generate_bundle_cmd_line.str ().c_str ()));
627+ int bundle_ret = system (generate_bundle_cmd_line.str ().c_str ());
628+ err = WEXITSTATUS (bundle_ret);
625629 cout << " Command line : " << generate_bundle_cmd_line.str () << " => " << err << endl;
626630 if (std::filesystem::exists (bundle_filename))
627631 {
0 commit comments