Repository navigation
Extend certificate functions to handle non-RSA keys + add support for ed25519 keys - #270
Merged
mattfarina merged 7 commits intoDec 11, 2020
Merged
Conversation
Contributor
Author
|
@technosophos thanks for the review! Do you have an opinion on the Go 1.12/ed25519 issue? |
Member
|
@misberner I think it makes sense to drop 1.12 support and add testing for 1.15. 1.12 has not been supported by Go in 10 months. I can do that in a follow-up. |
Member
|
The PR for that is at #272 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
adds support for Ed25519 keys in theNote: This has been removed because it fails the go1.12 CI tests. While Ed25519 support is available in Go 1.12 viagenPrivateKeyfunction.golang.org/x/crypto/ed25519, thex509.MarshalPKCS8PrivateKeydoes not support ed25519 keys and implementing it manually is reasonably complex. Before I do this, I would like to clarify whether the Go 1.12 tests are relevant at all given that thego.modfile actually specifies a minimum Go version of 1.13.buildCustomCertfunction (in line with what Go supports, ECDSA and Ed25519 keys instead of just RSA keys)...WithKeyvariants for thegenCA,genSignedCert,genSelfSignedCertfunctions, that take as an additional parameter a PEM-encoded private key (any private key generated withgenPrivateKeyand an algorithm other than"dsa"works) to be used for the certificategenCA,genSignedCert, andgenSelfSignedCertfunctions use 2048-bit RSA keys.The main motivation is to allow generating certificates with ECDSA or Ed25519 keys, which are much faster both in terms of key usage at runtime, as well as key generation time.