Skip to content
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

Are we using SSL correctly #33

Open
fredrike opened this issue Sep 25, 2024 · 1 comment
Open

Are we using SSL correctly #33

fredrike opened this issue Sep 25, 2024 · 1 comment

Comments

@fredrike
Copy link
Owner

In #13 we started using ssl_context for BRP072 again. The documentation of aiohttp states that it is depricated in favor of ssl

Perhaps we can change:

ssl_context=self.ssl_context,

to:

    ssl=False,

@mattyway what do you think, can you test this?

@mattyway
Copy link
Contributor

I remember trying to just use ssl=False when I was working in this area, but it didn't work. A special option is needed on the ssl_context for the BRP072C device (SSL_OP_LEGACY_SERVER_CONNECT):

self.ssl_context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
# SSL_OP_LEGACY_SERVER_CONNECT, https://github.com/python/cpython/issues/89051
self.ssl_context.options |= 0x4
self.ssl_context.check_hostname = False
self.ssl_context.verify_mode = ssl.CERT_NONE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants