I am trying to send push notifications to iPhone via python as described here but I am getting the following error:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/omat/CA/server/ca/models.py", line 193, in push
c.connect((host_name, 2195))
File "/usr/lib/python2.6/ssl.py", line 307, in connect
self.ca_certs)
SSLError: [Errno 336265225] _ssl.c:337: error:140B0009:SSL routines:
SSL_CTX_use_PrivateKey_file:PEM lib
The error is raised from within the python ssl module as the traceback says but the message doesn't sing to me. Any ideas on what might be wrong?
Thanks,
oMat
edit:
The certificate used is created from the certificate and the private key as follows:
openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12
cat apns-dev-cert.pem apns-dev-key.pem > apns-dev.pem