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

Fixed an issue with certificate directory support #20

Conversation

AssemblyJohn
Copy link
Collaborator

Fixed for bundle directory usage:

  • certificate retrieval for directories (get_verify_file)
  • certificate install status (is_ca_certificate_installed)

@AssemblyJohn AssemblyJohn added the bug Something isn't working label Nov 16, 2023
@AssemblyJohn AssemblyJohn marked this pull request as ready for review November 16, 2023 14:07
Comment on lines +662 to +672
if (verify_file.is_using_directory()) {
auto& hierarchy = verify_file.get_certficate_hierarchy();

// Get all roots and search for a valid self-signed
for (auto& root : hierarchy.get_hierarchy()) {
if (root.certificate.is_selfsigned() && root.certificate.is_valid())
return root.certificate.get_file().value_or("");
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note: In case there are multiple roots, this interface is probably not adequate. We would need to be able to return a list of certificates somehow.

@AssemblyJohn AssemblyJohn force-pushed the bugfix/EV-354-libevse-security-get_verify_file-and-is_ca_certificate_installed branch from a8eb74e to 328c1eb Compare November 17, 2023 13:16
@AssemblyJohn AssemblyJohn merged commit bd8ffb6 into main Jan 18, 2024
2 checks passed
@AssemblyJohn AssemblyJohn deleted the bugfix/EV-354-libevse-security-get_verify_file-and-is_ca_certificate_installed branch January 18, 2024 08:50
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.

4 participants