Skip to content

pkg/util/tlsutil: add tls primitives functions #384

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

Merged
merged 1 commit into from
Aug 14, 2018

Conversation

fanminshi
Copy link
Contributor

add tls primitives that generate the private key, the ca cert, and the signed cert for the private key.

@fanminshi fanminshi changed the title [WIP] pkg/util/tlsutil: add tls primitives functions pkg/util/tlsutil: add tls primitives functions Aug 13, 2018
@fanminshi
Copy link
Contributor Author

cc/ @hasbro17 @rithujohn191

@fanminshi fanminshi force-pushed the tls_impl branch 2 times, most recently from d92cf91 to dacbcc5 Compare August 14, 2018 18:53
@fanminshi
Copy link
Contributor Author

fixed CI failure.

@hasbro17
Copy link
Contributor

I think you meant for the file name to be primitives.go and not primatives.go. We can also call them helpers.go since they are just helper functions, but I'll leave that up to you.

)

// NewPrivateKey returns randomly generated RSA private key.
func NewPrivateKey() (*rsa.PrivateKey, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do all of these helpers need to be exported? I can't see how they will end up being used by GenerateCert() but I assume it's going to be in the same package.
So we can keep these functions as lowercase and unexported.
They're not meant to be exposed to the user.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, you are right. they are not meant to be exported.

@fanminshi
Copy link
Contributor Author

fanminshi commented Aug 14, 2018

I kept the primitives.go convention and made the functions private.

@hasbro17
Copy link
Contributor

LGTM

@fanminshi fanminshi merged commit 4e52a19 into operator-framework:master Aug 14, 2018
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.

2 participants