Skip to content

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

Merged
dpgeorge merged 1 commit intomicropython:masterfrom
dpgeorge:umqtt-simple-restore-legacy-ssl
Apr 10, 2025
Merged

umqtt.simple: Restore legacy ssl/ssl_params arguments.#936
dpgeorge merged 1 commit intomicropython:masterfrom
dpgeorge:umqtt-simple-restore-legacy-ssl

Conversation

@dpgeorge
Copy link
Copy Markdown
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
Copy Markdown

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 <damien@micropython.org>
@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