| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
|
I figured out why it wasn't working with TLS 1.3. The error on the client-side is: ssl.SSLError: [SSL: ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT] attempt to reuse session in different context (_ssl.c:996) When initialising the SSLContext there is a call to SSL_CTX_set_session_id_context(): #define SID_CTX "Python"
SSL_CTX_set_session_id_context(self->ctx, (const unsigned char *) SID_CTX,
sizeof(SID_CTX));
#undef SID_CTX
The openssl man pages state this is a "server side only" operation:
Calling this on a client-side socket seems to result in unexpected behavior, where the client thinks it's trying to resume a non-existent session. It looks like others have run into the same issue: maovidal/paho_sslpsk2_demo#2 (comment) Disabling the call to SSL_CTX_set_session_id_context() for client-side SSLContext creation fixes it. |
Sorry, something went wrong.
|
@jackjansen, @dstufft, @alex (as ssl module experts) |
Sorry, something went wrong.
SSL_CTX_set_session_id_context() is a server-side only operation. Using this on the client-side is causing authentication errors
|
Modified the documentation for TLS 1.3. However this ticket explains that it is a change in TLS 1.3: openssl/openssl#8894 (comment)
|
Sorry, something went wrong.
|
Hey just giving this a bump |
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
RFC4279 states these are UTF-8. Add unit test using non-ASCII chars
The PR has missed the 3.12 merge window
|
I have made the requested changes; please review again |
Sorry, something went wrong.
|
Thanks for making the requested changes! @gpshead: please review the changes made to this pull request. |
Sorry, something went wrong.
|
@gpshead is there anything that still need to be done to see this PR moving forward? |
Sorry, something went wrong.
|
Hi @gpshead, it has been a while but I'm still interested in getting this merged. I have made the requested changes; please review again |
Sorry, something went wrong.
|
I'm also very interested in this feature. Feel free to tag me if you need any help |
Sorry, something went wrong.
Demonstrate usage in a safer way that rejects unknown connection attempts
|
Thanks for the contributon! FWIW the timestamp on the NEWS.d/next/ filename is irrelevant, it is only being used as a uniqueness collision avoidance mechanism. All of those get merged into one file during releases. |
Sorry, something went wrong.
|
Awesome!! Thanks for taking the time to review! |
Sorry, something went wrong.
…odule (python#103181) Add support for TLS-PSK (pre-shared key) to the ssl module. --------- Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Gregory P. Smith <greg@krypto.org>
…odule (python#103181) Add support for TLS-PSK (pre-shared key) to the ssl module. --------- Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Gregory P. Smith <greg@krypto.org>
| Back | FazBrowse Home | New Git URL |
Add support for TLS-PSK (pre-shared key) to the ssl module (plus documentation and unit-tests).
The referenced issue (#63284) is ~10 years old, but the information is still valid.
I've tested this by:
Things I'm still uncertain on:
This is my first python contribution.
I have probably got a few things wrong, but I'm happy to fix them up.
Thanks!