Skip to content

Use verify_name in TLS examples and README - #1406

Merged
uglide merged 1 commit into
release/v1.5.Xfrom
backport-tls-verify-name-docs-1.5.x
Nov 19, 2026
Merged

uglide merged 1 commit into
release/v1.5.Xfrom
backport-tls-verify-name-docs-1.5.x

Conversation

@uglide

@uglide uglide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #1403 (original commit e039b5b by @uglide) to the 1.5.x line for the 1.5.1 patch release.

Cherry-picked cleanly onto release/v1.5.X. Verified locally with a -Werror USE_SSL=1 build and the full hiredis-test suite (0 skipped, including Unix socket and DEBUG SLEEP timeout tests).

🤖 Generated with Claude Code


Note

Low Risk
Documentation and sample code only; no library logic changes, but examples now enforce stricter peer identity checks at handshake time.

Overview
Updates TLS documentation and examples to use redisCreateSSLContextWithOptions with verify_mode and verify_name, instead of the older redisCreateSSLContext() helper.

The README now notes that the low-level redisInitiateSSL() path does not configure hostname verification (callers must set the peer name on their own SSL *), refreshes the sample snippet to match the options API, and adds a “Verifying the server's identity” section explaining how verify_name differs from SNI-only server_name and from legacy behavior.

example-ssl.c and example-libevent-ssl.c mirror that pattern by binding verify_name to the connection hostname and enabling REDIS_SSL_VERIFY_PEER.

Reviewed by Cursor Bugbot for commit 7b8ed99. Bugbot is set up for automated code reviews on this repo. Configure here.

The TLS examples and the README sample created their context with
redisCreateSSLContext(), which validates the CA chain only and cannot
request peer name verification. Switch them to
redisCreateSSLContextWithOptions() with verify_name set to the host
being connected to, so the documented pattern binds the connection to
the intended server identity.

Document in the README that server_name is SNI only, that without
verify_name any certificate from a trusted CA is accepted, and that
callers of redisInitiateSSL() must configure identity verification on
their own SSL object.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T17:04:47.966847Z 7b8ed99 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

ABI compatibility check

✅ libhiredis — compatible

No ABI changes detected.

✅ libhiredis_ssl — compatible

No ABI changes detected.

Baseline 9f97a40912e1a1fffe9b308a8e86a30915b4d621 vs head 7b8ed99326475c886c203c0d681025e37247757e. Apply the ignore-abi-check label to skip this check for an intentional, SONAME-bumped ABI break.

@uglide
uglide merged commit a24d618 into release/v1.5.X Nov 19, 2026
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant