Skip to content

umqtt.simple: Restore legacy ssl/ssl_params arguments. #936

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

Merged

Conversation

dpgeorge
Copy link
Member

@dpgeorge dpgeorge commented Nov 7, 2024

Summary

Commit 35d41db changed the API for using SSL with umqtt, but only did a minor version increase. This broke various uses of this library, eg
https://github.com/aws-samples/aws-iot-core-getting-started-micropython

Reinstate the original API for specifying an SSL connection. This library now supports the following:

  • default, ssl=None or ssl=False: no SSL
  • ssl=True and optional ssl_params specified: use ssl.wrap_socket
  • ssl=: use provided SSL context to wrap socket

Testing

TODO

@keenanjohnson
Copy link

Obviously I'm not a reviewer, but looks good to me.

Commit 35d41db changed the API for using
SSL with umqtt, but only did a minor version increase.  This broke various
uses of this library, eg
https://github.com/aws-samples/aws-iot-core-getting-started-micropython

Reinstate the original API for specifying an SSL connection.  This library
now supports the following:
- default, ssl=None or ssl=False: no SSL
- ssl=True and optional ssl_params specified: use ssl.wrap_socket
- ssl=<SSLContext instance>: use provided SSL context to wrap socket

Signed-off-by: Damien George <[email protected]>
@dpgeorge dpgeorge force-pushed the umqtt-simple-restore-legacy-ssl branch from 0bace17 to 98d0a2b Compare April 10, 2025 11:11
@dpgeorge dpgeorge merged commit 98d0a2b into micropython:master Apr 10, 2025
4 checks passed
@dpgeorge dpgeorge deleted the umqtt-simple-restore-legacy-ssl branch April 10, 2025 11:14
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

Successfully merging this pull request may close these issues.

2 participants