Skip to content

Fix TLS_connect() and UTIL_next_item(), add UTIL_first_item()#66

Merged
DDvO merged 4 commits intomasterfrom
fix_UTIL_next_item-TLS_connect
Sep 8, 2025
Merged

Fix TLS_connect() and UTIL_next_item(), add UTIL_first_item()#66
DDvO merged 4 commits intomasterfrom
fix_UTIL_next_item-TLS_connect

Conversation

@DDvO
Copy link
Member

@DDvO DDvO commented Sep 2, 2025

No description provided.

This comment was marked as outdated.

@DDvO DDvO force-pushed the fix_UTIL_next_item-TLS_connect branch 2 times, most recently from 31e97ba to 3af3ab2 Compare September 2, 2025 17:42
@DDvO DDvO requested a review from Copilot September 2, 2025 17:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@DDvO DDvO force-pushed the fix_UTIL_next_item-TLS_connect branch from 5c64495 to 5bfe6ac Compare September 5, 2025 15:04
@DDvO DDvO force-pushed the fix_UTIL_next_item-TLS_connect branch from 5bfe6ac to d9632ef Compare September 8, 2025 07:40
@DDvO DDvO merged commit 6a9ac49 into master Sep 8, 2025
6 checks passed
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