diff --git a/lib/evse_security/evse_security.cpp b/lib/evse_security/evse_security.cpp index 0b03cbe..e719de9 100644 --- a/lib/evse_security/evse_security.cpp +++ b/lib/evse_security/evse_security.cpp @@ -1118,7 +1118,7 @@ CertificateValidationError EvseSecurity::verify_certificate_internal(const std:: const auto leaf_certificate = _certificate_chain.at(0); std::vector parent_certificates; - fs::path store; + fs::path store = this->ca_bundle_path_map.at(certificate_type); // Retrieve the hierarchy in order to check if the chain contains a root certificate X509CertificateHierarchy& hierarchy = certificate.get_certficate_hierarchy(); @@ -1133,8 +1133,6 @@ CertificateValidationError EvseSecurity::verify_certificate_internal(const std:: } } - store_file = this->ca_bundle_path_map.at(certificate_type); - CertificateValidationError validated{}; if (fs::is_directory(store)) {