在尝试对我的应用程序进行推送测试时,出现以下错误:
Traceback (most recent call last):
File "test.py", line 16, in <module>
wrapper.notify()
File "/usr/local/lib/python2.7/dist-packages/APNSWrapper-0.6.1-py2.7.egg/APNSWrapper/notifications.py", line 194, in notify
apnsConnection.connect(apnsHost, self.apnsPort)
File "/usr/local/lib/python2.7/dist-packages/APNSWrapper-0.6.1-py2.7.egg/APNSWrapper/connection.py", line 215, in connect
self.context().connect(host, port)
File "/usr/local/lib/python2.7/dist-packages/APNSWrapper-0.6.1-py2.7.egg/APNSWrapper/connection.py", line 161, in connect
self.connectionContext.connect((host, port))
File "/usr/lib/python2.7/ssl.py", line 331, in connect
self._real_connect(addr, False)
File "/usr/lib/python2.7/ssl.py", line 314, in _real_connect
self.ca_certs, self.ciphers)
ssl.SSLError: [Errno 336445449] _ssl.c:365: error:140DC009:SSL routines:SSL_CTX_use_certificate_chain_file:PEM lib
我的脚本看起来像:
#!/usr/bin/env python
from APNSWrapper import *
deviceToken = '****************************************************************'
# create wrapper
wrapper = APNSNotificationWrapper('cert.pem', True)
# create message
message = APNSNotification()
message.token(deviceToken)
message.badge(28)
# add message to tuple and send it to APNS server
wrapper.append(message)
wrapper.notify()
这个错误的原因是什么?