timehop / apns

A Go package to interface with the Apple Push Notification Service
https://godoc.org/github.com/timehop/apns
MIT License
185 stars 47 forks source link

Add support for p12 files #37

Open nathany opened 9 years ago

nathany commented 9 years ago

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

nathany commented 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.

taylortrimble commented 9 years ago

I like where you're going with that.

nathany commented 8 years ago

The pkcs12 library is available at golang.org/x/crypto/pkcs12 with a slightly different API than before.