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

Add support for ignoring ssl validation in the examples #194

Open
d3xt3r01 opened this issue Aug 1, 2021 · 2 comments
Open

Add support for ignoring ssl validation in the examples #194

d3xt3r01 opened this issue Aug 1, 2021 · 2 comments

Comments

@d3xt3r01
Copy link

d3xt3r01 commented Aug 1, 2021

Hi,

I tried various ways of getting cert_reqs=ssl.CERT_NONE to connect to a server with self-signed/expired certificate with no luck.
Help ?

Thanks.

@d3xt3r01
Copy link
Author

Also, the testbot example should support ssl too...

@jaraco
Copy link
Owner

jaraco commented Oct 19, 2021

You need to create a socket wrapper with the relevant parameters. See the connection module for explanations on how to create a factory with the relevant SSL wrapper and pass that factory to the client. Probably you need something like:

wrapper = functools.partial(ssl.wrap_socket, cert_reqs=ssl.CERT_NONE)
factory = Factory(wrapper=wrapper)
bot = SingleServerIRCBot(connect_factory=factory)

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