Skip to content

Commit

Permalink
Fix after fixes in libevse-security
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Rogach <[email protected]>
  • Loading branch information
jannejy committed Nov 19, 2024
1 parent 991e73f commit 59ed8f5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/ocpp/common/evse_security.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ class EvseSecurity {
/// \brief Retrieves the PEM formatted CA bundle file for the given \p certificate_type
/// \param certificate_type
/// \return CA certificate file
virtual std::string get_verify_file(const CaCertificateType& certificate_type) = 0;

/// \brief Retrieves the PEM formatted CA bundle location for the given \p certificate_type
/// \param certificate_type
/// \return CA certificate file
virtual std::string get_verify_location(const CaCertificateType& certificate_type) = 0;

/// \brief Gets the expiry day count for the leaf certificate of the given \p certificate_type
Expand Down
1 change: 1 addition & 0 deletions include/ocpp/common/evse_security_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class EvseSecurityImpl : public EvseSecurity {
GetCertificateInfoResult get_leaf_certificate_info(const CertificateSigningUseEnum& certificate_type,
bool include_ocsp = false) override;
bool update_certificate_links(const CertificateSigningUseEnum& certificate_type) override;
std::string get_verify_file(const CaCertificateType& certificate_type) override;
std::string get_verify_location(const CaCertificateType& certificate_type) override;
int get_leaf_expiry_days_count(const CertificateSigningUseEnum& certificate_type) override;
};
Expand Down
4 changes: 4 additions & 0 deletions lib/ocpp/common/evse_security_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ bool EvseSecurityImpl::update_certificate_links(const CertificateSigningUseEnum&
return this->evse_security->update_certificate_links(conversions::from_ocpp(certificate_type));
}

std::string EvseSecurityImpl::get_verify_file(const CaCertificateType& certificate_type) {
return this->evse_security->get_verify_file(conversions::from_ocpp(certificate_type));
}

std::string EvseSecurityImpl::get_verify_location(const CaCertificateType& certificate_type) {
return this->evse_security->get_verify_location(conversions::from_ocpp(certificate_type));
}
Expand Down
1 change: 1 addition & 0 deletions tests/lib/ocpp/common/evse_security_mock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class EvseSecurityMock : public EvseSecurity {
MOCK_METHOD(GetCertificateInfoResult, get_leaf_certificate_info, (const CertificateSigningUseEnum&, bool),
(override));
MOCK_METHOD(bool, update_certificate_links, (const CertificateSigningUseEnum&), (override));
MOCK_METHOD(std::string, get_verify_file, (const CaCertificateType&), (override));
MOCK_METHOD(std::string, get_verify_location, (const CaCertificateType&), (override));
MOCK_METHOD(int, get_leaf_expiry_days_count, (const CertificateSigningUseEnum&), (override));
};
Expand Down

0 comments on commit 59ed8f5

Please sign in to comment.