Skip to content

tls requires a subject even when altNames are defined #11771

Closed
@CriGoT

Description

@CriGoT

When using TLS checkServerIdentity is using only subject to determine if a certificate is empty or not

node/lib/tls.js

Line 172 in a2ae089

} else if (subject) {

RFC 5280 allows for a certificate to have only altNames and an empty subject. The existing code already considers altName a priority and uses any supported altNames, if present, instead of the subject.

Although subject empty certificates are not common Windows uses them in their infrastructure so improving this check will simplify integration with systems using certificates with empty subjects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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