Skip to content

Verify TLS server hostname and send SNI during client handshake - #97

Open
thisisnsh wants to merge 1 commit into
mainfrom
enable_hostname_verification
Open

thisisnsh wants to merge 1 commit into
mainfrom
enable_hostname_verification

Conversation

@thisisnsh

Copy link
Copy Markdown
Contributor

Overview

  • Verify the peer certificate identity against the configured host, so a CA-signed certificate issued for a different host is no longer accepted.
  • Send SNI for named hosts; IP literals are sent without it per RFC 6066, and are verified against the certificate's iPAddress SAN instead.
  • Breaking: endpoints whose certificate omits the connect-time host name (notably IP endpoints without an IP SAN) now fail the handshake.
  • Allow the helloworld producer to connect over TLS

- Verify the peer certificate identity against the configured host, so a
  CA-signed certificate issued for a different host is no longer accepted.
- Send SNI for named hosts; IP literals are sent without it per RFC 6066,
  and are verified against the certificate's iPAddress SAN instead.
- Breaking: endpoints whose certificate omits the connect-time host name
  (notably IP endpoints without an IP SAN) now fail the handshake.

Also allow the helloworld producer to connect over TLS.
ConnectionString::parse rejects an amqps:// uri unless it is given
SecurityParameters, so the producer example could only ever connect in
plaintext. Take an optional certificate authority path as a second
argument and build the SecurityParameters from it.
@thisisnsh
thisisnsh requested a review from a team September 16, 2026 14:30
@thisisnsh
thisisnsh marked this pull request as draft September 17, 2026 15:30
@thisisnsh
thisisnsh marked this pull request as ready for review September 18, 2026 03:39
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.

1 participant