def METHOD_NAME(log=None, **data):
    cmd = ["openssl", "req", "-new", "-nodes",
           "-newkey", "rsa:%d" % data.get("bits", 4096),
           "-keyout", data["key"],
           "-out", data["csr"],
           "-subj", "%s" % data["subject"]]
    if data.get("alt_names"):
        cmd += ["-addext", data.get("alt_names")]
    if log:
        log.info(" ".join(cmd))
    out, err, ret = justcall(cmd)
    if ret != 0:
        raise ex.Error(out+err)