Skip to content

Expose the signature algorithm in X509Certificate #59103

Open
@patrickrbc

Description

@patrickrbc

What is the problem this feature will solve?

X509Certificate class was a great addition to help us handling certificates,
however it seems that one handy property is not available through its API, the
identifier of the algorithm used to sign the certificate.

I'm not sure if I am missing something here but I think it is pretty common
for to have the name exposed like in the openssl's text output:

  Signature Algorithm: ecdsa-with-SHA384

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

Expose a new property with signature algorithm's name the like:

X509Certificate {
  subject: 'CN=example.com',
  subjectAltName: 'DNS:example.com',
  issuer: "C=US\nO=Let's Encrypt\nCN=E6",
  infoAccess: 'CA Issuers - URI:http://e6.i.lencr.org/',
  ...
  ...
  signatureAlgorithm: 'ecdsa-with-SHA384'
}

This looks like a pretty straight forward addition to the existing, I would
like to try, but I wanted to hear if there is any reason why this property is
not there in the first place.

What alternatives have you considered?

Invoking openssl x509 -in cert.pem -text to get the signature algorithm,
but I think it is a bit cumbersome when we could use the X509Certificate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    Status

    Awaiting Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions