Fix TLS_connect() and UTIL_next_item(), add UTIL_first_item()#66
Merged
Fix TLS_connect() and UTIL_next_item(), add UTIL_first_item()#66
TLS_connect() and UTIL_next_item(), add UTIL_first_item()#66Conversation
31e97ba to
3af3ab2
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR fixes issues in TLS_connect() and UTIL_next_item(), and adds a new UTIL_first_item() utility function for parsing comma/whitespace-separated strings.
Key changes:
- Fixes logic bug in
UTIL_next_item()loop condition that could cause incorrect parsing - Adds error handling in
TLS_connect()to suppress OpenSSL errors when checking for IP addresses - Introduces
UTIL_first_item()function to find the first item in a separated string
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/libsecutils/src/util/util.c | Implements UTIL_first_item() and fixes UTIL_next_item() loop condition and separator handling |
| src/libsecutils/src/connections/tls.c | Adds error mark handling around X509_VERIFY_PARAM_get1_ip_asc() call |
| src/libsecutils/include/secutils/util/util.h | Adds function declaration for UTIL_first_item() and dummy macros for older OpenSSL versions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…IFY_PARAM_get0_email()
5c64495 to
5bfe6ac
Compare
5bfe6ac to
d9632ef
Compare
benjamin-schilling
approved these changes
Sep 8, 2025
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.