Skip to content

Commit

Permalink
Support for tpm CSR request (#489)
Browse files Browse the repository at this point in the history
* Support for tpm CSR request

Signed-off-by: AssemblyJohn <[email protected]>

* Update dependencies
Bump version to 2023.12.0

Signed-off-by: Kai-Uwe Hermann <[email protected]>

---------

Signed-off-by: AssemblyJohn <[email protected]>
Signed-off-by: Kai-Uwe Hermann <[email protected]>
Co-authored-by: Kai-Uwe Hermann <[email protected]>
  • Loading branch information
AssemblyJohn and hikinggrass authored Dec 27, 2023
1 parent d0c77e0 commit 6c3e62c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.14.7)

project(everest-core
VERSION 2023.10.0
VERSION 2023.12.0
DESCRIPTION "The open operating system for e-mobility charging stations"
LANGUAGES CXX C
)
Expand Down
10 changes: 5 additions & 5 deletions dependencies.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
everest-framework:
git: https://github.com/EVerest/everest-framework.git
git_tag: a233ec8
git_tag: v0.9.0
options: ["BUILD_TESTING OFF"]
sigslot:
git: https://github.com/palacaze/sigslot
Expand Down Expand Up @@ -41,11 +41,11 @@ libcurl:
# OCPP
libocpp:
git: https://github.com/EVerest/libocpp.git
git_tag: "a6cd837"
git_tag: v0.9.6
# Josev
Josev:
git: https://github.com/EVerest/ext-switchev-iso15118.git
git_tag: 928f678
git_tag: 2023.12.0
# OpenV2G
ext-openv2g:
git: https://github.com/EVerest/ext-openv2g.git
Expand All @@ -61,9 +61,9 @@ ext-mbedtls:
# everest-testing
everest-utils:
git: https://github.com/EVerest/everest-utils.git
git_tag: a054460
git_tag: v0.2.0
# evse-security, since this is a direct dependency of libocpp it will get overwritten by the version set there
# 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.3.0
git_tag: v0.4.0
3 changes: 3 additions & 0 deletions interfaces/evse_security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ cmds:
common:
description: Specifies the common name (CN) of the certificate
type: string
use_tpm:
description: Specifies if the CSR should store the private key on the TPM
type: boolean
result:
description: The certificate signing request in PEM format
type: string
Expand Down
4 changes: 2 additions & 2 deletions lib/staging/ocpp/evse_security_ocpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ bool EvseSecurity::is_ca_certificate_installed(const ocpp::CaCertificateType& ce
std::string EvseSecurity::generate_certificate_signing_request(const ocpp::CertificateSigningUseEnum& certificate_type,
const std::string& country,
const std::string& organization,
const std::string& common) {
const std::string& common, bool use_tpm) {
return this->r_security.call_generate_certificate_signing_request(conversions::from_ocpp(certificate_type), country,
organization, common);
organization, common, use_tpm);
}

std::optional<ocpp::KeyPair> EvseSecurity::get_key_pair(const ocpp::CertificateSigningUseEnum& certificate_type) {
Expand Down
2 changes: 1 addition & 1 deletion lib/staging/ocpp/evse_security_ocpp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class EvseSecurity : public ocpp::EvseSecurity {
bool is_ca_certificate_installed(const ocpp::CaCertificateType& certificate_type) override;
std::string generate_certificate_signing_request(const ocpp::CertificateSigningUseEnum& certificate_type,
const std::string& country, const std::string& organization,
const std::string& common) override;
const std::string& common, bool use_tpm) override;
std::optional<ocpp::KeyPair> get_key_pair(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
4 changes: 2 additions & 2 deletions modules/EvseSecurity/main/evse_securityImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ bool evse_securityImpl::handle_is_ca_certificate_installed(types::evse_security:

std::string evse_securityImpl::handle_generate_certificate_signing_request(
types::evse_security::LeafCertificateType& certificate_type, std::string& country, std::string& organization,
std::string& common) {
std::string& common, bool& use_tpm) {
return this->evse_security->generate_certificate_signing_request(conversions::from_everest(certificate_type),
country, organization, common);
country, organization, common, use_tpm);
}

types::evse_security::GetKeyPairResult
Expand Down
4 changes: 2 additions & 2 deletions modules/EvseSecurity/main/evse_securityImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class evse_securityImpl : public evse_securityImplBase {
virtual bool handle_is_ca_certificate_installed(types::evse_security::CaCertificateType& certificate_type) override;
virtual std::string
handle_generate_certificate_signing_request(types::evse_security::LeafCertificateType& certificate_type,
std::string& country, std::string& organization,
std::string& common) override;
std::string& country, std::string& organization, std::string& common,
bool& use_tpm) override;
virtual types::evse_security::GetKeyPairResult
handle_get_key_pair(types::evse_security::LeafCertificateType& certificate_type,
types::evse_security::EncodingFormat& encoding) override;
Expand Down

0 comments on commit 6c3e62c

Please sign in to comment.