From 8a54349040cae1e43462099fc4da127e6a0bdaf7 Mon Sep 17 00:00:00 2001 From: Xin Xu Date: Fri, 8 Nov 2024 13:02:55 +0100 Subject: [PATCH] fix: reformat Signed-off-by: Xin Xu --- lib/ocpp/v201/charge_point.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/ocpp/v201/charge_point.cpp b/lib/ocpp/v201/charge_point.cpp index c545c544b..4048773d1 100644 --- a/lib/ocpp/v201/charge_point.cpp +++ b/lib/ocpp/v201/charge_point.cpp @@ -3594,8 +3594,8 @@ void ChargePoint::handle_install_certificate_req(Call const auto msg = call.msg; InstallCertificateResponse response; - if ((msg.certificateType == InstallCertificateUseEnum::CSMSRootCertificate || - msg.certificateType == InstallCertificateUseEnum::ManufacturerRootCertificate) && + if ((msg.certificateType == InstallCertificateUseEnum::CSMSRootCertificate || + msg.certificateType == InstallCertificateUseEnum::ManufacturerRootCertificate) && this->device_model->get_value(ControllerComponentVariables::SecurityProfile) <= 1) { response.status = InstallCertificateStatusEnum::Rejected; response.statusInfo = StatusInfo(); @@ -3604,14 +3604,14 @@ void ChargePoint::handle_install_certificate_req(Call response.statusInfo->additionalInfo = conversions::profile_validation_result_to_string(reason); } else { const auto result = this->evse_security->install_ca_certificate( - msg.certificate.get(), ocpp::evse_security_conversions::from_ocpp_v201(msg.certificateType)); + msg.certificate.get(), ocpp::evse_security_conversions::from_ocpp_v201(msg.certificateType)); response.status = ocpp::evse_security_conversions::to_ocpp_v201(result); if (response.status == InstallCertificateStatusEnum::Accepted) { - const auto& security_event = ocpp::security_events::RECONFIGURATIONOFSECURITYPARAMETERS; - std::string tech_info = - "Installed certificate: " + conversions::install_certificate_use_enum_to_string(msg.certificateType); - this->security_event_notification_req(CiString<50>(security_event), CiString<255>(tech_info), true, - utils::is_critical(security_event)); + const auto& security_event = ocpp::security_events::RECONFIGURATIONOFSECURITYPARAMETERS; + std::string tech_info = + "Installed certificate: " + conversions::install_certificate_use_enum_to_string(msg.certificateType); + this->security_event_notification_req(CiString<50>(security_event), CiString<255>(tech_info), true, + utils::is_critical(security_event)); } } ocpp::CallResult call_result(response, call.uniqueId);