def new_runtime(conf, name, nodeid=None):
    outpath = conf.configuration["CA_default"]["new_certs_dir"]
    name_dir = os.path.join(conf.configuration["CA_default"]["runtimes_dir"], name)
    private_key = os.path.join(name_dir, "private", "private.key")
    private = os.path.dirname(private_key)

    out = os.path.join(outpath, "{}.csr".format(name))

    os.umask(0077)

    try:
        os.makedirs(outpath, 0755)
    except OSError:
        pass

    try:
        os.makedirs(private, 0700)
    except OSError:
        pass

    organization = conf.domain
    commonname = name
    dnQualifier =  "any" if nodeid is None else nodeid
    subject = "/O={}/CN={}/dnQualifier={}".format(organization, commonname, dnQualifier)
    # Creates ECC-based certificate
    log = subprocess.Popen(["openssl", "ecparam", "-genkey",
                            "-name", "prime256v1",
                            "-out", private_key],
                           stdout=subprocess.PIPE,
                           stderr=subprocess.PIPE)
    stdout, stderr = log.communicate()
    if log.returncode != 0:
        raise IOError(stderr)

    log = subprocess.Popen(["openssl", "req", "-new",
                            "-subj", subject,
                            "-key", private_key,
                            "-nodes",
                            "-utf8",
                            "-out", out],
                           stdout=subprocess.PIPE,
                           stderr=subprocess.PIPE)
    stdout, stderr = log.communicate()
    if log.returncode != 0:
        raise IOError(stderr)
    return out
    # Creates RSA-based certificate
    # log = subprocess.Popen(["openssl", "req", "-new",
    #                         "-subj", subject,
    #                         "-newkey", "rsa:2048",
    #                         "-nodes",
    #                         "-utf8",
    #                         "-out", out,
    #                         "-keyout", private_key],
    #                        stdout=subprocess.PIPE,
    #                        stderr=subprocess.PIPE)
    # stdout, stderr = log.communicate()
    # if log.returncode != 0:
    #     raise IOError(stderr)
    # return out
Returns path relative to this path.
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/utilities/certificate.py/new_runtime--crossover with--dataset/ETHPy150Open pypa/pip/tests/lib/path.py/Path.__rsub__