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

Support hashing directories of certificates #852

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jannejy
Copy link
Contributor

@jannejy jannejy commented Oct 31, 2024

Describe your changes

Issue ticket number and link

Checklist before requesting a review

@@ -0,0 +1,310 @@
/* c_rehash.c - Create hash symlinks for certificates
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file was taken from: https://gitlab.alpinelinux.org/alpine/ca-certificates/-/blob/master/c_rehash.c?ref_type=heads

Done some changes:

  • only the hash_dir and dependent methods are left
  • removed all the parameters of command line that are were used in main.
  • changed logging to Everest (can be an issue), maybe needed help to overcome static analysis issues
  • added explicit C-conversion to compile
  • wrapped in the ocpp namespace
  • some initialization is moved to hash_dir to work properly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, it's worth looking together with the PR in evse-security: EVerest/libevse-security#96

Signed-off-by: Ivan Rogach <[email protected]>
@AssemblyJohn
Copy link
Contributor

In general it looks good to me. I like the fact that there's a conditional to check if we're using a directory or a file, however see my comment in the evse-security PR: EVerest/libevse-security#96 (comment)

If it handles that case in security code too, I'll have another look and approve.

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