1 .TH "PKI \-\-SELF" 1 "2013-07-31" "@PACKAGE_VERSION@" "strongSwan"
5 pki \-\-self \- Create a self-signed certificate
11 .IR file | \fB\-\-keyid\fR
14 .BI \-\-dn\~ distinguished-name
15 .OP \-\-san subjectAltName
17 .OP \-\-not-before datetime
18 .OP \-\-not-after datetime
25 .OP \-\-nc-permitted name
26 .OP \-\-nc-excluded name
27 .OP \-\-policy\-mapping mapping
28 .OP \-\-policy\-explicit len
29 .OP \-\-policy\-inhibit len
30 .OP \-\-policy\-any len
31 .OP \-\-cert\-policy oid\ \fR[\fB\-\-cps\-uri\ \fIuri\fR]\ \fR[\fB\-\-user\-notice\ \fItext\fR]
32 .OP \-\-outform encoding
37 .BI \-\-options\~ file
50 is used to create a self-signed certificate.
56 Print usage information with a summary of the available options.
58 .BI "\-v, \-\-debug " level
59 Set debug level, default: 1.
61 .BI "\-+, \-\-options " file
62 Read command line options from \fIfile\fR.
64 .BI "\-i, \-\-in " file
65 Private key input file. If not given the key is read from \fISTDIN\fR.
67 .BI "\-x, \-\-keyid " hex
68 Key ID of a private key on a smartcard.
70 .BI "\-t, \-\-type " type
71 Type of the input key. Either \fIrsa\fR or \fIecdsa\fR, defaults to \fIrsa\fR.
73 .BI "\-d, \-\-dn " distinguished-name
74 Subject and issuer distinguished name (DN). Required.
76 .BI "\-a, \-\-san " subjectAltName
77 subjectAltName extension to include in certificate. Can be used multiple times.
79 .BI "\-l, \-\-lifetime " days
80 Days the certificate is valid, default: 1095. Ignored if both
81 an absolute start and end time are given.
83 .BI "\-F, \-\-not-before " datetime
84 Absolute time when the validity of the certificate begins. The datetime format
89 .BI "\-T, \-\-not-after " datetime
90 Absolute time when the validity of the certificate ends. The datetime format is
95 .BI "\-D, \-\-dateform " form
96 strptime(3) format for the
103 .BI "\-s, \-\-serial " hex
104 Serial number in hex. It is randomly allocated by default.
106 .BI "\-e, \-\-flag " flag
107 Add extendedKeyUsage flag. One of \fIserverAuth\fR, \fIclientAuth\fR,
108 \fIcrlSign\fR, or \fIocspSigning\fR. Can be used multiple times.
110 .BI "\-g, \-\-digest " digest
111 Digest to use for signature creation. One of \fImd5\fR, \fIsha1\fR,
112 \fIsha224\fR, \fIsha256\fR, \fIsha384\fR, or \fIsha512\fR. Defaults to
115 .BI "\-f, \-\-outform " encoding
116 Encoding of the created certificate file. Either \fIder\fR (ASN.1 DER) or
117 \fIpem\fR (Base64 PEM), defaults to \fIder\fR.
120 Include CA basicConstraint extension in certificate.
122 .BI "\-o, \-\-ocsp " uri
123 OCSP AuthorityInfoAccess URI to include in certificate. Can be used multiple
126 .BI "\-p, \-\-pathlen " len
127 Set path length constraint.
129 .BI "\-n, \-\-nc-permitted " name
130 Add permitted NameConstraint extension to certificate. For DNS or email
131 constraints, the identity type is not always detectable by the given name. Use
136 prefix to force a constraint type.
138 .BI "\-N, \-\-nc-excluded " name
139 Add excluded NameConstraint extension to certificate. For DNS or email
140 constraints, the identity type is not always detectable by the given name. Use
145 prefix to force a constraint type.
147 .BI "\-M, \-\-policy-mapping " issuer-oid:subject-oid
148 Add policyMapping from issuer to subject OID.
150 .BI "\-E, \-\-policy-explicit " len
151 Add requireExplicitPolicy constraint.
153 .BI "\-H, \-\-policy-inhibit " len
154 Add inhibitPolicyMapping constraint.
156 .BI "\-A, \-\-policy-any " len
157 Add inhibitAnyPolicy constraint.
159 .SS "Certificate Policy"
160 Multiple certificatePolicy extensions can be added. Each with the following
163 .BI "\-P, \-\-cert-policy " oid
164 OID to include in certificatePolicy extension. Required.
166 .BI "\-C, \-\-cps-uri " uri
167 Certification Practice statement URI for certificatePolicy.
169 .BI "\-U, \-\-user-notice " text
170 User notice for certificatePolicy.
174 Generate a self-signed certificate using the given RSA key:
177 pki \-\-self \-\-in key.der \-\-dn "C=CH, O=strongSwan, CN=moon" \\
178 \-\-san moon.strongswan.org > cert.der