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

后端 未结 2 2464
悲&欢浪女
悲&欢浪女 2021-01-02 03:40

I got this error when my server try to push a notification to a specific device based on device token and ck.pem (combination between .pem file, cert and key).



        
2条回答
  •  旧时难觅i
    2021-01-02 03:49

    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 you're using the openssl tool on linux you can create it with:

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

提交回复
热议问题