home-assistant-libs / pychromecast

Library for Python 3 to communicate with the Google Chromecast.
MIT License
2.54k stars 381 forks source link

SSL wrap socket fails if receiver is using old ciphers #963

Open eljefe80 opened 1 month ago

eljefe80 commented 1 month ago

Hi,

I have an unusual set up that fails to connect on 8009. After putting in some extra debug in socket_client.py, I saw that the context.wrap_socket was failing with an SSL: SSLV3_ALERT_HANDSHAKE_FAILURE error. I did a little internet sleuthing and found that adding context.set_ciphers('DEFAULT') would allow pychromecast to successfully connect to my receiver.

I'm not that familiar with the security implications of this addition, but I was wondering if this is something that could be introduced to the codebase? I'm happy to create a PR.

Thanks, Jeff