Search code examples
iosonesignal

I cannot upload the .p12 certificate for on the OneSignal Website


I cannot upload my .p12 certificate on the OneSignal website. I have tried using Safari, Firefox, Chrome and Arc but I am met with the same error message, "Something went wrong while we tried to save the platform information. Please try again". Any help would be very much appreciated. Thanks Error Message


Solution

  • So from what I have noticed, if you used a certSigningRequest to sign your certificate, you .p12 file would be rejected. So to do this you need to

    1. Generate 2048-bit RSA private key: openssl genrsa -out mykey.key 2048
    2. Generate a Certificate Signing Request: openssl req -new -sha256 -key mykey.key -out mykey.csr
    3. You will first revoke the existing certificate and then create a new one using this new .csr file.
    4. After you create the certificate download it
    5. Convert the certificate: openssl x509 -inform DER -outform PEM -in aps_development.cer -out aps_development.pem
    6. Build the PKCS#12: openssl pkcs12 -inkey aps_development.key -in aps_development.pem -export -out aps_development.p12

    This final .p12 file is what you will upload to your onesignal.