Open nathany opened 9 years ago
There are a number of helpers that do tls.X509KeyPair and tls.LoadX509KeyPair (in Conn, Client, and Feedback).
I'd like to simplify this by just using tls.Certificate and providing examples or a certificate helper for the loading.
I like where you're going with that.
The pkcs12 library is available at golang.org/x/crypto/pkcs12 with a slightly different API than before.
Certificates exported from the Apple keychain are in DER format (*.p12 files).
It would make sense to support these directly (in addition to or instead of PEM formatted files). The library I've been using for this is: https://github.com/Azure/go-pkcs12
There is an effort underway to move that library into x/crypto and firm up the APIs. https://github.com/Azure/go-pkcs12/issues/9