Can't upload Apple Push notification certificate

Hello, I keep on getting the following error:
"You uploaded a production certificate for a development app!"


I'm more than sure my certificate is a development cert.  This is how I generate the PEM cert from the CER cert:

openssl x509 -in aps.cer -inform der -outform pem -out certificate-development.pem

Please help!


Best,
Chris

Didn't find what you were looking for?

New post

Comments

10 comments

  • Hi Chris,

    In order to upload the Apple Certificate to Urban Airship, it absolutely needs to be in a .p12 format. Otherwise, the upload will fail.

    This process is going to be very similar to the process of exporting the certificate on a Mac computer. If you do have a Mac handy, you can follow the link above to easily export the cert. If not, no worries!

    Now, of course, before continuing, you'll want to make sure you've downloaded the correct certificate from your Apple Developer Portal, and just make sure it's in the correct environment.

    With that said, to convert your certificate using OpenSSL, you could be able to use the following commands:

    #convert *.cer (der format) to pem
    openssl x509 -in test.cer -inform DER -out test.pem -outform PEM
    
    #convert p12 private key to pem (requires the input of a minimum 4 char password)
    openssl pkcs12 -nocerts -out private_dev_key.pem -in private_dev_key.p12
    
    #take the certificate and the key (with or without password) and create a PKCS#12 format file
    openssl pkcs12 -export -in test.pem -inkey private_key_noenc.pem -certfile _CertificateSigningRequest.certSigningRequest  -name "test" -out test.p12

    Once you have that .p12 file in the right format and the correct environment, you should be able to upload it to Urban Airship just fine!

    Comment actions Permalink
    0
  • Hi Michael,


    I've finally managed to upload the Certificate. In your documentation it states the format can be PEM or P12, so I didn't know the PEM is a wrong format. Maybe you should update your documentation.

    I also think the message is confusing, as it should say the certificate is in wrong format, not that it's production/development's one - which was not true.

    Anyway - thanks for the clarification.


    Best,
    Chris

    Comment actions Permalink
    0
  • Chris,

    Can you point out exactly where you found where it states the format can be a .PEM or .P12?

    Our APNS Setup documentation states .P12 only.

    Comment actions Permalink
    0
  • Hey Michael,


    I'm not sure right now if that was on your page or somewhere on stackoverflow, but I'm sure it stated pem or p12. Using p12 helped, but still - application messages and tooltips are misleading, so please correct them if you can.


    Best,
    Chris


    Comment actions Permalink
    0
  • Chris,

    I'll let our team know to update the error messages. If you can find where or send over any screenshots of any other misleading information in our docs or otherwise, do let us know and we'll do what we can to remedy that.

    Comment actions Permalink
    0
  • Hi,

     

    I had the same problem. Also uploaded a PEM. Your interface suggests it will be accepted. See the message when uploading a certificate. Took me hours until I found this topic...

    Marcel.

    Comment actions Permalink
    0
  • Thanks Marcel, I'll provide that info to our Engineering team. We'll see what we can do to provide a better, more accurate error message should you run into that.

    Comment actions Permalink
    0
  • Marcel,

    Would it be possible to receive a copy of that .pem you uploaded with the sensitive information removed? Our Engineering team would like to take a look at it while they investigate. If so, let me know and I'll send you an invite to upload it to a password protected box folder.

    Comment actions Permalink
    0
  • Hi Michael,

    Thanks for your reply. I already managed to upload my certificate. My comment was only because of the PEM discussion. That was all.

    Marcel.

    Comment actions Permalink
    0
  • Marcel,

    Understood. We only ask for the PEM as we investigate the error you ran into, so that we can fix that error in the future. If you're able to provide that info for us, that would be great! If not, no worries!

    Comment actions Permalink
    0

Please sign in to leave a comment.