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

feat: libevse-security will try to fix malformed PEM strings #23

Merged
merged 5 commits into from
Nov 23, 2023

Conversation

valentin-dimov
Copy link
Collaborator

No description provided.


static std::string fix_pem_payload(const std::string& input_pem_payload) {
// Remove all newlines and whitespace from the rest
std::string cleared_string = boost::erase_all_regex_copy(input_pem_payload, boost::regex("[^a-zA-Z0-9/\\+=]"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need boost(algorithm/regex) here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don't, removed it.

lib/evse_security/evse_security.cpp Outdated Show resolved Hide resolved
lib/evse_security/evse_security.cpp Outdated Show resolved Hide resolved
lib/evse_security/evse_security.cpp Outdated Show resolved Hide resolved
Co-authored-by: Piet Gömpel <[email protected]>
Signed-off-by: valentin-dimov <[email protected]>
@valentin-dimov valentin-dimov merged commit 3879399 into main Nov 23, 2023
2 checks passed
@valentin-dimov valentin-dimov deleted the feature/EV-356-fix-malformed-pem-string branch November 23, 2023 08:36
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.

3 participants