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

add variable entropy readers to cert gen helpers [VAULT-1179] #10653

Merged
merged 7 commits into from Jan 8, 2021

Conversation

HridoyRoy
Copy link
Contributor

This PR goes hand in hand with hashicorp/vault-plugin-secrets-kmip#95 . It allows for private keys to be used with entropy augmentation if needed.
Moved from:https://github.com/hashicorp/vault-enterprise/pull/1664

Copy link
Collaborator

@sgmiller sgmiller left a comment

Choose a reason for hiding this comment

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

Just minor naming suggestions, otherwise lgtm.


// GenerateSerialNumberWithEntropy generates a serial number suitable
// for a certificate with custom entropy.
func GenerateSerialNumberWithEntropy(randReader io.Reader) (*big.Int, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe s/Entropy/RandomSource/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

// Creates a CSR. This is currently only meant for use when
// generating an intermediate certificate.
// CreateCSR creates a CSR with the default rand.Reader to
// generate a cert/keypair.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't lose the bit about "This is currently only..."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Copy link
Collaborator

@sgmiller sgmiller left a comment

Choose a reason for hiding this comment

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

Looks great.

@HridoyRoy HridoyRoy added this to the 1.7 milestone Jan 8, 2021
@HridoyRoy HridoyRoy merged commit acecc94 into master Jan 8, 2021
@HridoyRoy HridoyRoy deleted the entropy-kmip branch January 8, 2021 17:48
jartek pushed a commit to jartek/vault that referenced this pull request Sep 11, 2021
…orp#10653)

* move entropy augmentation in cert gen to oss

* changelog

* go mod vendor

* updated helpers to allow custom entropy

* comments

* comments
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.

None yet

2 participants