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

Basic support for export PKCS8 #27

Merged
merged 9 commits into from
Jun 9, 2021
Merged

Basic support for export PKCS8 #27

merged 9 commits into from
Jun 9, 2021

Conversation

giovanni9793
Copy link
Contributor

@giovanni9793 giovanni9793 commented May 3, 2021

Description

As a developer, I would like export the private key in PKCS #8. This is needed because some libraries accept only this format. This pull request adds the PrivateKeyPKCS8 interface which describe the structure of PKCS #8.

interface PrivateKeyPKCS8 {
  version: BNjs;
  privateKey: PrivateKeyPKCS1;
  privateKeyAlgorithm: { ecPublicKey: number[]; curve: number[] };
}

Type of Change

  • New feature
  • Bug fix
  • API reference/documentation update
  • Other

Does this introduce a breaking change?

No

Are documentation updates required?

  • Changed interface name from 'PrivateKey' to 'PrivateKeyPKCS1';
  • Added default parameter 'destinationFormatType' in 'encodePrivate' function.

Testing information

Tests added.

Checklist

  • Code is commented where needed
  • Unit test coverage for new or modified code paths
  • npm run test passes
  • Changelog is updated
  • Tag 1 of @person1 or @Person2 (??? @zone117x )

@CLAassistant
Copy link

CLAassistant commented May 3, 2021

CLA assistant check
All committers have signed the CLA.

@giovanni9793
Copy link
Contributor Author

giovanni9793 commented May 3, 2021

CLA signed
immagine

@giovanni9793
Copy link
Contributor Author

@shea256 some updates?

@giovanni9793
Copy link
Contributor Author

I noticed that I did the commits with a different email, so I added that email and signed the CLA.
Hoping you'll accept the request.

@giovanni9793
Copy link
Contributor Author

@kantai some news?

@zone117x
Copy link
Member

zone117x commented Jun 8, 2021

@giovanni9793 the whitespace and formatting changes introduced in this PR make it difficult to review. Please revert unnecessary formatting changes and the org may have the bandwidth to review.

@giovanni9793
Copy link
Contributor Author

@zone117x now should be ok, right?

Copy link
Member

@zone117x zone117x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @giovanni9793!

@zone117x zone117x merged commit 2ff866f into stacks-network:master Jun 9, 2021
@zone117x
Copy link
Member

zone117x commented Jun 9, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants