-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Conversation
There was a problem hiding this 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.
sdk/helper/certutil/helpers.go
Outdated
|
||
// GenerateSerialNumberWithEntropy generates a serial number suitable | ||
// for a certificate with custom entropy. | ||
func GenerateSerialNumberWithEntropy(randReader io.Reader) (*big.Int, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe s/Entropy/RandomSource/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
sdk/helper/certutil/helpers.go
Outdated
// 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. |
There was a problem hiding this comment.
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..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great.
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