Skip to content

Commit 2fadaa5

Browse files
committed
Config based symlinks update
Signed-off-by: AssemblyJohn <ioan.bogdann@gmail.com>
1 parent 280bbc2 commit 2fadaa5

File tree

5 files changed

+33
-1
lines changed

5 files changed

+33
-1
lines changed

config/v201/component_schemas/standardized/InternalCtrlr.json

+15
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,21 @@
471471
"default": "43200",
472472
"type": "integer"
473473
},
474+
"UpdateCertificateSymlinks": {
475+
"variable_name": "UpdateCertificateSymlinks",
476+
"characteristics": {
477+
"supportsMonitoring": false,
478+
"dataType": "boolean"
479+
},
480+
"attributes": [
481+
{
482+
"type": "Actual",
483+
"mutability": "ReadOnly"
484+
}
485+
],
486+
"default": "0",
487+
"type": "boolean"
488+
},
474489
"MessageQueueSizeThreshold": {
475490
"variable_name": "MessageQueueSizeThreshold",
476491
"characteristics": {

config/v201/config.json

+7
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,14 @@
265265
"attributes": {
266266
"Actual": "Enabled,Active,Available,Problem"
267267
}
268+
},
269+
"UpdateCertificateSymlinks": {
270+
"variable_name": "UpdateCertificateSymlinks",
271+
"attributes": {
272+
"Actual": "0"
273+
}
268274
}
275+
269276
}
270277
},
271278
{

include/ocpp/v201/ctrlr_component_variables.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ extern const ComponentVariable& CertSigningRepeatTimes;
176176
extern const ComponentVariable& CertSigningWaitMinimum;
177177
extern const RequiredComponentVariable& SecurityCtrlrIdentity;
178178
extern const ComponentVariable& MaxCertificateChainSize;
179+
extern const ComponentVariable& UpdateCertificateSymlinks;
179180
extern const RequiredComponentVariable& OrganizationName;
180181
extern const RequiredComponentVariable& SecurityProfile;
181182
extern const ComponentVariable& ACPhaseSwitchingSupported;

lib/ocpp/v201/charge_point.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -1764,7 +1764,9 @@ void ChargePoint::handle_certificate_signed_req(Call<CertificateSignedRequest> c
17641764
}
17651765

17661766
// Trigger a symlink update for V2G certificates
1767-
if (cert_signing_use == ocpp::CertificateSigningUseEnum::V2GCertificate) {
1767+
if ((cert_signing_use == ocpp::CertificateSigningUseEnum::V2GCertificate) and
1768+
this->device_model->get_optional_value<bool>(ControllerComponentVariables::UpdateCertificateSymlinks)
1769+
.value_or(false)) {
17681770
this->evse_security->update_certificate_links(cert_signing_use);
17691771
}
17701772

lib/ocpp/v201/ctrlr_component_variables.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,13 @@ const ComponentVariable& MaxCertificateChainSize = {
989989
"MaxCertificateChainSize",
990990
}),
991991
};
992+
const ComponentVariable& UpdateCertificateSymlinks = {
993+
ControllerComponents::InternalCtrlr,
994+
std::nullopt,
995+
std::optional<Variable>({
996+
"UpdateCertificateSymlinks",
997+
}),
998+
};
992999
const RequiredComponentVariable& OrganizationName = {
9931000
ControllerComponents::SecurityCtrlr,
9941001
std::nullopt,

0 commit comments

Comments
 (0)