certifi / gocertifi

(Go Distribution) A carefully curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts.
http://certifi.io
Mozilla Public License 2.0
203 stars 27 forks source link

v2: remove error from CACerts() signature #12

Open dolmen opened 5 years ago

dolmen commented 5 years ago

Parsability of the certificates should be checked by the unit test. At runtime this check is supposed to have passed, so no error should occur in AppendCertsFromPEM and any error happening is a problem that should have been caught at build time of the program embedding gocertifi and reporting such error as panic would be appropriate.

mattrobenolt commented 5 years ago

I do agree with this, but I'd rather not roll in and make a breaking API change right now. You are right though. :)

mattrobenolt commented 5 years ago

https://github.com/certifi/gocertifi/commit/59a85de7f35ec9415cfaefdc2bf14606fcabb7cb is heading towards this direction.

tmm1 commented 4 years ago

:+1: This would make usage a lot simpler when setting up http clients/transports.