nodejs / nodejs/node

Ability to access certificate extensions through `Crypto` API `X509Certificate` class

Open
#48,730 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

crypto feature request
Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

What is the problem this feature will solve?

Key usages (not extend) are completely different and can only be accessed through certificate extension under OID 2.5.29.15 which contains value in a bit array format.

Key usage can have for definition: Digital signature, Non-repudiation, Key encipherment, Data encipherment, Key agreement, Certificate signing, CRL signing, Encipher only, Decipher only.

As of now Crypto API only provides access to Extended Key usage under the x509.keyUsage but does not provide access to the Key Usage through the certificate Extensions part.

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

Having a method the class x509 that can allow to have access to the Extension part of a certificate through a safe structure.

What alternatives have you considered?

Using 3rd party libraries like PKIjs or Forge, but I would like a native feature instead.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Node.js Crypto API X509Certificate implementation and the existing x509.keyUsage behavior. Review how certificate extensions and OID 2.5.29.15 are represented, then define a safe structure for exposing key usage and verify that the new API distinguishes it from extended key usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend-api-design, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.