The Tripple Handshake Issue was disclosed lately. Wether disabling session resumption will mitigate this or not, is a topic for another question. Let's assume I want to disable it for whatever reason (basicly my paranoia).
To disable this in C, it seems like one should use this:
SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF);
Can someone please confirm this?
But how to do this in pyopenssl?
I believe Dr. Henson answered this over at the OpenSSL User Mailing list.
So, according to Dr. Henson, you also need to call
SSL_CTX_set_options
withSSL_OP_NO_TICKET
. See the OpenSSL docs at SSL_CTX_set_options(3).I don't know how to do it in Python, though.
Starting with pyOpenSSL 0.14 this is possible:
Earlier versions of pyOpenSSL do not expose these APIs.
If you also need to turn off session tickets then: