diff --git a/include/ocpp/v201/smart_charging.hpp b/include/ocpp/v201/smart_charging.hpp index dfbfd080b..b3f796da9 100644 --- a/include/ocpp/v201/smart_charging.hpp +++ b/include/ocpp/v201/smart_charging.hpp @@ -27,7 +27,6 @@ enum class ProfileValidationResultEnum { EvseDoesNotExist, ExistingChargingStationExternalConstraints, InvalidSecurityProfile, - InvalidProfileType, TxProfileMissingTransactionId, TxProfileEvseIdNotGreaterThanZero, TxProfileTransactionNotOnEvse, diff --git a/lib/ocpp/v201/charge_point.cpp b/lib/ocpp/v201/charge_point.cpp index f099b6dc5..bdf919f64 100644 --- a/lib/ocpp/v201/charge_point.cpp +++ b/lib/ocpp/v201/charge_point.cpp @@ -3601,17 +3601,16 @@ void ChargePoint::handle_install_certificate_req(Call response.statusInfo = StatusInfo(); response.statusInfo->reasonCode = "Invalid security profile"; response.statusInfo->additionalInfo = "SecurityProfileTooLowForCertificateHandling"; - } - else { + } 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);