pyopenssl icon indicating copy to clipboard operation
pyopenssl copied to clipboard

How do I turn off renegotiation?

Open Gyjnine opened this issue 4 years ago • 1 comments

Gyjnine avatar Dec 08 '21 02:12 Gyjnine

If you have a SSLContext, you can set the appropriate option:

        SSL_OP_NO_RENEGOTIATION = 0x40000000
        ctx.set_options(SSL_OP_NO_RENEGOTIATION)

schlenk avatar Apr 06 '22 15:04 schlenk

To add to the answer above, the NO_RENEGOTIATION constant is also provided by PyOpenSSL:

from OpenSSL import SSL

ctx.set_options(SSL.OP_NO_RENEGOTIATION)

@mhils I think this one can be closed

facutuesca avatar Oct 02 '23 10:10 facutuesca