-
Notifications
You must be signed in to change notification settings - Fork 27
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
Make raw PEM cert bundle string public #22
base: main
Are you sure you want to change the base?
Conversation
Maybe this would be better as a function call instead that returned the private variable. Just in case. func RawCertificates() string {
return pemcerts
} Or similar. I'm not crazy about the name. |
I went with |
2817166
to
5031444
Compare
@yosh I plan on bringing this in soon. I added some work to maintain a |
Cool, sounds good. |
This isn't a variable but a constant. So there is no risk of corruption. |
@yosh If you only need the certificate string I recommend instead to just take |
I'm against this change because that would expose the format of the list of root certificates which is currently a string but could another format (pre-parsed) in the future. As I wrote above, users who need the certificate string could as well just take gen.go into their project and adapt it to their need. Also I don't think there is many users who need both the |
I no longer actively develop the project that necessitated this, so I don't really have a strong opinion here. Happy to just close out this PR unmerged if that's consensus. |
This just makes the PEM cert bundle accessible to users of this library. I found this useful in conjunction with private CAs generated out of Go programs. The other languages supported in the project already support this, since a .crt file is simply shipped with them.