diff --git a/include/evse_security/evse_security.hpp b/include/evse_security/evse_security.hpp index 9046471..8f60006 100644 --- a/include/evse_security/evse_security.hpp +++ b/include/evse_security/evse_security.hpp @@ -101,9 +101,10 @@ class EvseSecurity { /// @param country /// @param organization /// @param common + /// @param use_tpm If the TPM should be used for the CSR request /// @return the PEM formatted certificate signing request std::string generate_certificate_signing_request(LeafCertificateType certificate_type, const std::string& country, - const std::string& organization, const std::string& common); + const std::string& organization, const std::string& common, bool use_tpm); /// @brief Searches the filesystem on the specified directories for the given \p certificate_type and retrieves the /// most recent certificate that is already valid and the respective key. If no certificate is present or no key is diff --git a/lib/evse_security/evse_security.cpp b/lib/evse_security/evse_security.cpp index a818ea6..75ec33d 100644 --- a/lib/evse_security/evse_security.cpp +++ b/lib/evse_security/evse_security.cpp @@ -559,7 +559,8 @@ bool EvseSecurity::is_ca_certificate_installed(CaCertificateType certificate_typ std::string EvseSecurity::generate_certificate_signing_request(LeafCertificateType certificate_type, const std::string& country, const std::string& organization, - const std::string& common) { + const std::string& common, + bool use_tpm) { fs::path key_path; const auto file_name = std::string("SECC_LEAF_") + filesystem_utils::get_random_file_name(KEY_EXTENSION.string()); @@ -574,9 +575,6 @@ std::string EvseSecurity::generate_certificate_signing_request(LeafCertificateTy std::string csr; CertificateSigningRequestInfo info; - // TODO(ioan): get this from the parameter when the interface will support it - bool use_tpm = false; - info.n_version = 0; info.commonName = common; info.country = country;