-
Notifications
You must be signed in to change notification settings - Fork 219
Add cipher preference option in builder #659
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
base: main
Are you sure you want to change the base?
Conversation
bretambrose
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want cipher suite on the static builder functions or as a separate API?
Python SDK static builder function directly return a mqtt5 client / mqtt3 connection. We don't really have a way to add a separate API for builder. |
|
|
awsiot/mqtt_connection_builder.py
Outdated
| if port == 443 and awscrt.io.is_alpn_available() and use_custom_authorizer is False: | ||
| tls_ctx_options.alpn_list = ['http/1.1'] if use_websockets else ['x-amzn-mqtt-ca'] | ||
|
|
||
| if cipher_pref != awscrt.io.TlsCipherPref.DEFAULT: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mqtt5 builder has a check for None. Should it be the same here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. Instead, added validation assert isinstance(cipher_pref, awscrt.io.TlsCipherPref) instead.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.