Skip to content

getPeerX509Certificate() supports getting chain of certificates #44905

@vinayak-kukreja

Description

@vinayak-kukreja

What is the problem this feature will solve?

Trying to verify if a certificate is a root certificate involves having the subject and the issuer as same in PeerCertificate and knowing the the certificate was signed by CA.
I see we can get a chain of certificates using getPeerCertificate(true) but it does not have a property to verify if ca: true like the X509Certificate.

What is the feature you are proposing to solve the problem?

Wondering if it would be possible to either include this property in PeerCertificate or allowing chaining in getPeerX509Certificate().

What alternatives have you considered?

I did not find a way to verify ca: true in PeerCertificate. Let me know if you believe this can be done with current chaining that is available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.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