Skip to content

Release 1.5.0: validate the registry's server certificate - #55

Merged
ademar merged 1 commit into
masterfrom
fix/validate-server-cert
Sep 24, 2026
Merged

ademar merged 1 commit into
masterfrom
fix/validate-server-cert

Conversation

@ademar

@ademar ademar commented Sep 24, 2026

Copy link
Copy Markdown
Member

Summary

  • TcpTransport.ValidateServerCertificate returned true for every certificate, so a man-in-the-middle could present any certificate and capture the EPP login credentials (clID/password).
  • It now accepts the certificate only when sslPolicyErrors == SslPolicyErrors.None, meaning it chains to a trusted root, matches the host name and hasn't expired. This applies with and without a client certificate.
  • New TcpTransport.ServerCertificateValidationCallback property. It lets test environments with self-signed certificates supply their own check, ideally pinning the expected certificate. It's a settable property rather than a new constructor parameter, so existing constructor calls stay compatible at both source and binary level.
  • Version bumped to 1.5.0. The release notes flag this as a breaking behavior change.

Testing

  • Unit tests: 55 passed, 23 skipped.
  • Manual TcpTransport connections on port 443:
Server Client cert Result
www.nuget.org (valid) yes connected
www.nuget.org (valid) no connected
self-signed.badssl.com yes rejected
wrong.host.badssl.com yes rejected
expired.badssl.com no rejected
self-signed.badssl.com + override callback yes connected

🤖 Generated with Claude Code

ValidateServerCertificate returned true for any certificate, so a
man-in-the-middle could present its own certificate and read the EPP
login credentials. Accept the certificate only when it chains to a
trusted root and matches the host name.

Add TcpTransport.ServerCertificateValidationCallback so test
environments with self-signed certificates can supply their own check.
This is a behavior change for such setups; bump to 1.5.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ademar
ademar merged commit 86058c1 into master Sep 24, 2026
2 of 3 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.

1 participant