Skip to content

test: more tests for PKCS#8 private keys #24928

Description

@bnoordhuis

We currently lack coverage for unencrypted PKCS#8 private keys (-----BEGIN PRIVATE KEY-----) with the sole exception of test/fixtures/foafssl.key used in test/parallel/test-https-foafssl.js.

Compare PKCS#1 private keys (-----BEGIN RSA PRIVATE KEY-----) for which we have ample coverage.

I count three tests that cover encrypted PKCS#8 keys (-----BEGIN ENCRYPTED PRIVATE KEY-----):

test/parallel/test-tls-passphrase.js
test/parallel/test-crypto-rsa-dsa.js
test/parallel/test-crypto-rsa-dsa.js

For unencrypted PKCS#8, it would be nice to have tests for at least RSA and DSA, with and without PEM attributes for bonus points. See test/fixtures/foafssl.key for an example of attributes.

cc @sam-github - possibly relevant to your interests

Activity

  1. added
    help wantedIssues that need assistance from volunteers or PRs that need help to proceed.
    cryptoIssues and PRs related to the crypto subsystem.
    testIssues and PRs related to Node.js core tests and test infrastructure.
    on Dec 9, 2018
  2. uttampawar commented on Jan 9, 2019

    @uttampawar
    Contributor

    @bnoordhuis If you can be a mentor and guide me, I would like to help out on this issue.

  3. bnoordhuis commented on Jan 10, 2019

    @bnoordhuis
    MemberAuthor

    @uttampawar Thanks. Just ask questions and I'll try to answer them.

  4. bmsdave commented on Feb 7, 2019

    @bmsdave
    Contributor

    @uttampawar
    Hi! Do you need help with this task?

  5. sasurau4 commented on Mar 25, 2019

    @sasurau4
    Contributor

    Can I work on this issue?

  6. dhuang612 commented on Nov 20, 2019

    @dhuang612

    Hi,

    Is this available to work on?

  7. tniessen commented on Nov 20, 2019

    @tniessen
    Member

    @bnoordhuis Is this still pending? The C++ coverage seems to be pretty good around key parsing, but it does not necessarily reflect all possible inputs.

  8. bnoordhuis commented on Nov 22, 2019

    @bnoordhuis
    MemberAuthor

    Yes, 85546c2 resolves this - it should have had a Fixes: tag, not a Refs: tag. I'll close this out, thanks.

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.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.testIssues and PRs related to Node.js core tests and test infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions