Make raw PEM cert bundle string public#22
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.