Push notification – Caused by: java.io.IOException: toDerInputStream rejects tag type 45

Push notification – Caused by: java.io.IOException: toDerInputStream rejects tag type 45

As stated here java-apns is expecting the .p12 private key, not the .pem file.

The instructions for creating a .p12 file on a mac are in the first link, but if youre using the openssl tool on linux you can create it with:

openssl pkcs12 -export -inkey mykey.key -in mykey.pem -out mykey.p12

I just found the answer. When I try to generate a P12 key, I need to select both, a private key and certificate in keychain access.

enter

Push notification – Caused by: java.io.IOException: toDerInputStream rejects tag type 45

Leave a Reply

Your email address will not be published. Required fields are marked *