sger / go-apns2

Go package for HTTP/2 Apple Push Notification Service.
MIT License
55 stars 7 forks source link

Loading .p12 certificate: ans1: indefinite length found (not DER) #2

Open gngeorgiev opened 7 years ago

gngeorgiev commented 7 years ago

Hello,

I am trying to use the apns2 module but when I try to load the p12 file I get the following error

ans1: indefinite length found (not DER)

I was able to convert the file to .pem using the command line openssl, and it worked but this is not an ideal solution, I need to be able to use the p12 file directly or convert it to pem at runtime. Sadly the openssl bindings do not offer this functionality as of now. Any suggestions?

sger commented 7 years ago

Hello,

I'm using the following link as example for the .p12 and .pem files https://www.raywenderlich.com/123862/push-notifications-tutorial I have no idea about the error you getting except the fact that belongs to this https://golang.org/src/encoding/asn1/asn1.go