Skip to content

Commit

Permalink
Added support for extra GetKeyPairResult parameter
Browse files Browse the repository at this point in the history
Signed-off-by: AssemblyJohn <ioan.bogdann@gmail.com>
  • Loading branch information
AssemblyJohn committed Jan 24, 2024
1 parent e2077b7 commit f728954
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ everest-utils:
# setting it here can be misleading since it does not affect the version being used
libevse-security:
git: https://github.com/EVerest/libevse-security.git
git_tag: v0.4.1
git_tag: 90af7a4
5 changes: 5 additions & 0 deletions lib/staging/ocpp/evse_security_ocpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ std::optional<ocpp::KeyPair> EvseSecurity::get_key_pair(const ocpp::CertificateS
}
}

bool EvseSecurity::update_certificate_links(const ocpp::CertificateSigningUseEnum& certificate_type) {
// TODO: Implement if required
return false;
}

std::string EvseSecurity::get_verify_file(const ocpp::CaCertificateType& certificate_type) {
return this->r_security.call_get_verify_file(conversions::from_ocpp(certificate_type));
}
Expand Down
1 change: 1 addition & 0 deletions lib/staging/ocpp/evse_security_ocpp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class EvseSecurity : public ocpp::EvseSecurity {
const std::string& country, const std::string& organization,
const std::string& common, bool use_tpm) override;
std::optional<ocpp::KeyPair> get_key_pair(const ocpp::CertificateSigningUseEnum& certificate_type) override;
bool update_certificate_links(const ocpp::CertificateSigningUseEnum& certificate_type) override;
std::string get_verify_file(const ocpp::CaCertificateType& certificate_type) override;
int get_leaf_expiry_days_count(const ocpp::CertificateSigningUseEnum& certificate_type) override;
};
Expand Down
2 changes: 2 additions & 0 deletions modules/EvseSecurity/conversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ evse_security::KeyPair from_everest(types::evse_security::KeyPair other) {
evse_security::KeyPair lhs;
lhs.key = other.key;
lhs.certificate = other.certificate;
lhs.certificate_single = other.certificate_single;
lhs.password = other.password;
return lhs;
}
Expand Down Expand Up @@ -393,6 +394,7 @@ types::evse_security::KeyPair to_everest(evse_security::KeyPair other) {
types::evse_security::KeyPair lhs;
lhs.key = other.key;
lhs.certificate = other.certificate;
lhs.certificate_single = other.certificate_single;
lhs.password = other.password;
return lhs;
}
Expand Down
6 changes: 5 additions & 1 deletion types/evse_security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,16 @@ types:
required:
- key
- certificate
- certificate_single
properties:
key:
description: The path of the PEM or DER encoded private key
type: string
certificate:
description: The path of the PEM or DER encoded certificate
description: The path of the PEM or DER encoded certificate chain
type: string
certificate_single:
description: The path of the PEM or DER encoded single certificate
type: string
password:
description: Specifies the password for the private key if encrypted
Expand Down

0 comments on commit f728954

Please sign in to comment.