Trong khi cố gắng để thực hiện một thử nghiệm để đẩy ứng dụng của tôi tôi nhận được lỗi sau:ssl Outines SSLError: SSL_CTX_use_certificate_chain_file: PEM lib
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
Và kịch bản của tôi trông giống như:
#!/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()
gì nguyên nhân của lỗi này là gì?