Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timers for certificate expiration check (A03) #250

Merged
merged 6 commits into from
Nov 9, 2023

Conversation

klemmpnx
Copy link
Contributor

@klemmpnx klemmpnx commented Nov 7, 2023

Add timers for the renewal of charging station certificates (use case A03). Oriented at OCPP1.6 implementation.

Note: requires update of libevse-security to correctly return remaining valid days (see https://github.com/EVerest/libevse-security/pull/14/files)

Tested in https://github.com/PionixInternal/ocpp-testing/pull/34

@klemmpnx klemmpnx requested a review from Pietfried November 7, 2023 17:32
@klemmpnx klemmpnx self-assigned this Nov 7, 2023
@klemmpnx
Copy link
Contributor Author

klemmpnx commented Nov 9, 2023

One concern of mine: I added the initialization of the timers to both the handle_boot_notification_response as well the connected_callback of the websocket (here conditioned though if there was a "offline" time). The latter is necessary I think because the timers need to be stopped at any disconnect.
However, I am not sure when exactly the this->registration_status == RegistrationStatusEnum::Accepted condition is fulfilled and it might be more useful to just start the timers every time (unconditioned) in the connected_callback instead of the boot_notification_response?

@klemmpnx klemmpnx force-pushed the pg-ocpp201-cert-handling branch from d38648e to c22842a Compare November 9, 2023 13:23
@klemmpnx klemmpnx force-pushed the fk-ocpp201-a03-renew-expiring-certs branch from 980db91 to 6a28c29 Compare November 9, 2023 13:40
Signed-off-by: Fabian Klemm <[email protected]>

add timers for certificate renewal

Signed-off-by: Fabian Klemm <[email protected]>
Signed-off-by: Fabian Klemm <[email protected]>
Signed-off-by: Fabian Klemm <[email protected]>
@klemmpnx klemmpnx force-pushed the fk-ocpp201-a03-renew-expiring-certs branch from 6a28c29 to 87d12e5 Compare November 9, 2023 13:51
@klemmpnx klemmpnx changed the base branch from pg-ocpp201-cert-handling to main November 9, 2023 13:52
@klemmpnx klemmpnx marked this pull request as ready for review November 9, 2023 13:52
Signed-off-by: Fabian Klemm <[email protected]>

format

Signed-off-by: Fabian Klemm <[email protected]>
@klemmpnx klemmpnx force-pushed the fk-ocpp201-a03-renew-expiring-certs branch from 87d12e5 to 7d8ed76 Compare November 9, 2023 13:54
@klemmpnx klemmpnx changed the title add timers for certificate expiration chck Add timers for certificate expiration check (A03) Nov 9, 2023
@Pietfried
Copy link
Contributor

Pietfried commented Nov 9, 2023

One concern of mine: I added the initialization of the timers to both the handle_boot_notification_response as well the connected_callback of the websocket (here conditioned though if there was a "offline" time). The latter is necessary I think because the timers need to be stopped at any disconnect. However, I am not sure when exactly the this->registration_status == RegistrationStatusEnum::Accepted condition is fulfilled and it might be more useful to just start the timers every time (unconditioned) in the connected_callback instead of the boot_notification_response?

It is not allowed to send this message (SignCertificate.req) to the CSMS before the BootNotification.req has been confirmed with a BootNotification.conf(Accepted) from the CSMS (== RegistrationStatus::Accepted), so the implementation is just fine

Copy link
Contributor

@Pietfried Pietfried left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check again in which situations we should request a V2G or client certificate and only set the timers if required

lib/ocpp/v201/charge_point.cpp Show resolved Hide resolved
@klemmpnx klemmpnx requested a review from Pietfried November 9, 2023 16:58
@klemmpnx klemmpnx merged commit 333c911 into main Nov 9, 2023
3 checks passed
@klemmpnx klemmpnx deleted the fk-ocpp201-a03-renew-expiring-certs branch November 9, 2023 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants