-
Notifications
You must be signed in to change notification settings - Fork 25
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
Modularizes and creates UTs for certificate validation functions #492
Merged
TomasTurina
merged 17 commits into
master
from
enhancement/477-create-unit-tests-for-certificate-validation-functions
Jan 22, 2025
Merged
Modularizes and creates UTs for certificate validation functions #492
TomasTurina
merged 17 commits into
master
from
enhancement/477-create-unit-tests-for-certificate-validation-functions
Jan 22, 2025
Conversation
This file contains 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
Nicogp
force-pushed
the
enhancement/477-create-unit-tests-for-certificate-validation-functions
branch
from
January 9, 2025 14:41
cdf7fe0
to
1879a6d
Compare
Nicogp
force-pushed
the
enhancement/477-create-unit-tests-for-certificate-validation-functions
branch
6 times, most recently
from
January 14, 2025 20:42
6f47288
to
87060ad
Compare
TomasTurina
reviewed
Jan 15, 2025
TomasTurina
reviewed
Jan 15, 2025
TomasTurina
reviewed
Jan 15, 2025
TomasTurina
reviewed
Jan 15, 2025
TomasTurina
reviewed
Jan 15, 2025
// Release the CFStringRef if it was created | ||
if (cfHostname) | ||
{ | ||
CFRelease(cfHostname); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a deleter here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think not, cfHostname
is the one that is released and policy
is the one that is returned.
SecPolicyRef CreateSSLPolicy(bool server, const std::string& hostname) const override
{
// Convert std::string to CFStringRef
CFStringRef cfHostname =
hostname.empty()
? nullptr
: CFStringCreateWithCString(kCFAllocatorDefault, hostname.c_str(), kCFStringEncodingUTF8);
// Call SecPolicyCreateSSL with the CFStringRef hostname
SecPolicyRef policy = SecPolicyCreateSSL(server, cfHostname);
// Release the CFStringRef if it was created
if (cfHostname)
{
CFRelease(cfHostname);
}
return policy;
}
TomasTurina
reviewed
Jan 15, 2025
TomasTurina
reviewed
Jan 15, 2025
TomasTurina
reviewed
Jan 15, 2025
TomasTurina
reviewed
Jan 15, 2025
Nicogp
force-pushed
the
enhancement/477-create-unit-tests-for-certificate-validation-functions
branch
12 times, most recently
from
January 20, 2025 18:18
de96d90
to
78bff28
Compare
Nicogp
force-pushed
the
enhancement/477-create-unit-tests-for-certificate-validation-functions
branch
from
January 21, 2025 02:01
541c719
to
8f9c83b
Compare
TomasTurina
reviewed
Jan 21, 2025
TomasTurina
reviewed
Jan 21, 2025
TomasTurina
reviewed
Jan 21, 2025
TomasTurina
reviewed
Jan 21, 2025
TomasTurina
reviewed
Jan 21, 2025
TomasTurina
reviewed
Jan 21, 2025
… to wrap the call to external functions in the validation of the certification (and its respective abstract class).
…rize the VerifyCertificate function.
…ect in the creation of smartpointers'
…cert_store_utils_mac and cert_store_utils_win
…erification) to the 'src' directory.
…connect task has been successful.
…HttpsVerifierMac. Adds a check for certificate utility pointers.
Nicogp
force-pushed
the
enhancement/477-create-unit-tests-for-certificate-validation-functions
branch
from
January 21, 2025 21:57
792d49a
to
9a14297
Compare
TomasTurina
deleted the
enhancement/477-create-unit-tests-for-certificate-validation-functions
branch
January 22, 2025 18:27
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.
Description
This PR adds changes to modularize the certificate validation functions, it also creates a wrapper for external function calls.
It also adds UTs for new certificate validation methods.
Tests