send push notifications to iphone from python
I am trying to create a python server that sends push notifications. I am using the pyAPNs开发者_Go百科 module and when I try to connect to apple's server I get this error:
[Errno 336265225] _ssl.c:347: error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib.
Anyone know what causes that? What format does the ssl cert have to be in? I tried .cer, but it gives me that error.
Documentation http://pypi.python.org/pypi/pyapns/0.3.0 says that certificate should be in PEM format. Remember that APNS authenticates client using Client Certificate, so private key is also required. Convert unencrypted private key to PEM format and concatenate with matching, PEM-encoded, certificate file. This works for other python APNS library - APNSWrapper.
精彩评论