Skip to content

wolftls: require ServerName when peer verification is enabled - #51

Open
night1rider wants to merge 4 commits into
wolfSSL:masterfrom
night1rider:fenrir-6394
Open

wolftls: require ServerName when peer verification is enabled#51
night1rider wants to merge 4 commits into
wolfSSL:masterfrom
night1rider:fenrir-6394

Conversation

@night1rider

Copy link
Copy Markdown
Contributor

A client with InsecureSkipVerify=false but an empty ServerName currently completes the handshake without ever checking the certificate's name.

This rejects that configuration up front, matching crypto/tls ("either ServerName or InsecureSkipVerify must be specified").

Includes a wolftls test that fails before the change and passes after.

Comment thread wolftls/conn.go Outdated
}

// A client with verification enabled must set ServerName; without it the
// certificate name is never checked, so reject rather than proceed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

TIny nit: Document that this check is enforced to match crypto/tls

@lealem47 lealem47 assigned night1rider and unassigned lealem47 Aug 12, 2026
Update Config.ServerName/InsecureSkipVerify docs for the fail-closed requirement, assert the guard's error text, and add a test that InsecureSkipVerify allows an empty ServerName.
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.

3 participants