-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
No way to use TLS-PSK from python ssl #63284
Comments
OpenSSL supports TLS-PSK which some people (myself obviously) find to be substantially easier to use than setting up certs. However, there's no way to use PSK via the current SSL api in python. It would be very nice to be able to use PSK from python. For OpenSSL, even the C API is particularly easy. Attached is the implementation used in Mosquitto, a MQTT message broker that supports both cert based and PSK based TLS. |
Python 2.7 is open only for bugfixes. No new features. Do you dare to write a patch for Python 3.4? :-). If you do, remember to sign a Contributor Agreement. Give it a try! :) |
Is it different from TLS SRP, which already has a feature request in bpo-11943? |
This is not TLS-SRP, but TLS-PSK as described by RFC 4279[1] There is a very small amount of overlap - the "unknown_psk_identity" error defined by PSK is also used in SRP. |
This feature request has been idle for almost four years. Although TLS-PSK is nice to have, it is not a priority for protocols such as HTTPS. I neither have time nor motivation to create a patch myself. Therefore I'm closing this issue of lack of activity. Please feel free to re-open it with a patch against 3.7. |
A PR is proposed so reopening. |
Hey, is anyone available to review the proposed PR? |
I can handle the PR review. I'm not really convinced that this feature is worth having - the original bug filer's excuse was a poor one about not wanting to deal with certificates. letsencrypt has become commonplace not to make that easy. But so long as |
@gpshead thanks for the review! Yes, I agree with both sides of that argument. A more common/standard use of TLS-PSK is resuming TLS sessions that were originally created by asymmetric encryption. Although possibly the TLSv1.3 PSK APIs (that I did not implement) are better suited to that. Other use cases:
|
There are situations where certificates cannot be used - in IoT it's common that the embedded device has neither RTC (to check validity) nor HTTP (to check revocation lists), and in most cases limited computing power. |
An other use case will be the backup software bareos/bacula, which makes heavy usage of TLS-PSK. |
I also need this feature for |
…103181) Add support for TLS-PSK (pre-shared key) to the ssl module. --------- Co-authored-by: Oleg Iarygin <[email protected]> Co-authored-by: Gregory P. Smith <[email protected]>
Thanks for the contribution! |
pythongh-63284: Add support for TLS-PSK (pre-shared key) to the ssl module …
…odule (python#103181) Add support for TLS-PSK (pre-shared key) to the ssl module. --------- Co-authored-by: Oleg Iarygin <[email protected]> Co-authored-by: Gregory P. Smith <[email protected]>
…odule (python#103181) Add support for TLS-PSK (pre-shared key) to the ssl module. --------- Co-authored-by: Oleg Iarygin <[email protected]> Co-authored-by: Gregory P. Smith <[email protected]>
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs
The text was updated successfully, but these errors were encountered: