|
NAMEcreate-cert —
create openssl client key and certificates
SYNOPSIS
DESCRIPTIONcreate-cert is a script that uses openssl(1) to create
self-signed host certificates and private keys for fully qualified domain
names (FQDNs).
A configuration file to specify certificate attributes. The
Once a valid configuration file, rootca cert, and key files are
all present, Key files are created without group or world read permissions. The
script always refuses to overwrite existing files. If
OPTIONSHere are the command line options:
CONFIGURATION OPTIONSHere are the configuration options that may be used in create-cert.conf.
EXAMPLESHere's an example work flow usingcreate-cert to create
a new rootca and host certs and keys (uninteresting output from openssl has
been removed):
%
create-cert
create-cert: Please use -I or -C to create a config (create-cert.conf) % create-cert -I
create-cert: Creating a default in create-cert.conf % vi create-cert.conf
% create-cert -R
create-cert: Creating the key for the new rootca create-cert: Creating temporary rootca config create-cert: Creating the cert for the new rootca create-cert: Creating the database file for the new rootca create-cert: Creating the serial file for the new rootca % create-cert foo.lbl.gov
create-cert: Creating the key for foo.lbl.gov create-cert: Create a cert config for foo.lbl.gov create-cert: Create a CSR config for foo.lbl.gov create-cert: Create a CSR for foo.lbl.gov create-cert: Sign the certificate request for foo.lbl.gov create-cert: Verify the the csr for foo.lbl.gov create-cert: Remove junk we don't need create-cert: Rehashing the cert directory create-cert: Cert and key for foo.lbl.gov successfully created % create-cert bar.lbl.gov 10.0.0.1
create-cert: Creating the key for bar.lbl.gov [...] create-cert: Cert and key for bar.lbl.gov successfully created % find . -type f |
sort
./certs/bar.lbl.gov.pem ./certs/foo.lbl.gov.pem ./certs/rootca.index ./certs/rootca.index.attr ./certs/rootca.index.attr.old ./certs/rootca.pem ./create-cert.conf ./private/bar.lbl.gov.key ./private/foo.lbl.gov.key ./private/rootca.key ./private/serial % openssl x509 -text -noout -in certs/bar.lbl.gov |
egrep 'Alternative|DNS'
X509v3 Subject Alternative Name: DNS:bar.lbl.gov, IP Address:10.0.0.1 Here are some examples of the error checking: %
create-cert -I
create-cert: Error: create-cert.conf exists % create-cert -R
create-cert: Error: private/rootca.key exists create-cert: Error: certs/rootca.pem exists % create-cert bar.lbl.gov
create-cert: Error: private/bar.lbl.gov.key exists create-cert: Error: certs/bar.lbl.gov.pem exists FILES
SEE ALSOopenssl(1)AUTHORCraig LeresBUGS
Visit the GSP FreeBSD Man Page Interface. |