I have .p12 file from Apple and tried to convert it to .pem file with following command:
openssl pkcs12 -in cert.p12 -out apple_push_notification_development.pem -nodes -clcerts
When trying the create new OpenSSL::X509::Certificate object with
OpenSSL::X509::Certificate.new(File.read('apple_push_notification_development.pem'))
I get the following error:
OpenSSL::X509::CertificateError: nested asn1 error
from (irb):9:in `initialize'
from (irb):9:in `new'
...
Did I do something wrong ? Being stuck, please help. Thanks