-
Notifications
You must be signed in to change notification settings - Fork 81
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
Added OpenSSL server that supports TLS certificate status request #677
Conversation
9b04b45
to
910d42e
Compare
@FaHaGit Would be great if you could also take a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice PR! Valuable refactoring, and long-awaited switch to OpenSSL.
I didn't yet get a chance to review the complete PR, let alone test it. see the individual preliminary comments.
Open questions (possibly answered if I read properly):
- Can OpenSSL also provide logging (and UDP-insertion) of CLIENT_RANDOM for Wireshark TLS decryption?
- Can or should some of this be in libevse-security? D20Evse (branch testing/iso15118-20) could also use the same procedures. TLS and certificate handling is required is several EVerest modules - albeit as a server in EvseV2G/D20Evse, and as client in OCPP/OCPP201. Forks of the System module could also make use of it.
UDP with session key would be a good addition - the aim is to add this as a subsequent PR. |
Worthy of consideration - my take is to have something working in the first instance and then look to have common functionality in libevse-security. Aspects of libevse-security aren't abstracted to make unit testing easy especially since it is currently focused on being a TLS client rather than server. |
44c955e
to
d000f0a
Compare
90c7333
to
c4c1366
Compare
63ac52b
to
d469080
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First batch 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes could be separated and moved to a separate PR.
|
Yes, this is clear that there is a dependency. But the few changes in the extra PR can be merged more quickly than this large PR. I generally want to separate things so that small changes are not "hidden" in large PRs. |
I'll move them out, but there can be no further updates to this PR until it is approved and merged as this one will no longer compile. |
4d1bad2
to
50ac7a7
Compare
rebase/merged against main with the new libcbv2g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my part the openssl part looks ok, but with further possible improvements if we require to share more code (with the security lib), instead of duplicating it. In that way the code is also safer since we don't need to test for security vulnerabilities in two places, at least where's common functionality. The PR is very large, and I'd be against doing those modifications now.
1582cec
to
f1cd4ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last comment before testing PnC and debugging some tests with my setup
7cd6d8c
to
c9d2f70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job 👍
3199c3b
to
7c6298e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should make openssl the default setting when compiling. We need some more real world EV testing, but I'm afraid we will not get enough testing if it is not enabled by default. Since it is merged after the June release we have some time until the next stable release to fix potential issues
7284fdb
to
3c33600
Compare
Fixed integration test failure.
|
3c33600
to
58bb7e3
Compare
feat: added optional OpenSSL server feat: integration of OpenSSL into EvseV2G feat: added cmake integration with optional OpenSSL feat: added OpenSSL sha256 and ECDSA functions + ISO test vectors feat: added and tested EXI signatures feat: added base64 encode/decode feat: OpenSSL or MbedTLS for EvseV2G cmake -DEVEREST_CORE_BUILD_TESTING=ON -DUSING_MBED_TLS=OFF -GNinja .. default is to use MBED TLS fix: clang format missmatch fix: missing dependencies fix: link issue fix: updated to support new error logging framework fix: updated to support new libevse-security intrefaces feat: remove use of mbedtls_base64_encode and mbedtls_base64_decode when building for OpenSSL OpenSSL base64 routines used when USING_MBED_TLS=OFF mbedTLS base64 routines used when USING_MBED_TLS=ON fix: remove duplicate include fix: removed typo in filename fix: SIL testing fixes fix: corrected typo in filename fix: add structure to EvseV2G use subdirectories to help collect common functionality and provide structure to the module. OpenSSL TLS moved to common area since it is not tied to EvseV2G. fix: addressing PR review comments fix: moved EvseManager changes to separate PR fix: rebase against main with new libcbv2g fix: remove TLS tests from CI - fail for unknown reason fix: Update README.md fix: corrected unit test executable names fix: updated code owners for the tls directory fix: removed debugging output to cout fix: added log handler to remove dependency on EVLOG fix: updates to try and get tests to run in CI fix: some codacy issues Signed-off-by: James Chapman <[email protected]> Adding missing <algorithm> Signed-off-by: Sebastian Lukas <[email protected]>
Signed-off-by: James Chapman <[email protected]>
Originally information was fetched from libevse-security every connection. The OpenSSL addition moved away from that so that configuration was checked at module start. The problem occurs when there isn't valid configuration. This change splits config into two sets: 1. config that must exist at module start 2. config that can be obtained at 1st connection TCP socket information is covered in 1. SSL certificates, keys and OCSP resonses are in 2. Signed-off-by: James Chapman <[email protected]>
58bb7e3
to
a7aa4d0
Compare
Describe your changes
feat: added optional OpenSSL server
feat: integration of OpenSSL into EvseV2G
feat: added cmake integration with optional OpenSSL
feat: added OpenSSL sha256 and ECDSA functions + ISO test vectors
feat: added and tested EXI signatures
feat: added base64 encode/decode
feat: OpenSSL or MbedTLS for EvseV2G
cmake -DEVEREST_CORE_BUILD_TESTING=ON -USING_MBED_TLS=OFF GNinja .. default is to use MBED TLS
Issue ticket number and link
Checklist before requesting a review