Can I convert p8 APNs Auth Key to pem file?
Asked Answered
I

1

15

I using *.p8 APNs Auth Keys instead of *.p12 certificates for push notification of my apps.

And, push notifications were working well.

However, a third party SDK which I needed and related to push notification demands only *.pem files from me, not *.p8.

If I want to use only *.p8 for APNs, I can't use this SDK now. It's right?

Intolerable answered 17/10, 2019 at 3:23 Comment(1)
Did you figure out if this is possible?Circumcise
S
43

You can do this by using openssl. You can convert the .p8 to .pem using below command:

If the .p8 private key is encrypted:

openssl pkcs8 -in AuthKey.p8 -out AuthKey.pem

If the .p8 private key is not encrypted:

openssl pkcs8 -nocrypt -in AuthKey.p8 -out AuthKey.pem

APNS and Sign in with Apple *.p8 keys, provided by Apple are unencrypted.

Som answered 8/7, 2020 at 15:20 Comment(2)
I needed -nocrypt for my Auth0 Sign In With Apple BridgeCordy
Creates an empty file for me.Snatch

© 2022 - 2024 — McMap. All rights reserved.