c9be164d2f
(pod2man problem?)
669 lines
21 KiB
Groff
669 lines
21 KiB
Groff
.rn '' }`
|
|
'''
|
|
'''
|
|
.de Sh
|
|
.br
|
|
.if t .Sp
|
|
.ne 5
|
|
.PP
|
|
\fB\\$1\fR
|
|
.PP
|
|
..
|
|
.de Sp
|
|
.if t .sp .5v
|
|
.if n .sp
|
|
..
|
|
.de Ip
|
|
.br
|
|
.ie \\n(.$>=3 .ne \\$3
|
|
.el .ne 3
|
|
.IP "\\$1" \\$2
|
|
..
|
|
.de Vb
|
|
.ft CW
|
|
.nf
|
|
.ne \\$1
|
|
..
|
|
.de Ve
|
|
.ft R
|
|
|
|
.fi
|
|
..
|
|
'''
|
|
'''
|
|
''' Set up \*(-- to give an unbreakable dash;
|
|
''' string Tr holds user defined translation string.
|
|
''' Bell System Logo is used as a dummy character.
|
|
'''
|
|
.tr \(*W-|\(bv\*(Tr
|
|
.ie n \{\
|
|
.ds -- \(*W-
|
|
.ds PI pi
|
|
.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
|
.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
|
.ds L" ""
|
|
.ds R" ""
|
|
''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of
|
|
''' \*(L" and \*(R", except that they are used on ".xx" lines,
|
|
''' such as .IP and .SH, which do another additional levels of
|
|
''' double-quote interpretation
|
|
.ds M" """
|
|
.ds S" """
|
|
.ds N" """""
|
|
.ds T" """""
|
|
.ds L' '
|
|
.ds R' '
|
|
.ds M' '
|
|
.ds S' '
|
|
.ds N' '
|
|
.ds T' '
|
|
'br\}
|
|
.el\{\
|
|
.ds -- \(em\|
|
|
.tr \*(Tr
|
|
.ds L" ``
|
|
.ds R" ''
|
|
.ds M" ``
|
|
.ds S" ''
|
|
.ds N" ``
|
|
.ds T" ''
|
|
.ds L' `
|
|
.ds R' '
|
|
.ds M' `
|
|
.ds S' '
|
|
.ds N' `
|
|
.ds T' '
|
|
.ds PI \(*p
|
|
'br\}
|
|
.\" If the F register is turned on, we'll generate
|
|
.\" index entries out stderr for the following things:
|
|
.\" TH Title
|
|
.\" SH Header
|
|
.\" Sh Subsection
|
|
.\" Ip Item
|
|
.\" X<> Xref (embedded
|
|
.\" Of course, you have to process the output yourself
|
|
.\" in some meaninful fashion.
|
|
.if \nF \{
|
|
.de IX
|
|
.tm Index:\\$1\t\\n%\t"\\$2"
|
|
..
|
|
.nr % 0
|
|
.rr F
|
|
.\}
|
|
.TH CA 1 "0.9.5a" "22/Jul/2000" "OpenSSL"
|
|
.UC
|
|
.if n .hy 0
|
|
.if n .na
|
|
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
|
.de CQ \" put $1 in typewriter font
|
|
.ft CW
|
|
'if n "\c
|
|
'if t \\&\\$1\c
|
|
'if n \\&\\$1\c
|
|
'if n \&"
|
|
\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
|
|
'.ft R
|
|
..
|
|
.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
|
|
. \" AM - accent mark definitions
|
|
.bd B 3
|
|
. \" fudge factors for nroff and troff
|
|
.if n \{\
|
|
. ds #H 0
|
|
. ds #V .8m
|
|
. ds #F .3m
|
|
. ds #[ \f1
|
|
. ds #] \fP
|
|
.\}
|
|
.if t \{\
|
|
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
|
. ds #V .6m
|
|
. ds #F 0
|
|
. ds #[ \&
|
|
. ds #] \&
|
|
.\}
|
|
. \" simple accents for nroff and troff
|
|
.if n \{\
|
|
. ds ' \&
|
|
. ds ` \&
|
|
. ds ^ \&
|
|
. ds , \&
|
|
. ds ~ ~
|
|
. ds ? ?
|
|
. ds ! !
|
|
. ds /
|
|
. ds q
|
|
.\}
|
|
.if t \{\
|
|
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
|
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
|
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
|
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
|
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
|
. ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
|
|
. ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
|
|
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
|
. ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
|
|
.\}
|
|
. \" troff and (daisy-wheel) nroff accents
|
|
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
|
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
|
.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
|
|
.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
|
|
.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
|
|
.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
|
|
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
|
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
|
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
|
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
|
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
|
.ds ae a\h'-(\w'a'u*4/10)'e
|
|
.ds Ae A\h'-(\w'A'u*4/10)'E
|
|
.ds oe o\h'-(\w'o'u*4/10)'e
|
|
.ds Oe O\h'-(\w'O'u*4/10)'E
|
|
. \" corrections for vroff
|
|
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
|
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
|
. \" for low resolution devices (crt and lpr)
|
|
.if \n(.H>23 .if \n(.V>19 \
|
|
\{\
|
|
. ds : e
|
|
. ds 8 ss
|
|
. ds v \h'-1'\o'\(aa\(ga'
|
|
. ds _ \h'-1'^
|
|
. ds . \h'-1'.
|
|
. ds 3 3
|
|
. ds o a
|
|
. ds d- d\h'-1'\(ga
|
|
. ds D- D\h'-1'\(hy
|
|
. ds th \o'bp'
|
|
. ds Th \o'LP'
|
|
. ds ae ae
|
|
. ds Ae AE
|
|
. ds oe oe
|
|
. ds Oe OE
|
|
.\}
|
|
.rm #[ #] #H #V #F C
|
|
.SH "NAME"
|
|
ca \- sample minimal CA application
|
|
.SH "SYNOPSIS"
|
|
\fBopenssl\fR \fBca\fR
|
|
[\fB\-verbose\fR]
|
|
[\fB\-config filename\fR]
|
|
[\fB\-name section\fR]
|
|
[\fB\-gencrl\fR]
|
|
[\fB\-revoke file\fR]
|
|
[\fB\-crldays days\fR]
|
|
[\fB\-crlhours hours\fR]
|
|
[\fB\-crlexts section\fR]
|
|
[\fB\-startdate date\fR]
|
|
[\fB\-enddate date\fR]
|
|
[\fB\-days arg\fR]
|
|
[\fB\-md arg\fR]
|
|
[\fB\-policy arg\fR]
|
|
[\fB\-keyfile arg\fR]
|
|
[\fB\-key arg\fR]
|
|
[\fB\-cert file\fR]
|
|
[\fB\-in file\fR]
|
|
[\fB\-out file\fR]
|
|
[\fB\-notext\fR]
|
|
[\fB\-outdir dir\fR]
|
|
[\fB\-infiles\fR]
|
|
[\fB\-spkac file\fR]
|
|
[\fB\-ss_cert file\fR]
|
|
[\fB\-preserveDN\fR]
|
|
[\fB\-batch\fR]
|
|
[\fB\-msie_hack\fR]
|
|
[\fB\-extensions section\fR]
|
|
.SH "DESCRIPTION"
|
|
The \fBca\fR command is a minimal CA application. It can be used
|
|
to sign certificate requests in a variety of forms and generate
|
|
CRLs it also maintains a text database of issued certificates
|
|
and their status.
|
|
.PP
|
|
The options descriptions will be divided into each purpose.
|
|
.SH "CA OPTIONS"
|
|
.Ip "\fB\-config filename\fR" 4
|
|
specifies the configuration file to use.
|
|
.Ip "\fB\-in filename\fR" 4
|
|
an input filename containing a single certificate request to be
|
|
signed by the \s-1CA\s0.
|
|
.Ip "\fB\-ss_cert filename\fR" 4
|
|
a single self signed certificate to be signed by the \s-1CA\s0.
|
|
.Ip "\fB\-spkac filename\fR" 4
|
|
a file containing a single Netscape signed public key and challenge
|
|
and additional field values to be signed by the \s-1CA\s0. See the \fB\s-1NOTES\s0\fR
|
|
section for information on the required format.
|
|
.Ip "\fB\-infiles\fR" 4
|
|
if present this should be the last option, all subsequent arguments
|
|
are assumed to the the names of files containing certificate requests.
|
|
.Ip "\fB\-out filename\fR" 4
|
|
the output file to output certificates to. The default is standard
|
|
output. The certificate details will also be printed out to this
|
|
file.
|
|
.Ip "\fB\-outdir directory\fR" 4
|
|
the directory to output certificates to. The certificate will be
|
|
written to a filename consisting of the serial number in hex with
|
|
\*(L".pem\*(R" appended.
|
|
.Ip "\fB\-cert\fR" 4
|
|
the \s-1CA\s0 certificate file.
|
|
.Ip "\fB\-keyfile filename\fR" 4
|
|
the private key to sign requests with.
|
|
.Ip "\fB\-key password\fR" 4
|
|
the password used to encrypt the private key. Since on some
|
|
systems the command line arguments are visible (e.g. Unix with
|
|
the \*(L'ps\*(R' utility) this option should be used with caution.
|
|
.Ip "\fB\-verbose\fR" 4
|
|
this prints extra details about the operations being performed.
|
|
.Ip "\fB\-notext\fR" 4
|
|
don't output the text form of a certificate to the output file.
|
|
.Ip "\fB\-startdate date\fR" 4
|
|
this allows the start date to be explicitly set. The format of the
|
|
date is \s-1YYMMDDHHMMSSZ\s0 (the same as an \s-1ASN1\s0 UTCTime structure).
|
|
.Ip "\fB\-enddate date\fR" 4
|
|
this allows the expiry date to be explicitly set. The format of the
|
|
date is \s-1YYMMDDHHMMSSZ\s0 (the same as an \s-1ASN1\s0 UTCTime structure).
|
|
.Ip "\fB\-days arg\fR" 4
|
|
the number of days to certify the certificate for.
|
|
.Ip "\fB\-md alg\fR" 4
|
|
the message digest to use. Possible values include md5, sha1 and mdc2.
|
|
This option also applies to CRLs.
|
|
.Ip "\fB\-policy arg\fR" 4
|
|
this option defines the \s-1CA\s0 \*(L"policy\*(R" to use. This is a section in
|
|
the configuration file which decides which fields should be mandatory
|
|
or match the \s-1CA\s0 certificate. Check out the \fB\s-1POLICY\s0 \s-1FORMAT\s0\fR section
|
|
for more information.
|
|
.Ip "\fB\-msie_hack\fR" 4
|
|
this is a legacy option to make \fBca\fR work with very old versions of
|
|
the \s-1IE\s0 certificate enrollment control \*(L"certenr3\*(R". It used UniversalStrings
|
|
for almost everything. Since the old control has various security bugs
|
|
its use is strongly discouraged. The newer control \*(L"Xenroll\*(R" does not
|
|
need this option.
|
|
.Ip "\fB\-preserveDN\fR" 4
|
|
Normally the \s-1DN\s0 order of a certificate is the same as the order of the
|
|
fields in the relevant policy section. When this option is set the order
|
|
is the same as the request. This is largely for compatibility with the
|
|
older \s-1IE\s0 enrollment control which would only accept certificates if their
|
|
DNs match the order of the request. This is not needed for Xenroll.
|
|
.Ip "\fB\-batch\fR" 4
|
|
this sets the batch mode. In this mode no questions will be asked
|
|
and all certificates will be certified automatically.
|
|
.Ip "\fB\-extensions section\fR" 4
|
|
the section of the configuration file containing certificate extensions
|
|
to be added when a certificate is issued. If no extension section is
|
|
present then a V1 certificate is created. If the extension section
|
|
is present (even if it is empty) then a V3 certificate is created.
|
|
.SH "CRL OPTIONS"
|
|
.Ip "\fB\-gencrl\fR" 4
|
|
this option generates a \s-1CRL\s0 based on information in the index file.
|
|
.Ip "\fB\-crldays num\fR" 4
|
|
the number of days before the next \s-1CRL\s0 is due. That is the days from
|
|
now to place in the \s-1CRL\s0 nextUpdate field.
|
|
.Ip "\fB\-crlhours num\fR" 4
|
|
the number of hours before the next \s-1CRL\s0 is due.
|
|
.Ip "\fB\-revoke filename\fR" 4
|
|
a filename containing a certificate to revoke.
|
|
.Ip "\fB\-crlexts section\fR" 4
|
|
the section of the configuration file containing \s-1CRL\s0 extensions to
|
|
include. If no \s-1CRL\s0 extension section is present then a V1 \s-1CRL\s0 is
|
|
created, if the \s-1CRL\s0 extension section is present (even if it is
|
|
empty) then a V2 \s-1CRL\s0 is created. The \s-1CRL\s0 extensions specified are
|
|
\s-1CRL\s0 extensions and \fBnot\fR \s-1CRL\s0 entry extensions. It should be noted
|
|
that some software (for example Netscape) can't handle V2 CRLs.
|
|
.SH "CONFIGURATION FILE OPTIONS"
|
|
The options for \fBca\fR are contained in the \fBca\fR section of the
|
|
configuration file. Many of these are identical to command line
|
|
options. Where the option is present in the configuration file
|
|
and the command line the command line value is used. Where an
|
|
option is described as mandatory then it must be present in
|
|
the configuration file or the command line equivalent (if
|
|
any) used.
|
|
.Ip "\fBoid_file\fR" 4
|
|
This specifies a file containing additional \fB\s-1OBJECT\s0 \s-1IDENTIFIERS\s0\fR.
|
|
Each line of the file should consist of the numerical form of the
|
|
object identifier followed by white space then the short name followed
|
|
by white space and finally the long name.
|
|
.Ip "\fBoid_section\fR" 4
|
|
This specifies a section in the configuration file containing extra
|
|
object identifiers. Each line should consist of the short name of the
|
|
object identifier followed by \fB=\fR and the numerical form. The short
|
|
and long names are the same when this option is used.
|
|
.Ip "\fBnew_certs_dir\fR" 4
|
|
the same as the \fB\-outdir\fR command line option. It specifies
|
|
the directory where new certificates will be placed. Mandatory.
|
|
.Ip "\fBcertificate\fR" 4
|
|
the same as \fB\-cert\fR. It gives the file containing the \s-1CA\s0
|
|
certificate. Mandatory.
|
|
.Ip "\fBprivate_key\fR" 4
|
|
same as the \fB\-keyfile\fR option. The file containing the
|
|
\s-1CA\s0 private key. Mandatory.
|
|
.Ip "\fB\s-1RANDFILE\s0\fR" 4
|
|
a file used to read and write random number seed information, or
|
|
an \s-1EGD\s0 socket (see the \fIRAND_egd(3)|RAND_egd(3)\fR manpage).
|
|
.Ip "\fBdefault_days\fR" 4
|
|
the same as the \fB\-days\fR option. The number of days to certify
|
|
a certificate for.
|
|
.Ip "\fBdefault_startdate\fR" 4
|
|
the same as the \fB\-startdate\fR option. The start date to certify
|
|
a certificate for. If not set the current time is used.
|
|
.Ip "\fBdefault_enddate\fR" 4
|
|
the same as the \fB\-enddate\fR option. Either this option or
|
|
\fBdefault_days\fR (or the command line equivalents) must be
|
|
present.
|
|
.Ip "\fBdefault_crl_hours default_crl_days\fR" 4
|
|
the same as the \fB\-crlhours\fR and the \fB\-crldays\fR options. These
|
|
will only be used if neither command line option is present. At
|
|
least one of these must be present to generate a \s-1CRL\s0.
|
|
.Ip "\fBdefault_md\fR" 4
|
|
the same as the \fB\-md\fR option. The message digest to use. Mandatory.
|
|
.Ip "\fBdatabase\fR" 4
|
|
the text database file to use. Mandatory. This file must be present
|
|
though initially it will be empty.
|
|
.Ip "\fBserialfile\fR" 4
|
|
a text file containing the next serial number to use in hex. Mandatory.
|
|
This file must be present and contain a valid serial number.
|
|
.Ip "\fBx509_extensions\fR" 4
|
|
the same as \fB\-extensions\fR.
|
|
.Ip "\fBcrl_extensions\fR" 4
|
|
the same as \fB\-crlexts\fR.
|
|
.Ip "\fBpreserve\fR" 4
|
|
the same as \fB\-preserveDN\fR
|
|
.Ip "\fBmsie_hack\fR" 4
|
|
the same as \fB\-msie_hack\fR
|
|
.Ip "\fBpolicy\fR" 4
|
|
the same as \fB\-policy\fR. Mandatory. See the \fB\s-1POLICY\s0 \s-1FORMAT\s0\fR section
|
|
for more information.
|
|
.SH "POLICY FORMAT"
|
|
The policy section consists of a set of variables corresponding to
|
|
certificate DN fields. If the value is \*(L"match\*(R" then the field value
|
|
must match the same field in the CA certificate. If the value is
|
|
\*(L"supplied\*(R" then it must be present. If the value is \*(L"optional\*(R" then
|
|
it may be present. Any fields not mentioned in the policy section
|
|
are silently deleted, unless the \fB\-preserveDN\fR option is set but
|
|
this can be regarded more of a quirk than intended behaviour.
|
|
.SH "SPKAC FORMAT"
|
|
The input to the \fB\-spkac\fR command line option is a Netscape
|
|
signed public key and challenge. This will usually come from
|
|
the \fBKEYGEN\fR tag in an HTML form to create a new private key.
|
|
It is however possible to create SPKACs using the \fBspkac\fR utility.
|
|
.PP
|
|
The file should contain the variable SPKAC set to the value of
|
|
the SPKAC and also the required DN components as name value pairs.
|
|
If you need to include the same component twice then it can be
|
|
preceded by a number and a \*(L'.\*(R'.
|
|
.SH "EXAMPLES"
|
|
Note: these examples assume that the \fBca\fR directory structure is
|
|
already set up and the relevant files already exist. This usually
|
|
involves creating a CA certificate and private key with \fBreq\fR, a
|
|
serial number file and an empty index file and placing them in
|
|
the relevant directories.
|
|
.PP
|
|
To use the sample configuration file below the directories demoCA,
|
|
demoCA/private and demoCA/newcerts would be created. The CA
|
|
certificate would be copied to demoCA/cacert.pem and its private
|
|
key to demoCA/private/cakey.pem. A file demoCA/serial would be
|
|
created containing for example \*(L"01\*(R" and the empty index file
|
|
demoCA/index.txt.
|
|
.PP
|
|
Sign a certificate request:
|
|
.PP
|
|
.Vb 1
|
|
\& openssl ca -in req.pem -out newcert.pem
|
|
.Ve
|
|
Generate a CRL
|
|
.PP
|
|
.Vb 1
|
|
\& openssl ca -gencrl -out crl.pem
|
|
.Ve
|
|
Sign several requests:
|
|
.PP
|
|
.Vb 1
|
|
\& openssl ca -infiles req1.pem req2.pem req3.pem
|
|
.Ve
|
|
Certify a Netscape SPKAC:
|
|
.PP
|
|
.Vb 1
|
|
\& openssl ca -spkac spkac.txt
|
|
.Ve
|
|
A sample SPKAC file (the SPKAC line has been truncated for clarity):
|
|
.PP
|
|
.Vb 5
|
|
\& SPKAC=MIG0MGAwXDANBgkqhkiG9w0BAQEFAANLADBIAkEAn7PDhCeV/xIxUg8V70YRxK2A5
|
|
\& CN=Steve Test
|
|
\& emailAddress=steve@openssl.org
|
|
\& 0.OU=OpenSSL Group
|
|
\& 1.OU=Another Group
|
|
.Ve
|
|
A sample configuration file with the relevant sections for \fBca\fR:
|
|
.PP
|
|
.Vb 4
|
|
\& [ ca ]
|
|
\& default_ca = CA_default # The default ca section
|
|
\&
|
|
\& [ CA_default ]
|
|
.Ve
|
|
.Vb 12
|
|
\& dir = ./demoCA # top dir
|
|
\& database = $dir/index.txt # index file.
|
|
\& new_certs_dir = $dir/newcerts # new certs dir
|
|
\&
|
|
\& certificate = $dir/cacert.pem # The CA cert
|
|
\& serial = $dir/serial # serial no file
|
|
\& private_key = $dir/private/cakey.pem# CA private key
|
|
\& RANDFILE = $dir/private/.rand # random number file
|
|
\&
|
|
\& default_days = 365 # how long to certify for
|
|
\& default_crl_days= 30 # how long before next CRL
|
|
\& default_md = md5 # md to use
|
|
.Ve
|
|
.Vb 1
|
|
\& policy = policy_any # default policy
|
|
.Ve
|
|
.Vb 7
|
|
\& [ policy_any ]
|
|
\& countryName = supplied
|
|
\& stateOrProvinceName = optional
|
|
\& organizationName = optional
|
|
\& organizationalUnitName = optional
|
|
\& commonName = supplied
|
|
\& emailAddress = optional
|
|
.Ve
|
|
.SH "WARNINGS"
|
|
The \fBca\fR command is quirky and at times downright unfriendly.
|
|
.PP
|
|
The \fBca\fR utility was originally meant as an example of how to do things
|
|
in a CA. It was not supposed be be used as a full blown CA itself:
|
|
nevertheless some people are using it for this purpose.
|
|
.PP
|
|
The \fBca\fR command is effectively a single user command: no locking is
|
|
done on the various files and attempts to run more than one \fBca\fR command
|
|
on the same database can have unpredictable results.
|
|
.SH "FILES"
|
|
Note: the location of all files can change either by compile time options,
|
|
configuration file entries, environment variables or command line options.
|
|
The values below reflect the default values.
|
|
.PP
|
|
.Vb 10
|
|
\& /usr/local/ssl/lib/openssl.cnf - master configuration file
|
|
\& ./demoCA - main CA directory
|
|
\& ./demoCA/cacert.pem - CA certificate
|
|
\& ./demoCA/private/cakey.pem - CA private key
|
|
\& ./demoCA/serial - CA serial number file
|
|
\& ./demoCA/serial.old - CA serial number backup file
|
|
\& ./demoCA/index.txt - CA text database file
|
|
\& ./demoCA/index.txt.old - CA text database backup file
|
|
\& ./demoCA/certs - certificate output file
|
|
\& ./demoCA/.rnd - CA random seed information
|
|
.Ve
|
|
.SH "ENVIRONMENT VARIABLES"
|
|
\fBOPENSSL_CONF\fR reflects the location of master configuration file it can
|
|
be overridden by the \fB\-config\fR command line option.
|
|
.SH "RESTRICTIONS"
|
|
The text database index file is a critical part of the process and
|
|
if corrupted it can be difficult to fix. It is theoretically possible
|
|
to rebuild the index file from all the issued certificates and a current
|
|
CRL: however there is no option to do this.
|
|
.PP
|
|
CRL entry extensions cannot currently be created: only CRL extensions
|
|
can be added.
|
|
.PP
|
|
V2 CRL features like delta CRL support and CRL numbers are not currently
|
|
supported.
|
|
.PP
|
|
Although several requests can be input and handled at once it is only
|
|
possible to include one SPKAC or self signed certificate.
|
|
.SH "BUGS"
|
|
The use of an in memory text database can cause problems when large
|
|
numbers of certificates are present because, as the name implies
|
|
the database has to be kept in memory.
|
|
.PP
|
|
Certificate request extensions are ignored: some kind of \*(L"policy\*(R" should
|
|
be included to use certain static extensions and certain extensions
|
|
from the request.
|
|
.PP
|
|
It is not possible to certify two certificates with the same DN: this
|
|
is a side effect of how the text database is indexed and it cannot easily
|
|
be fixed without introducing other problems. Some S/MIME clients can use
|
|
two certificates with the same DN for separate signing and encryption
|
|
keys.
|
|
.PP
|
|
The \fBca\fR command really needs rewriting or the required functionality
|
|
exposed at either a command or interface level so a more friendly utility
|
|
(perl script or GUI) can handle things properly. The scripts \fBCA.sh\fR and
|
|
\fBCA.pl\fR help a little but not very much.
|
|
.PP
|
|
Any fields in a request that are not present in a policy are silently
|
|
deleted. This does not happen if the \fB\-preserveDN\fR option is used but
|
|
the extra fields are not displayed when the user is asked to certify
|
|
a request. The behaviour should be more friendly and configurable.
|
|
.PP
|
|
Cancelling some commands by refusing to certify a certificate can
|
|
create an empty file.
|
|
.SH "SEE ALSO"
|
|
the \fIreq(1)|req(1)\fR manpage, the \fIspkac(1)|spkac(1)\fR manpage, the \fIx509(1)|x509(1)\fR manpage, the \fICA.pl(1)|CA.pl(1)\fR manpage,
|
|
the \fIconfig(5)|config(5)\fR manpage
|
|
|
|
.rn }` ''
|
|
.IX Title "CA 1"
|
|
.IX Name "ca - sample minimal CA application"
|
|
|
|
.IX Header "NAME"
|
|
|
|
.IX Header "SYNOPSIS"
|
|
|
|
.IX Header "DESCRIPTION"
|
|
|
|
.IX Header "CA OPTIONS"
|
|
|
|
.IX Item "\fB\-config filename\fR"
|
|
|
|
.IX Item "\fB\-in filename\fR"
|
|
|
|
.IX Item "\fB\-ss_cert filename\fR"
|
|
|
|
.IX Item "\fB\-spkac filename\fR"
|
|
|
|
.IX Item "\fB\-infiles\fR"
|
|
|
|
.IX Item "\fB\-out filename\fR"
|
|
|
|
.IX Item "\fB\-outdir directory\fR"
|
|
|
|
.IX Item "\fB\-cert\fR"
|
|
|
|
.IX Item "\fB\-keyfile filename\fR"
|
|
|
|
.IX Item "\fB\-key password\fR"
|
|
|
|
.IX Item "\fB\-verbose\fR"
|
|
|
|
.IX Item "\fB\-notext\fR"
|
|
|
|
.IX Item "\fB\-startdate date\fR"
|
|
|
|
.IX Item "\fB\-enddate date\fR"
|
|
|
|
.IX Item "\fB\-days arg\fR"
|
|
|
|
.IX Item "\fB\-md alg\fR"
|
|
|
|
.IX Item "\fB\-policy arg\fR"
|
|
|
|
.IX Item "\fB\-msie_hack\fR"
|
|
|
|
.IX Item "\fB\-preserveDN\fR"
|
|
|
|
.IX Item "\fB\-batch\fR"
|
|
|
|
.IX Item "\fB\-extensions section\fR"
|
|
|
|
.IX Header "CRL OPTIONS"
|
|
|
|
.IX Item "\fB\-gencrl\fR"
|
|
|
|
.IX Item "\fB\-crldays num\fR"
|
|
|
|
.IX Item "\fB\-crlhours num\fR"
|
|
|
|
.IX Item "\fB\-revoke filename\fR"
|
|
|
|
.IX Item "\fB\-crlexts section\fR"
|
|
|
|
.IX Header "CONFIGURATION FILE OPTIONS"
|
|
|
|
.IX Item "\fBoid_file\fR"
|
|
|
|
.IX Item "\fBoid_section\fR"
|
|
|
|
.IX Item "\fBnew_certs_dir\fR"
|
|
|
|
.IX Item "\fBcertificate\fR"
|
|
|
|
.IX Item "\fBprivate_key\fR"
|
|
|
|
.IX Item "\fB\s-1RANDFILE\s0\fR"
|
|
|
|
.IX Item "\fBdefault_days\fR"
|
|
|
|
.IX Item "\fBdefault_startdate\fR"
|
|
|
|
.IX Item "\fBdefault_enddate\fR"
|
|
|
|
.IX Item "\fBdefault_crl_hours default_crl_days\fR"
|
|
|
|
.IX Item "\fBdefault_md\fR"
|
|
|
|
.IX Item "\fBdatabase\fR"
|
|
|
|
.IX Item "\fBserialfile\fR"
|
|
|
|
.IX Item "\fBx509_extensions\fR"
|
|
|
|
.IX Item "\fBcrl_extensions\fR"
|
|
|
|
.IX Item "\fBpreserve\fR"
|
|
|
|
.IX Item "\fBmsie_hack\fR"
|
|
|
|
.IX Item "\fBpolicy\fR"
|
|
|
|
.IX Header "POLICY FORMAT"
|
|
|
|
.IX Header "SPKAC FORMAT"
|
|
|
|
.IX Header "EXAMPLES"
|
|
|
|
.IX Header "WARNINGS"
|
|
|
|
.IX Header "FILES"
|
|
|
|
.IX Header "ENVIRONMENT VARIABLES"
|
|
|
|
.IX Header "RESTRICTIONS"
|
|
|
|
.IX Header "BUGS"
|
|
|
|
.IX Header "SEE ALSO"
|
|
|