-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Py 3.10: ssl.SSLError: Cannot create a client socket with a PROTOCOL_TLS_SERVER context #78
Comments
@frenck thank you! After fixing it as you pointed out, it works fine. 😄 |
Where can I find the file in home assistant? I searched everywhere but cant find aioimaplib.py. I would like to fix it and then hopefully on the next update it will be overwritten with a good version by itself. I am on Home assistant OS. |
It needs to be fixed in the homeassistant instance of docker. @J-o-h-n-M You need to shell log in to the host as an administrator using SSH & Web Terminal add-on etc. ssh hassio@192.168.x.x
docker exec -it homeassistant /bin/bash
vi /usr/local/lib/python3.10/site-packages/aioimaplib/aioimaplib.py |
Any idea when this will be in a HA release? I have to update manually every time now. |
Depends when this issue is addressed in this library :) |
I made a custom_component that fixes this until they merge the fix here. Referenced in the HA thread here home-assistant/core#74487 (comment) |
Correct ssl_context purpose to SERVER_AUTH. closes #78
Reported at the Home Assistant project:
This seems to be related to more strict handling in Python 3.10 (which the Home Assistant project has been switched to).
It happens when setting the default SSL context:
aioimaplib/aioimaplib/aioimaplib.py
Line 834 in 544e735
According to documentation, however, this is used to create a server side sockets:
ref: https://docs.python.org/3/library/ssl.html#ssl.Purpose.CLIENT_AUTH
I guess it needs to be using:
ref: https://docs.python.org/3/library/ssl.html#ssl.Purpose.SERVER_AUTH
Downstream issue: home-assistant/core#74487
The text was updated successfully, but these errors were encountered: