Closed ppawlak closed 2 years ago
Thank you very much @ppawlak for the PR, but I think private key encryption is out of the scope of pyapns_client
. I also checked other APNS libraries and none of them are built to work with encrypted private key out of the box. So considering the fact that it can be added very easily by subclassing APNSClient
and overriding just one method, I decided not to merge this change in.
Keeping an unencrypted private key on your filesystem is not a good practice and before deploying my code I have encrypted my private key with:
openssl ec -aes256 -in AuthKey_XXXXXX.p8 -out AuthKey_XXXXXRX.encrypted.p8
This PR adds supports for auth keys encrypted this way, by adding an optional password parameter to APNSClient constructor.