我可以将 p8 APNs Auth Key 转换为 pem 文件吗?

Byo*_*oth 8 certificate pem push-notification apple-push-notifications ios

我使用*.p8APNs Auth Keys 而不是*.p12证书来推送我的应用程序的通知。

而且,推送通知运行良好。

但是,我需要的与推送通知相关的第三方 SDK 只需要我提供*.pem文件,而不需要*.p8.

如果我只想*.p8用于APNs,我现在不能使用这个SDK。这是正确的?

chr*_*ijk 13

您可以使用openssl. 您可以使用以下命令将 .p8 转换为 .pem:

如果 .p8 私钥已加密:

openssl pkcs8 -in AuthKey.p8 -out AuthKey.pem
Run Code Online (Sandbox Code Playgroud)

如果 .p8 私钥未加密:

openssl pkcs8 -nocrypt -in AuthKey.p8 -out AuthKey.pem
Run Code Online (Sandbox Code Playgroud)

Apple 提供的 APNS 和 Sign in with Apple *.p8 密钥未加密。

  • 我需要 `-nocrypt` 来使用 Apple Bridge 进行 Auth0 登录 (3认同)