Skip to content

autoSelectFamily: true breaks TLS #46679

Description

@addaleax

Version

v19.6.0

Platform

x64 macOS 13.2.1; x64 Ubuntu 22.04

Subsystem

tls

What steps will reproduce the bug?

const socket = tls.connect({ host: 'google.com', port: 443, servername: 'google.com', autoSelectFamily: true }); 
socket.on('secureConnect', () => (console.log('secure connect'), socket.end()))

Results in Error: self-signed certificate with autoSelectFamily: true, works with autoSelectFamily: false.

How often does it reproduce? Is there a required condition?

Consistently.

What is the expected behavior?

Same as autoSelectFamily: false / same as when specifying IP addresses directly (with servername set).

What do you see instead?

TLS certificate validation errors.

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues and PRs for confirmed bugs.netIssues and PRs related to the net subsystem.tlsIssues and PRs related to the tls subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions