Commit 28a42eeb authored by Sam Rushing's avatar Sam Rushing

fix very confusing cert/chain/key behavior

parent a3584572
......@@ -15,13 +15,10 @@ ssl_op_map = {
from openssl import x509, pkey, dh_param
def new_ctx (cert=None, chain=None, key=None, proto=None, ciphers=None, dhparam=None, next_protos=None):
def new_ctx (cert=None, chain=(), key=None, proto=None, ciphers=None, dhparam=None, next_protos=None):
ctx = openssl.ssl_ctx()
if cert:
if chain:
ctx.use_cert (cert, chain)
else:
ctx.use_cert (key)
ctx.use_cert (cert, chain)
if key:
ctx.use_key (key)
if proto:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment