diff --git a/modules/EvseSecurity/main/evse_securityImpl.cpp b/modules/EvseSecurity/main/evse_securityImpl.cpp index f3269d7a4..050782928 100644 --- a/modules/EvseSecurity/main/evse_securityImpl.cpp +++ b/modules/EvseSecurity/main/evse_securityImpl.cpp @@ -18,8 +18,13 @@ void evse_securityImpl::init() { certs_path / this->mod->config.csms_leaf_key_directory, certs_path / this->mod->config.secc_leaf_cert_directory, certs_path / this->mod->config.secc_leaf_key_directory}; - this->evse_security = - std::make_unique(file_paths, this->mod->config.private_key_password); + + std::optional private_key_password = std::nullopt; + if (!this->mod->config.private_key_password.empty()) { + private_key_password = this->mod->config.private_key_password; + } + + this->evse_security = std::make_unique(file_paths, private_key_password); } void evse_securityImpl::ready() {