From ae8243da06e61e56cc347f6baebb4c6061be1ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Sat, 16 Jan 2016 18:00:52 +0100 Subject: Don't use SSLv2 or SSLv3 in examples/simple --- examples/simple/client.py | 2 ++ examples/simple/server.py | 1 + 2 files changed, 3 insertions(+) (limited to 'examples') diff --git a/examples/simple/client.py b/examples/simple/client.py index 36c37cd..dff2d03 100644 --- a/examples/simple/client.py +++ b/examples/simple/client.py @@ -27,6 +27,8 @@ if dir == '': # Initialize context ctx = SSL.Context(SSL.SSLv23_METHOD) +ctx.set_options(SSL.OP_NO_SSLv2) +ctx.set_options(SSL.OP_NO_SSLv3) ctx.set_verify(SSL.VERIFY_PEER, verify_cb) # Demand a certificate ctx.use_privatekey_file (os.path.join(dir, 'client.pkey')) ctx.use_certificate_file(os.path.join(dir, 'client.cert')) diff --git a/examples/simple/server.py b/examples/simple/server.py index df7c5a4..bc001ed 100644 --- a/examples/simple/server.py +++ b/examples/simple/server.py @@ -29,6 +29,7 @@ if dir == '': # Initialize context ctx = SSL.Context(SSL.SSLv23_METHOD) ctx.set_options(SSL.OP_NO_SSLv2) +ctx.set_options(SSL.OP_NO_SSLv3) ctx.set_verify(SSL.VERIFY_PEER|SSL.VERIFY_FAIL_IF_NO_PEER_CERT, verify_cb) # Demand a certificate ctx.use_privatekey_file (os.path.join(dir, 'server.pkey')) ctx.use_certificate_file(os.path.join(dir, 'server.cert')) -- cgit v1.2.1