2 Replies
      Latest reply on Oct 4, 2016 11:15 PM by anton.pomozov
      laurentg Level 1 Level 1 (0 points)

        I've created a key in the developer portal. After the creation the message talks about a ".key file" but when I download the file I obtain a ".p8 file". I've tried to import it in the keychain without succes.

        $ security import APNSAuthKey.p8 -k ~/Library/Keychains/login.keychain

        security: SecKeychainItemImport: Unknown format in import.

        What is the format of the ".p8 file" ? How can I add it to the Keychain ?

        • Re: APNS Auth Key
          jonchambers Level 2 Level 2 (90 points)

          It's a PEM-encoded, unencrypted PKCS#8 file. You can inspect it with `openssl pkcs8 -nocrypt -in <your_file.p8>`, but you'll need a newer version of OpenSSL than the one that ships with El Capitan (I'm not sure which version comes with Sierra). I'm not sure how to import it into the Keychain, but I also haven't run into a situation where having it in the Keychain would be helpful (other than just for storage).


          Hope that helps!

            • Re: APNS Auth Key
              anton.pomozov Level 1 Level 1 (0 points)

              Member Center said:

              Download, Install and Backup

              Download your Authentication Key to your Mac, then double click the .key file to install in Keychain Access. Make sure to save a back up of your key in a secure place. It will not be presented again and cannot be retrieved at a later time.

              How to save it there on macOS Sierra?