create pem file
download filename.cer from itunes and doubleclick to add to key chain
go to key chain and export Apple Push Services (and key below) to filename.p12
save both as same name
save the macro below as awssnscert
```
FILENAME="$1"
pem=".pem"
p12=".p12"
cer=".cer"
out="_out"
cert="_cert"
key="_key"
openssl x509 -in $FILENAME$cer -inform DER -out $FILENAME$cert$pem
openssl pkcs12 -in $FILENAME$p12 -out $FILENAME$key$pem -nodes -clcerts
```
awssnscert filename
cat aps_staging_prd_key.pem
there are both cert and key inside one file
copy one starting with
-----BEGIN CERTIFICATE-----
paste it into cert in AWS SNS
copy one starting with
-----BEGIN RSA PRIVATE KEY-----
paste it into key in AWS SNS
반응형
'iPhone' 카테고리의 다른 글
rbenv install stuck at installing openssl (0) | 2020.06.09 |
---|---|
iOS10 firebase crashlytics showing NSInternalInconsistencyException (0) | 2020.06.09 |
ERROR ITMS-90206 (0) | 2016.07.02 |
관심사 (0) | 2015.06.13 |
AppDelegate UIViewController Transition Animation (0) | 2015.05.22 |