Repository navigation
Conversation
apolyakov
requested changes
Nov 12, 2026
| } | ||
|
|
||
| return std::initializer_list<std::pair<string, mixed>>{{string{"name", 4}, string{name.value().data(), static_cast<string::size_type>(name.value().size())}}, | ||
| {string{"subject", 7}, subject.val()}, |
Contributor
There was a problem hiding this comment.
No need to create these strings every time the function is called. We can create them in advance in CryptoImageState or OpenSSLImageState
| std::pair{MD2, hash_algorithm_traits{MD2_HASHED_SIZE, HashAlgorithm::MD2}}, | ||
| std::pair{MD4, hash_algorithm_traits{MD4_HASHED_SIZE, HashAlgorithm::MD4}}}}; | ||
|
|
||
| std::ranges::sort(arr, std::less{}, &std::pair<std::string_view, hash_algorithm_traits>::first); |
Contributor
There was a problem hiding this comment.
nit: std::addressof instead of raw & operator
Contributor
Author
There was a problem hiding this comment.
But in this case we take pointer to function, not object. We can not use std::addressof here.
apolyakov
reviewed
Nov 13, 2026
| return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r'; | ||
| } | ||
|
|
||
| inline constexpr char to_lower_ascii(char c) noexcept { |
Contributor
There was a problem hiding this comment.
nit: tolower_ascii to look like std::tolower
| const auto key{load_public_key(public_key)}; | ||
| if (!key) [[unlikely]] { | ||
| kphp::log::warning("failed to verify signature"); | ||
| return -1; |
Contributor
There was a problem hiding this comment.
We must preserve kPHP's behavior: return 0
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.