Skip to content

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

Open
@jeffsec-aws

Description

@jeffsec-aws

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cryptoIssues and PRs related to the crypto subsystem.docIssues and PRs related to the documentations.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions