You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The certification I generated and downloaded from developer.apple.com is cer format,
if I use it directly as client_cert='mycert.cer',
Then I will get error: ssl.SSLError: [SSL] PEM lib (_ssl.c:3900)
If I convert it to pem with code: openssl x509 -inform der -in mycert.cer -out mycert.pem
Then change code to client_cert='mycert.pem',
Then I will get error: ssl.SSLError: [SSL] PEM lib (_ssl.c:3921)
The full traceback:
Traceback (most recent call last):
File "/root/PythonDoc/study/testAPNs.py", line 25, in <module>
loop.run_until_complete(run())
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/root/PythonDoc/study/testAPNs.py", line 6, in run
apns_cert_client = APNs(
File "/usr/local/lib/python3.10/dist-packages/aioapns/client.py", line 37, in __init__
self.pool = APNsCertConnectionPool(
File "/usr/local/lib/python3.10/dist-packages/aioapns/connection.py", line 455, in __init__
self.ssl_context.load_cert_chain(cert_file)
ssl.SSLError: [SSL] PEM lib (_ssl.c:3921)
What should I do to get the right certification to make it work?
The text was updated successfully, but these errors were encountered:
I use the following codes to send push notification with certification.
These codes are from "base usage" of the readme file (removed the key part)
The certification I generated and downloaded from developer.apple.com is cer format,
if I use it directly as
client_cert='mycert.cer',
Then I will get error: ssl.SSLError: [SSL] PEM lib (_ssl.c:3900)
If I convert it to pem with code:
openssl x509 -inform der -in mycert.cer -out mycert.pem
Then change code to
client_cert='mycert.pem',
Then I will get error: ssl.SSLError: [SSL] PEM lib (_ssl.c:3921)
The full traceback:
What should I do to get the right certification to make it work?
The text was updated successfully, but these errors were encountered: