diff --git a/include/ocpp/common/evse_security_impl.hpp b/include/ocpp/common/evse_security_impl.hpp index cc6469c2ee..9b9f42ef1e 100644 --- a/include/ocpp/common/evse_security_impl.hpp +++ b/include/ocpp/common/evse_security_impl.hpp @@ -8,18 +8,19 @@ #include #include +#include namespace ocpp { struct SecurityConfiguration { - std::filesystem::path csms_ca_bundle; - std::filesystem::path mf_ca_bundle; - std::filesystem::path mo_ca_bundle; - std::filesystem::path v2g_ca_bundle; - std::filesystem::path csms_leaf_cert_directory; - std::filesystem::path csms_leaf_key_directory; - std::filesystem::path secc_leaf_cert_directory; - std::filesystem::path secc_leaf_key_directory; + fs::path csms_ca_bundle; + fs::path mf_ca_bundle; + fs::path mo_ca_bundle; + fs::path v2g_ca_bundle; + fs::path csms_leaf_cert_directory; + fs::path csms_leaf_key_directory; + fs::path secc_leaf_cert_directory; + fs::path secc_leaf_key_directory; std::optional private_key_password; }; @@ -81,4 +82,4 @@ evse_security::KeyPair from_ocpp(KeyPair other); } // namespace ocpp -#endif \ No newline at end of file +#endif diff --git a/include/ocpp/common/types.hpp b/include/ocpp/common/types.hpp index 109eb3b764..7e084aa712 100644 --- a/include/ocpp/common/types.hpp +++ b/include/ocpp/common/types.hpp @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -506,8 +507,8 @@ struct OCSPRequestData { }; struct KeyPair { - std::filesystem::path certificate_path; - std::filesystem::path key_path; + fs::path certificate_path; + fs::path key_path; std::optional password; }; diff --git a/include/ocpp/v16/charge_point.hpp b/include/ocpp/v16/charge_point.hpp index eb3337aaa1..86f956c021 100644 --- a/include/ocpp/v16/charge_point.hpp +++ b/include/ocpp/v16/charge_point.hpp @@ -60,9 +60,8 @@ class ChargePoint { /// security_configuration must be set /// \param security_configuration specifies the file paths that are required to set up the internal evse_security /// implementation - explicit ChargePoint(const std::string& config, const std::filesystem::path& share_path, - const std::filesystem::path& user_config_path, const std::filesystem::path& database_path, - const std::filesystem::path& sql_init_path, const std::filesystem::path& message_log_path, + explicit ChargePoint(const std::string& config, const fs::path& share_path, const fs::path& user_config_path, + const fs::path& database_path, const fs::path& sql_init_path, const fs::path& message_log_path, const std::shared_ptr evse_security, const std::optional security_configuration = std::nullopt); diff --git a/include/ocpp/v16/charge_point_impl.hpp b/include/ocpp/v16/charge_point_impl.hpp index ed6ca9ee2f..67f652fb16 100644 --- a/include/ocpp/v16/charge_point_impl.hpp +++ b/include/ocpp/v16/charge_point_impl.hpp @@ -315,10 +315,9 @@ class ChargePointImpl : ocpp::ChargingStationBase { /// also available) configuration keys in the "Internal" section of the config file. Please note that this is /// intended for debugging purposes only as it logs all communication, including authentication messages. /// \param evse_security Pointer to evse_security that manages security related operations - explicit ChargePointImpl(const std::string& config, const std::filesystem::path& share_path, - const std::filesystem::path& user_config_path, const std::filesystem::path& database_path, - const std::filesystem::path& sql_init_path, const std::filesystem::path& message_log_path, - const std::shared_ptr evse_security, + explicit ChargePointImpl(const std::string& config, const fs::path& share_path, const fs::path& user_config_path, + const fs::path& database_path, const fs::path& sql_init_path, + const fs::path& message_log_path, const std::shared_ptr evse_security, const std::optional security_configuration); ~ChargePointImpl() { diff --git a/lib/ocpp/common/schemas.cpp b/lib/ocpp/common/schemas.cpp index 5cb7c8d22a..95b62f96b7 100644 --- a/lib/ocpp/common/schemas.cpp +++ b/lib/ocpp/common/schemas.cpp @@ -31,7 +31,7 @@ void Schemas::load_root_schema() { this->schema = json::parse(schema_file); const auto custom_schema_path = schemas_path / "Custom.json"; - if (std::filesystem::exists(custom_schema_path)) { + if (fs::exists(custom_schema_path)) { json custom_object = {{"type", "object"}, {"$ref", "Custom.json"}}; this->schema["properties"]["Custom"] = custom_object; } diff --git a/lib/ocpp/v16/charge_point.cpp b/lib/ocpp/v16/charge_point.cpp index 676cb5ccb6..43a30f9d09 100644 --- a/lib/ocpp/v16/charge_point.cpp +++ b/lib/ocpp/v16/charge_point.cpp @@ -10,9 +10,8 @@ namespace ocpp { namespace v16 { -ChargePoint::ChargePoint(const std::string& config, const std::filesystem::path& share_path, - const std::filesystem::path& user_config_path, const std::filesystem::path& database_path, - const std::filesystem::path& sql_init_path, const std::filesystem::path& message_log_path, +ChargePoint::ChargePoint(const std::string& config, const fs::path& share_path, const fs::path& user_config_path, + const fs::path& database_path, const fs::path& sql_init_path, const fs::path& message_log_path, const std::shared_ptr evse_security, const std::optional security_configuration) { this->charge_point = diff --git a/lib/ocpp/v16/charge_point_impl.cpp b/lib/ocpp/v16/charge_point_impl.cpp index 3894804168..2575b6c7f7 100644 --- a/lib/ocpp/v16/charge_point_impl.cpp +++ b/lib/ocpp/v16/charge_point_impl.cpp @@ -19,10 +19,9 @@ const auto OCSP_REQUEST_TIMER_INTERVAL = std::chrono::hours(12); const auto INITIAL_CERTIFICATE_REQUESTS_DELAY = std::chrono::seconds(60); const auto WEBSOCKET_INIT_DELAY = std::chrono::seconds(2); -ChargePointImpl::ChargePointImpl(const std::string& config, const std::filesystem::path& share_path, - const std::filesystem::path& user_config_path, - const std::filesystem::path& database_path, const std::filesystem::path& sql_init_path, - const std::filesystem::path& message_log_path, +ChargePointImpl::ChargePointImpl(const std::string& config, const fs::path& share_path, + const fs::path& user_config_path, const fs::path& database_path, + const fs::path& sql_init_path, const fs::path& message_log_path, const std::shared_ptr evse_security, const std::optional security_configuration) : ocpp::ChargingStationBase(evse_security, security_configuration),