def make_ssl_devcert(base_path, host=None, cn=None):
    from OpenSSL import crypto
    if host is not None:
        cn = '*.%s/CN=%s' % (host, host)
    cert, pkey = generate_adhoc_ssl_pair(cn=cn)

    cert_file = base_path + '.crt'
    pkey_file = base_path + '.key'

    with open(cert_file, 'w') as f:
        f.write(crypto.dump_certificate(crypto.FILETYPE_PEM, cert))
    with open(pkey_file, 'w') as f:
        f.write(crypto.dump_privatekey(crypto.FILETYPE_PEM, pkey))

    return cert_file, pkey_file
(internal)
dataset/ETHPy150Open Eforcers/gae-flask-todo/lib/werkzeug/serving.py/make_ssl_devcert--crossover with--dataset/ETHPy150Open twisted/vertex/vertex/q2q.py/Q2QService.lookupListener