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

Bugfix/494 libocpp verify csms cn wildcard #516

Merged
merged 6 commits into from
Mar 12, 2024

Conversation

AssemblyJohn
Copy link
Contributor

@AssemblyJohn AssemblyJohn commented Mar 6, 2024

Describe your changes

Issue ticket number and link

resolves: #494

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

@AssemblyJohn AssemblyJohn added the bug Something isn't working label Mar 6, 2024
@AssemblyJohn AssemblyJohn force-pushed the bugfix/494-libocpp-verify_csms_cn_wildcard branch from e62da5b to f9f753d Compare March 6, 2024 09:04
@AssemblyJohn AssemblyJohn force-pushed the bugfix/494-libocpp-verify_csms_cn_wildcard branch from f9f753d to 8d963f9 Compare March 6, 2024 13:24
@AssemblyJohn AssemblyJohn requested a review from Pietfried March 6, 2024 13:24
@AssemblyJohn AssemblyJohn force-pushed the bugfix/494-libocpp-verify_csms_cn_wildcard branch 2 times, most recently from e4ec1e9 to 4dca13d Compare March 6, 2024 13:34
@AssemblyJohn AssemblyJohn marked this pull request as ready for review March 6, 2024 13:42
@AssemblyJohn AssemblyJohn force-pushed the bugfix/494-libocpp-verify_csms_cn_wildcard branch 2 times, most recently from 59b911b to 5ac3957 Compare March 7, 2024 10:28
@AssemblyJohn AssemblyJohn force-pushed the bugfix/494-libocpp-verify_csms_cn_wildcard branch 5 times, most recently from 9564491 to 39c1688 Compare March 8, 2024 08:31
@AssemblyJohn
Copy link
Contributor Author

AssemblyJohn commented Mar 8, 2024

All the comments were resolved.

Note: codacity issue is a false-flag, the value IS used within the code in multiple places.

@AssemblyJohn AssemblyJohn requested a review from Pietfried March 8, 2024 08:32
AssemblyJohn and others added 5 commits March 12, 2024 13:57
Note: a workaround is used since libwebsocket overwrites the param usage when checking the server certificate

Signed-off-by: AssemblyJohn <[email protected]>
@AssemblyJohn AssemblyJohn force-pushed the bugfix/494-libocpp-verify_csms_cn_wildcard branch from b76264e to 2802d1b Compare March 12, 2024 11:57
@AssemblyJohn
Copy link
Contributor Author

Note: when trying to use X509_VERIFY_PARAM_set1_host and SSL_CTX_set1_param(ctx, param); for the current context in the 'tls_init' function it seems that libwebsockets does not take into account the set parameter and any server certificate passes the check.

Because of that, at the moment the server certificate's host is manually checked using the 'X509_check_host' routine. When we can see why libwebsockets does not take into account the automatic parameter check, a new fix should be introduced, removing the manual X509_check_host.

Signed-off-by: AssemblyJohn <[email protected]>
@AssemblyJohn AssemblyJohn force-pushed the bugfix/494-libocpp-verify_csms_cn_wildcard branch from 2802d1b to c0dfe0c Compare March 12, 2024 12:02
@AssemblyJohn AssemblyJohn merged commit eed4bf4 into main Mar 12, 2024
3 of 4 checks passed
@AssemblyJohn AssemblyJohn deleted the bugfix/494-libocpp-verify_csms_cn_wildcard branch March 12, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libocpp verify_csms_cn seems to be unable to handle wildcard domain certificate
4 participants