Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crypto API documentation for x509.keyUsage is wrong for all versions #48727

Open
jeffsec-aws opened this issue Jul 10, 2023 · 0 comments
Open
Labels
crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to the documentations.

Comments

@jeffsec-aws
Copy link

Affected URL(s)

https://nodejs.org/api/crypto.html#x509keyusage

Description of the problem

The page for x509.keyUsage indicates that it returns An array detailing the key usages for this certificate. while in fact it only returns the extended key usage for the certificate. For example:

  • 1.3.6.1.5.5.7.3.1 for TLS Web server
  • or 1.3.6.1.5.5.7.3.2 for TLS Web client

Key usages (not extend) are completely different are related to certificate extension under OID 2.5.29.15 to contain 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.

Therefore the API should be x509.extKeyUsage and the definition An array detailing the key extended usages for this certificate. to match the reality of the function.

@jeffsec-aws jeffsec-aws added the doc Issues and PRs related to the documentations. label Jul 10, 2023
@VoltrexKeyva VoltrexKeyva added the crypto Issues and PRs related to the crypto subsystem. label Jul 12, 2023
nodejs-github-bot pushed a commit that referenced this issue Nov 20, 2023
PR-URL: #50603
Refs: #48727
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
targos pushed a commit that referenced this issue Nov 23, 2023
PR-URL: #50603
Refs: #48727
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
martenrichter pushed a commit to martenrichter/node that referenced this issue Nov 26, 2023
PR-URL: nodejs#50603
Refs: nodejs#48727
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
lucshi pushed a commit to lucshi/node that referenced this issue Nov 27, 2023
PR-URL: nodejs#50603
Refs: nodejs#48727
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
RafaelGSS pushed a commit that referenced this issue Nov 29, 2023
PR-URL: #50603
Refs: #48727
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
RafaelGSS pushed a commit that referenced this issue Nov 30, 2023
PR-URL: #50603
Refs: #48727
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
UlisesGascon pushed a commit that referenced this issue Dec 11, 2023
PR-URL: #50603
Refs: #48727
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
UlisesGascon pushed a commit that referenced this issue Dec 19, 2023
PR-URL: #50603
Refs: #48727
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to the documentations.
Projects
None yet
Development

No branches or pull requests

2 participants