diff options
author | Daniël van Eeden <git@myname.nl> | 2016-01-16 18:00:52 +0100 |
---|---|---|
committer | Daniël van Eeden <git@myname.nl> | 2016-01-16 18:00:52 +0100 |
commit | ae8243da06e61e56cc347f6baebb4c6061be1ef1 (patch) | |
tree | 28a3ca26aaba6261f78fd32b02c441a605054f68 /examples | |
parent | b3316fc4e8ffabce720fa825fccc8fcb2c7256c6 (diff) | |
download | pyopenssl-git-ae8243da06e61e56cc347f6baebb4c6061be1ef1.tar.gz |
Don't use SSLv2 or SSLv3 in examples/simple
Diffstat (limited to 'examples')
-rw-r--r-- | examples/simple/client.py | 2 | ||||
-rw-r--r-- | examples/simple/server.py | 1 |
2 files changed, 3 insertions, 0 deletions
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')) |