def create_server_cert(server_cert, server_csr, ca_cert, ca_key, ca_serial):
    check_dirs(server_cert)
    cmd = "openssl x509 -req -days 10950 -CA %s -CAkey %s -in %s -out %s -CAserial %s" \
            % (ca_cert, ca_key, server_csr, server_cert, ca_serial)
    if not os.path.exists(ca_serial):
        cmd = cmd + " -CAcreateserial"
    return run_command(cmd)
Esempio n. 2
0
def create_ca_cert(ca_key_name, ca_cert_name):
    check_dirs(ca_key_name)
    cmd = ("openssl req -new -x509 -days 10950 -key %s -out %s -subj '/C=US/ST=NC/L=Raleigh/O=Red Hat/OU=Pulp/CN=Pulp-Root-CA'") % (ca_key_name, ca_cert_name)
    return run_command(cmd)
Esempio n. 3
0
def create_ca_key(ca_key_name):
    check_dirs(ca_key_name)
    cmd = "openssl genrsa -out %s 2048" % (ca_key_name)
    return run_command(cmd)
Esempio n. 4
0
def create_ca_cert(ca_key_name, ca_cert_name):
    check_dirs(ca_key_name)
    cmd = (
        "openssl req -new -x509 -days 10950 -key %s -out %s -subj '/C=US/ST=NC/L=Raleigh/O=Red Hat/OU=Pulp/CN=Pulp-Root-CA'"
    ) % (ca_key_name, ca_cert_name)
    return run_command(cmd)
Esempio n. 5
0
def create_ca_key(ca_key_name):
    check_dirs(ca_key_name)
    cmd = "openssl genrsa -out %s 2048" % (ca_key_name)
    return run_command(cmd)
def create_server_csr(server_key, csr, hostname):
    check_dirs(csr)
    cmd = "openssl req -new -key %s -out %s -subj '/C=US/ST=NC/L=Raleigh/O=Red Hat/OU=Splice/CN=%s'" % (server_key, csr, hostname)
    return run_command(cmd)
def create_server_key(server_key):
    check_dirs(server_key)
    cmd = "openssl genrsa -out %s 2048" % (server_key)
    return run_command(cmd)