오류
APNs에서 오류가 반환되었습니다. APNs이(가) 푸시 통지를 전달하도록 수락하지 않았습니다.
오류 상태 코드: null
오류 사유 – Pem file Parse failed for the ApiKey: ********************** account id:****** because of unrecognized private key delimiter found in pem file.
원인
p12 file로 pem file 생성했을 때
pem file 내 RSA 키 없음
해결 방법 (Windows cmd)
- cd C:\openssl-0.9.8k_X64\bin
- C:\openssl-0.9.8k_X64\bin>openssl.exe
- OpenSSL> pkcs12 -in ‘p12 저장경로’\’p12 파일명’.p12 -out ‘pem 파일명’.pem -nodes -clcerts
- Enter Import Password: ‘비밀번호 입력’
- MAC verified OK
- OpenSSL> rsa -in ‘pem 파일명’.pem -out ‘rsa 파일명’.pem
- writing RSA key
- ‘pem 파일명’.pem 을 텍스트 에디터로 수정
- —–BEGIN RSA PRIVATE KEY—– ~
—–END RSA PRIVATE KEY—– 내 암호문을 ‘rsa 파일명’.pem의 암호문으로 교체 - ‘pem 파일명’.pem 저장 및 iOS APNS 재업로드
출처: https://github.com/pusher/libPusher/issues/257