Debian Codegraph @

upstream/debian-unstable/man1/openssl-cmp.1ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "OPENSSL-CMP 1SSL"
58 .TH OPENSSL-CMP 1SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 openssl\-cmp \- Certificate Management Protocol (CMP, RFCs 9810 and 9811) application
65 .SH SYNOPSIS
66 .IX Header "SYNOPSIS"
67 \&\fBopenssl\fR \fBcmp\fR
68 [\fB\-help\fR]
69 [\fB\-config\fR \fIfilename\fR]
70 [\fB\-section\fR \fInames\fR]
71 [\fB\-verbosity\fR \fIlevel\fR]
72 .PP
73 Generic message options:
74 .PP
75 [\fB\-cmd\fR \fIir|cr|kur|p10cr|rr|genm\fR]
76 [\fB\-infotype\fR \fIname\fR]
77 [\fB\-profile\fR \fIname\fR]
78 [\fB\-geninfo\fR \fIvalues\fR]
79 [\fB\-template\fR \fIfilename\fR]
80 [\fB\-keyspec\fR \fIfilename\fR]
81 .PP
82 Certificate enrollment options:
83 .PP
84 [\fB\-newkey\fR \fIfilename\fR|\fIuri\fR]
85 [\fB\-newkeypass\fR \fIarg\fR]
86 [\fB\-centralkeygen\fR
87 [\fB\-newkeyout\fR \fIfilename\fR]
88 [\fB\-subject\fR \fIname\fR]
89 [\fB\-days\fR \fInumber\fR]
90 [\fB\-reqexts\fR \fIname\fR]
91 [\fB\-sans\fR \fIspec\fR]
92 [\fB\-san_nodefault\fR]
93 [\fB\-policies\fR \fIname\fR]
94 [\fB\-policy_oids\fR \fInames\fR]
95 [\fB\-policy_oids_critical\fR]
96 [\fB\-popo\fR \fInumber\fR]
97 [\fB\-csr\fR \fIfilename\fR]
98 [\fB\-out_trusted\fR \fIfilenames\fR|\fIuris\fR]
99 [\fB\-implicit_confirm\fR]
100 [\fB\-disable_confirm\fR]
101 [\fB\-certout\fR \fIfilename\fR]
102 [\fB\-chainout\fR \fIfilename\fR]
103 .PP
104 Certificate enrollment and revocation options:
105 .PP
106 [\fB\-oldcert\fR \fIfilename\fR|\fIuri\fR]
107 [\fB\-issuer\fR \fIname\fR]
108 [\fB\-serial\fR \fInumber\fR]
109 [\fB\-revreason\fR \fInumber\fR]
110 .PP
111 Message transfer options:
112 .PP
113 [\fB\-server\fR \fI[http[s]://][userinfo@]host[:port][/path][?query][#fragment]\fR]
114 [\fB\-proxy\fR \fI[http[s]://][userinfo@]host[:port][/path][?query][#fragment]\fR]
115 [\fB\-no_proxy\fR \fIaddresses\fR]
116 [\fB\-recipient\fR \fIname\fR]
117 [\fB\-path\fR \fIremote_path\fR]
118 [\fB\-keep_alive\fR \fIvalue\fR]
119 [\fB\-msg_timeout\fR \fIseconds\fR]
120 [\fB\-total_timeout\fR \fIseconds\fR]
121 .PP
122 Server authentication options:
123 .PP
124 [\fB\-trusted\fR \fIfilenames\fR|\fIuris\fR]
125 [\fB\-untrusted\fR \fIfilenames\fR|\fIuris\fR]
126 [\fB\-srvcert\fR \fIfilename\fR|\fIuri\fR]
127 [\fB\-expect_sender\fR \fIname\fR]
128 [\fB\-ignore_keyusage\fR]
129 [\fB\-unprotected_errors\fR]
130 [\fB\-no_cache_extracerts\fR]
131 [\fB\-srvcertout\fR \fIfilename\fR]
132 [\fB\-extracertsout\fR \fIfilename\fR]
133 [\fB\-cacertsout\fR \fIfilename\fR]
134 [\fB\-oldwithold\fR \fIfilename\fR]
135 [\fB\-newwithnew\fR \fIfilename\fR]
136 [\fB\-newwithold\fR \fIfilename\fR]
137 [\fB\-oldwithnew\fR \fIfilename\fR]
138 [\fB\-crlcert\fR \fIfilename\fR]
139 [\fB\-oldcrl\fR \fIfilename\fR]
140 [\fB\-crlout\fR \fIfilename\fR]
141 .PP
142 Client authentication and protection options:
143 .PP
144 [\fB\-ref\fR \fIvalue\fR]
145 [\fB\-secret\fR \fIarg\fR]
146 [\fB\-cert\fR \fIfilename\fR|\fIuri\fR]
147 [\fB\-own_trusted\fR \fIfilenames\fR|\fIuris\fR]
148 [\fB\-key\fR \fIfilename\fR|\fIuri\fR]
149 [\fB\-keypass\fR \fIarg\fR]
150 [\fB\-digest\fR \fIname\fR]
151 [\fB\-mac\fR \fIname\fR]
152 [\fB\-extracerts\fR \fIfilenames\fR|\fIuris\fR]
153 [\fB\-unprotected_requests\fR]
154 .PP
155 Credentials format options:
156 .PP
157 [\fB\-certform\fR \fIPEM|DER\fR]
158 [\fB\-crlform\fR \fIPEM|DER\fR]
159 [\fB\-keyform\fR \fIPEM|DER|P12|ENGINE\fR]
160 [\fB\-otherpass\fR \fIarg\fR]
161 [\fB\-engine\fR \fIid\fR]
162 [\fB\-provider\fR \fIname\fR]
163 [\fB\-provider\-path\fR \fIpath\fR]
164 [\fB\-provparam\fR \fI[name:]key=value\fR]
165 [\fB\-propquery\fR \fIpropq\fR]
166 .PP
167 Random state options:
168 .PP
169 [\fB\-rand\fR \fIfiles\fR]
170 [\fB\-writerand\fR \fIfile\fR]
171 .PP
172 TLS connection options:
173 .PP
174 [\fB\-tls_used\fR]
175 [\fB\-tls_cert\fR \fIfilename\fR|\fIuri\fR]
176 [\fB\-tls_key\fR \fIfilename\fR|\fIuri\fR]
177 [\fB\-tls_keypass\fR \fIarg\fR]
178 [\fB\-tls_extra\fR \fIfilenames\fR|\fIuris\fR]
179 [\fB\-tls_trusted\fR \fIfilenames\fR|\fIuris\fR]
180 [\fB\-tls_host\fR \fIname\fR]
181 .PP
182 Client-side debugging options:
183 .PP
184 [\fB\-batch\fR]
185 [\fB\-repeat\fR \fInumber\fR]
186 [\fB\-reqin\fR \fIfilenames\fR]
187 [\fB\-reqin_new_tid\fR]
188 [\fB\-reqout\fR \fIfilenames\fR]
189 [\fB\-reqout_only\fR \fIfilename\fR]
190 [\fB\-rspin\fR \fIfilenames\fR]
191 [\fB\-rspout\fR \fIfilenames\fR]
192 [\fB\-use_mock_srv\fR]
193 .PP
194 Mock server options:
195 .PP
196 [\fB\-port\fR \fInumber\fR]
197 [\fB\-max_msgs\fR \fInumber\fR]
198 [\fB\-srv_ref\fR \fIvalue\fR]
199 [\fB\-srv_secret\fR \fIarg\fR]
200 [\fB\-srv_cert\fR \fIfilename\fR|\fIuri\fR]
201 [\fB\-srv_key\fR \fIfilename\fR|\fIuri\fR]
202 [\fB\-srv_keypass\fR \fIarg\fR]
203 [\fB\-srv_trusted\fR \fIfilenames\fR|\fIuris\fR]
204 [\fB\-srv_untrusted\fR \fIfilenames\fR|\fIuris\fR]
205 [\fB\-ref_cert\fR \fIfilename\fR|\fIuri\fR]
206 [\fB\-rsp_cert\fR \fIfilename\fR|\fIuri\fR]
207 [\fB\-rsp_key\fR \fIfilename\fR|\fIuri\fR]
208 [\fB\-rsp_keypass\fR \fIfilename\fR|\fIuri\fR]
209 [\fB\-rsp_crl\fR \fIfilename\fR|\fIuri\fR]
210 [\fB\-rsp_extracerts\fR \fIfilenames\fR|\fIuris\fR]
211 [\fB\-rsp_capubs\fR \fIfilenames\fR|\fIuris\fR]
212 [\fB\-rsp_newwithnew\fR \fIfilename\fR|\fIuri\fR]
213 [\fB\-rsp_newwithold\fR \fIfilename\fR|\fIuri\fR]
214 [\fB\-rsp_oldwithnew\fR \fIfilename\fR|\fIuri\fR]
215 [\fB\-poll_count\fR \fInumber\fR]
216 [\fB\-check_after\fR \fInumber\fR]
217 [\fB\-grant_implicitconf\fR]
218 [\fB\-pkistatus\fR \fInumber\fR]
219 [\fB\-failure\fR \fInumber\fR]
220 [\fB\-failurebits\fR \fInumber\fR]
221 [\fB\-statusstring\fR \fIarg\fR]
222 [\fB\-send_error\fR]
223 [\fB\-send_unprotected\fR]
224 [\fB\-send_unprot_err\fR]
225 [\fB\-accept_unprotected\fR]
226 [\fB\-accept_unprot_err\fR]
227 [\fB\-accept_raverified\fR]
228 .PP
229 Certificate verification options, for both CMP and TLS:
230 .PP
231 [\fB\-allow_proxy_certs\fR]
232 [\fB\-attime\fR \fItimestamp\fR]
233 [\fB\-no_check_time\fR]
234 [\fB\-check_ss_sig\fR]
235 [\fB\-crl_check\fR]
236 [\fB\-crl_check_all\fR]
237 [\fB\-explicit_policy\fR]
238 [\fB\-extended_crl\fR]
239 [\fB\-ignore_critical\fR]
240 [\fB\-inhibit_any\fR]
241 [\fB\-inhibit_map\fR]
242 [\fB\-partial_chain\fR]
243 [\fB\-policy\fR \fIarg\fR]
244 [\fB\-policy_check\fR]
245 [\fB\-policy_print\fR]
246 [\fB\-purpose\fR \fIpurpose\fR]
247 [\fB\-suiteB_128\fR]
248 [\fB\-suiteB_128_only\fR]
249 [\fB\-suiteB_192\fR]
250 [\fB\-trusted_first\fR]
251 [\fB\-no_alt_chains\fR]
252 [\fB\-use_deltas\fR]
253 [\fB\-auth_level\fR \fInum\fR]
254 [\fB\-verify_depth\fR \fInum\fR]
255 [\fB\-verify_email\fR \fIemail\fR]
256 [\fB\-verify_hostname\fR \fIhostname\fR]
257 [\fB\-verify_ip\fR \fIip\fR]
258 [\fB\-verify_name\fR \fIname\fR]
259 [\fB\-x509_strict\fR]
260 [\fB\-issuer_checks\fR]
261 .SH DESCRIPTION
262 .IX Header "DESCRIPTION"
263 The \fBcmp\fR command is a client implementation for the Certificate
264 Management Protocol (CMP) as defined in RFCs 9810 and
265 its HTTP(S) transfer as defined in RFC 9811.
266 It can be used to request certificates from a CA server,
267 update their certificates,
268 request certificates to be revoked, and perform other types of CMP requests.
269 .SH OPTIONS
270 .IX Header "OPTIONS"
271 .IP \fB\-help\fR 4
272 .IX Item "-help"
273 Display a summary of all options
274 .IP "\fB\-config\fR \fIfilename\fR" 4
275 .IX Item "-config filename"
276 Configuration file to use.
277 An empty string \f(CW""\fR means none.
278 Default filename is from the environment variable \f(CW\*(C`OPENSSL_CONF\*(C'\fR.
279 .IP "\fB\-section\fR \fInames\fR" 4
280 .IX Item "-section names"
281 Section(s) to use within config file defining CMP options.
282 An empty string \f(CW""\fR means no specific section.
283 Default is \f(CW\*(C`cmp\*(C'\fR.
284 .Sp
285 Multiple section names may be given, separated by commas and/or whitespace
286 (where in the latter case the whole argument must be enclosed in "...").
287 Contents of sections named later may override contents of sections named before.
288 In any case, as usual, the \f(CW\*(C`[default]\*(C'\fR section and finally the unnamed
289 section (as far as present) can provide per-option fallback values.
290 .IP "\fB\-verbosity\fR \fIlevel\fR" 4
291 .IX Item "-verbosity level"
292 Level of verbosity for logging, error output, etc.
293 0 = EMERG, 1 = ALERT, 2 = CRIT, 3 = ERR, 4 = WARN, 5 = NOTE,
294 6 = INFO, 7 = DEBUG, 8 = TRACE.
295 Defaults to 6 = INFO.
296 .SS "Generic message options"
297 .IX Subsection "Generic message options"
298 .IP "\fB\-cmd\fR \fIir|cr|kur|p10cr|rr|genm\fR" 4
299 .IX Item "-cmd ir|cr|kur|p10cr|rr|genm"
300 CMP command to execute.
301 Currently implemented commands are:
302 .RS 4
303 .IP "ir \ \- Initialization Request" 8
304 .IX Item "ir \ - Initialization Request"
305 .PD 0
306 .IP "cr \ \- Certificate Request" 8
307 .IX Item "cr \ - Certificate Request"
308 .IP "p10cr \- PKCS#10 Certification Request (for legacy support)" 8
309 .IX Item "p10cr - PKCS#10 Certification Request (for legacy support)"
310 .IP "kur \ \ \- Key Update Request" 8
311 .IX Item "kur \ \ - Key Update Request"
312 .IP "rr \ \- Revocation Request" 8
313 .IX Item "rr \ - Revocation Request"
314 .IP "genm \- General Message" 8
315 .IX Item "genm - General Message"
316 .RE
317 .RS 4
318 .PD
319 .Sp
320 \&\fBir\fR requests initialization of an end entity into a PKI hierarchy
321 by issuing a first certificate.
322 .Sp
323 \&\fBcr\fR requests issuing an additional certificate for an end entity already
324 initialized to the PKI hierarchy.
325 .Sp
326 \&\fBp10cr\fR requests issuing an additional certificate similarly to \fBcr\fR
327 but using legacy PKCS#10 CSR format.
328 .Sp
329 \&\fBkur\fR requests a (key) update for an existing certificate.
330 .Sp
331 \&\fBrr\fR requests revocation of an existing certificate.
332 .Sp
333 \&\fBgenm\fR requests information using a General Message, where optionally
334 included \fBInfoTypeAndValue\fRs may be used to state which info is of interest.
335 Upon receipt of the General Response, information about all received
336 ITAV \fBinfoType\fRs is printed to stdout.
337 .RE
338 .IP "\fB\-infotype\fR \fIname\fR" 4
339 .IX Item "-infotype name"
340 Set InfoType name to use for requesting specific info in \fBgenm\fR,
341 e.g., \f(CW\*(C`signKeyPairTypes\*(C'\fR.
342 There is specific support for \f(CW\*(C`caCerts\*(C'\fR, \f(CW\*(C`rootCaCert\*(C'\fR,
343 \&\f(CW\*(C`certReqTemplate\*(C'\fR, and \f(CW\*(C`crlStatusList\*(C'\fR (CRL update retrieval).
344 .IP "\fB\-profile\fR \fIname\fR" 4
345 .IX Item "-profile name"
346 Name of a certificate profile to place in
347 the PKIHeader generalInfo field of request messages.
348 .IP "\fB\-geninfo\fR \fIvalues\fR" 4
349 .IX Item "-geninfo values"
350 A comma-separated list of InfoTypeAndValue to place in
351 the generalInfo field of the PKIHeader of requests messages.
352 Each InfoTypeAndValue gives an OID and an integer or string value
353 of the form \fIOID\fR:int:\fInumber\fR or \fIOID\fR:str:\fItext\fR,
354 e.g., \f(CW\*(Aq1.2.3.4:int:56789, id\-kp:str:name\*(Aq\fR.
355 .IP "\fB\-template\fR \fIfilename\fR" 4
356 .IX Item "-template filename"
357 The file to save any CRMF certTemplate in DER format
358 received in a genp message with id-it-certReqTemplate.
359 .IP "\fB\-keyspec\fR \fIfilename\fR" 4
360 .IX Item "-keyspec filename"
361 It is optional and used to specify the file to save any keySpec if
362 present in a genp message with id-it-keyGenParameters.
363 .Sp
364 Note: any keySpec field contents received are logged as INFO.
365 .SS "Certificate enrollment options"
366 .IX Subsection "Certificate enrollment options"
367 .IP "\fB\-newkey\fR \fIfilename\fR|\fIuri\fR" 4
368 .IX Item "-newkey filename|uri"
369 The source of the private or public key for the certificate being requested.
370 Defaults to the public key in the PKCS#10 CSR given with the \fB\-csr\fR option,
371 the public key of the reference certificate, or the current client key.
372 .Sp
373 The public portion of the key is placed in the certification request.
374 .Sp
375 Unless \fB\-cmd\fR \fIp10cr\fR, \fB\-popo\fR \fI\-1\fR, or \fB\-popo\fR \fI0\fR is given, the
376 private key will be needed as well to provide the proof of possession (POPO),
377 where the \fB\-key\fR option may provide a fallback.
378 .IP "\fB\-newkeypass\fR \fIarg\fR" 4
379 .IX Item "-newkeypass arg"
380 Pass phrase source for the key given with the \fB\-newkey\fR option.
381 If not given here, the password will be prompted for if needed.
382 .Sp
383 For more information about the format of \fIarg\fR see
384 \&\fBopenssl\-passphrase\-options\fR\|(1).
385 .IP \fB\-centralkeygen\fR 4
386 .IX Item "-centralkeygen"
387 Request central key generation for certificate enrollment.
388 This applies to \fB\-cmd\fR \fIir|cr|kur|p10cr\fR.
389 .IP "\fB\-newkeyout\fR \fIfilename\fR" 4
390 .IX Item "-newkeyout filename"
391 File to save centrally generated private key, in PEM format.
392 .IP "\fB\-subject\fR \fIname\fR" 4
393 .IX Item "-subject name"
394 X.509 Distinguished Name (DN) to use as subject field
395 in the requested certificate template in IR/CR/KUR messages.
396 If the NULL-DN (\f(CW\*(C`/\*(C'\fR) is given then no subject is placed in the template.
397 Default is the subject DN of any PKCS#10 CSR given with the \fB\-csr\fR option.
398 For KUR, a further fallback is the subject DN
399 of the reference certificate (see \fB\-oldcert\fR) if provided.
400 This fallback is used for IR and CR only if no SANs are set.
401 .Sp
402 If provided and neither of \fB\-cert\fR, \fB\-oldcert\fR, or \fB\-csr\fR is given,
403 the subject DN is used as fallback sender of outgoing CMP messages.
404 .Sp
405 The argument must be formatted as \fI/type0=value0/type1=value1/type2=...\fR.
406 Special characters may be escaped by \f(CW\*(C`\e\*(C'\fR (backslash); whitespace is retained.
407 Empty values are permitted, but the corresponding type will not be included.
408 Giving a single \f(CW\*(C`/\*(C'\fR will lead to an empty sequence of RDNs (a NULL-DN).
409 Multi-valued RDNs can be formed by placing a \f(CW\*(C`+\*(C'\fR character instead of a \f(CW\*(C`/\*(C'\fR
410 between the AttributeValueAssertions (AVAs) that specify the members of the set.
411 Example:
412 .Sp
413 \&\f(CW\*(C`/DC=org/DC=OpenSSL/DC=users/UID=123456+CN=John Doe\*(C'\fR
414 .IP "\fB\-days\fR \fInumber\fR" 4
415 .IX Item "-days number"
416 Number of days the new certificate is requested to be valid for, counting from
417 the current time of the host.
418 Also triggers the explicit request that the
419 validity period starts from the current time (as seen by the host).
420 .IP "\fB\-reqexts\fR \fIname\fR" 4
421 .IX Item "-reqexts name"
422 Name of section in OpenSSL config file defining certificate request extensions.
423 If the \fB\-csr\fR option is present, these extensions augment the extensions
424 contained the given PKCS#10 CSR, overriding any extensions with same OIDs.
425 .IP "\fB\-sans\fR \fIspec\fR" 4
426 .IX Item "-sans spec"
427 One or more IP addresses, email addresses, DNS names, or URIs
428 separated by commas or whitespace
429 (where in the latter case the whole argument must be enclosed in "...")
430 to add as Subject Alternative Name(s) (SAN) certificate request extension.
431 If the special element "critical" is given the SANs are flagged as critical.
432 Cannot be used if any Subject Alternative Name extension is set via \fB\-reqexts\fR.
433 .IP \fB\-san_nodefault\fR 4
434 .IX Item "-san_nodefault"
435 When Subject Alternative Names are not given via \fB\-sans\fR
436 nor defined via \fB\-reqexts\fR,
437 they are copied by default from the reference certificate (see \fB\-oldcert\fR).
438 This can be disabled by giving the \fB\-san_nodefault\fR option.
439 .IP "\fB\-policies\fR \fIname\fR" 4
440 .IX Item "-policies name"
441 Name of section in OpenSSL config file defining policies to be set
442 as certificate request extension.
443 This option cannot be used together with \fB\-policy_oids\fR.
444 .IP "\fB\-policy_oids\fR \fInames\fR" 4
445 .IX Item "-policy_oids names"
446 One or more OID(s), separated by commas and/or whitespace
447 (where in the latter case the whole argument must be enclosed in "...")
448 to add as certificate policies request extension.
449 This option cannot be used together with \fB\-policies\fR.
450 .IP \fB\-policy_oids_critical\fR 4
451 .IX Item "-policy_oids_critical"
452 Flag the policies given with \fB\-policy_oids\fR as critical.
453 .IP "\fB\-popo\fR \fInumber\fR" 4
454 .IX Item "-popo number"
455 Proof-of-possession (POPO) method to use for IR/CR/KUR; values: \f(CW\-1\fR..<2> where
456 \&\f(CW\-1\fR = NONE, which implies central key generation,
457 \&\f(CW0\fR = RAVERIFIED, \f(CW1\fR = SIGNATURE (default), \f(CW2\fR = KEYENC.
458 .Sp
459 Note that a signature-based POPO can only be produced if a private key
460 is provided via the \fB\-newkey\fR or \fB\-key\fR options.
461 .IP "\fB\-csr\fR \fIfilename\fR" 4
462 .IX Item "-csr filename"
463 PKCS#10 CSR in PEM or DER format containing a certificate request.
464 With \fB\-cmd\fR \fIp10cr\fR it is used directly in a legacy P10CR message.
465 .Sp
466 When used with \fB\-cmd\fR \fIir\fR, \fIcr\fR, or \fIkur\fR,
467 it is transformed into the respective regular CMP request.
468 In this case, a private key must be provided (with \fB\-newkey\fR or \fB\-key\fR)
469 for the proof of possession (unless \fB\-popo\fR \fI\-1\fR or \fB\-popo\fR \fI0\fR is used)
470 and the respective public key is placed in the certification request
471 (rather than taking over the public key contained in the PKCS#10 CSR).
472 .Sp
473 PKCS#10 CSR input may also be used with \fB\-cmd\fR \fIrr\fR
474 to specify the certificate to be revoked
475 via the included subject name and public key.
476 Its subject is used as fallback sender in CMP message headers
477 if \fB\-cert\fR and \fB\-oldcert\fR are not given.
478 .IP "\fB\-out_trusted\fR \fIfilenames\fR|\fIuris\fR" 4
479 .IX Item "-out_trusted filenames|uris"
480 Trusted certificate(s) to use for validating the newly enrolled certificate.
481 During this verification, any certificate status checking is disabled.
482 .Sp
483 Multiple sources may be given, separated by commas and/or whitespace
484 (where in the latter case the whole argument must be enclosed in "...").
485 Each source may contain multiple certificates.
486 .Sp
487 The certificate verification options
488 \&\fB\-verify_hostname\fR, \fB\-verify_ip\fR, and \fB\-verify_email\fR
489 only affect the certificate verification enabled via this option.
490 .IP \fB\-implicit_confirm\fR 4
491 .IX Item "-implicit_confirm"
492 Request implicit confirmation of newly enrolled certificates.
493 .IP \fB\-disable_confirm\fR 4
494 .IX Item "-disable_confirm"
495 Do not send certificate confirmation message for newly enrolled certificate
496 without requesting implicit confirmation
497 to cope with broken servers not supporting implicit confirmation correctly.
498 \&\fBWARNING:\fR This leads to behavior violating RFC 9810.
499 .IP "\fB\-certout\fR \fIfilename\fR" 4
500 .IX Item "-certout filename"
501 The file where any newly enrolled certificate should be saved.
502 .IP "\fB\-chainout\fR \fIfilename\fR" 4
503 .IX Item "-chainout filename"
504 The file where the chain of any newly enrolled certificate should be saved.
505 This chain excludes the leaf certificate, i.e., the newly enrolled certificate.
506 Also the trust anchor (the root certificate) is not included.
507 .Sp
508 If the \fB\-certout\fR option is given, too, with equal \fIfilename\fR argument,
509 then the file produced contains both outputs concatenated:
510 the newly enrolled certificate followed by its chain.
511 .SS "Certificate enrollment and revocation options"
512 .IX Subsection "Certificate enrollment and revocation options"
513 .IP "\fB\-oldcert\fR \fIfilename\fR|\fIuri\fR" 4
514 .IX Item "-oldcert filename|uri"
515 The certificate to be updated (i.e., renewed or re-keyed) in Key Update Request
516 (KUR) messages or to be revoked in Revocation Request (RR) messages.
517 For KUR the certificate to be updated defaults to \fB\-cert\fR,
518 and the resulting certificate is called \fIreference certificate\fR.
519 For RR the certificate to be revoked can also be specified using \fB\-csr\fR.
520 \&\fB\-oldcert\fR and \fB\-csr\fR is ignored if \fB\-issuer\fR and \fB\-serial\fR is provided.
521 .Sp
522 The reference certificate, if any, is also used for
523 deriving default subject DN and Subject Alternative Names and the
524 default issuer entry in the requested certificate template of an IR/CR/KUR.
525 Its public key is used as a fallback in the template of certification requests.
526 Its subject is used as sender of outgoing messages if \fB\-cert\fR is not given.
527 Its issuer is used as default recipient in CMP message headers
528 if neither \fB\-recipient\fR, \fB\-srvcert\fR, nor \fB\-issuer\fR is given.
529 .IP "\fB\-issuer\fR \fIname\fR" 4
530 .IX Item "-issuer name"
531 X.509 Distinguished Name (DN) to place as the issuer field
532 in the requested certificate template in IR/CR/KUR/RR messages.
533 If the NULL-DN (\f(CW\*(C`/\*(C'\fR) is given then no issuer is placed in the template.
534 .Sp
535 If provided and neither \fB\-recipient\fR nor \fB\-srvcert\fR is given,
536 the issuer DN is used as fallback recipient of outgoing CMP messages.
537 .Sp
538 The argument must be formatted as \fI/type0=value0/type1=value1/type2=...\fR.
539 For details see the description of the \fB\-subject\fR option.
540 .IP "\fB\-serial\fR \fInumber\fR" 4
541 .IX Item "-serial number"
542 Specify the Serial number of certificate to be revoked in revocation request.
543 The serial number can be decimal or hex (if preceded by \f(CW\*(C`0x\*(C'\fR)
544 .IP "\fB\-revreason\fR \fInumber\fR" 4
545 .IX Item "-revreason number"
546 Set CRLReason to be included in revocation request (RR); values: \f(CW0\fR..\f(CW10\fR
547 or \f(CW\-1\fR for none (which is the default).
548 .Sp
549 Reason numbers defined in RFC 5280 are:
550 .Sp
551 .Vb 10
552 \& CRLReason ::= ENUMERATED {
553 \& unspecified (0),
554 \& keyCompromise (1),
555 \& cACompromise (2),
556 \& affiliationChanged (3),
557 \& superseded (4),
558 \& cessationOfOperation (5),
559 \& certificateHold (6),
560 \& \-\- value 7 is not used
561 \& removeFromCRL (8),
562 \& privilegeWithdrawn (9),
563 \& aACompromise (10)
564 \& }
565 .Ve
566 .SS "Message transfer options"
567 .IX Subsection "Message transfer options"
568 .IP "\fB\-server\fR \fI[http[s]://][userinfo@]host[:port][/path][?query][#fragment]\fR" 4
569 .IX Item "-server [http[s]://][userinfo@]host[:port][/path][?query][#fragment]"
570 The \fIhost\fR domain name or IP address and optionally \fIport\fR
571 of the CMP server to connect to using HTTP(S).
572 IP address may be for v4 or v6, such as \f(CW127.0.0.1\fR or \f(CW\*(C`[::1]\*(C'\fR for localhost.
573 If the host string is an IPv6 address, it must be enclosed in \f(CW\*(C`[\*(C'\fR and \f(CW\*(C`]\*(C'\fR.
574 .Sp
575 This option excludes \fI\-port\fR and \fI\-use_mock_srv\fR.
576 It is ignored if \fI\-rspin\fR is given with enough filename arguments.
577 .Sp
578 If the scheme \f(CW\*(C`https\*(C'\fR is given, the \fB\-tls_used\fR option is implied.
579 When TLS is used, the default port is 443, otherwise 80.
580 The optional userinfo and fragment components are ignored.
581 Any given query component is handled as part of the path component.
582 If a path is included it provides the default value for the \fB\-path\fR option.
583 .IP "\fB\-proxy\fR \fI[http[s]://][userinfo@]host[:port][/path][?query][#fragment]\fR" 4
584 .IX Item "-proxy [http[s]://][userinfo@]host[:port][/path][?query][#fragment]"
585 The HTTP(S) proxy server to use for reaching the CMP server unless \fB\-no_proxy\fR
586 applies, see below.
587 If the host string is an IPv6 address, it must be enclosed in \f(CW\*(C`[\*(C'\fR and \f(CW\*(C`]\*(C'\fR.
588 The proxy port defaults to 80 or 443 if the scheme is \f(CW\*(C`https\*(C'\fR; apart from that
589 the optional \f(CW\*(C`http://\*(C'\fR or \f(CW\*(C`https://\*(C'\fR prefix is ignored (note that using TLS
590 may be required by \fB\-tls_used\fR or \fB\-server\fR with the prefix \f(CW\*(C`https\*(C'\fR),
591 as well as any path, userinfo, and query, and fragment components.
592 Defaults to the environment variable \f(CW\*(C`http_proxy\*(C'\fR if set, else \f(CW\*(C`HTTP_PROXY\*(C'\fR
593 in case no TLS is used, otherwise \f(CW\*(C`https_proxy\*(C'\fR if set, else \f(CW\*(C`HTTPS_PROXY\*(C'\fR.
594 This option is ignored if \fI\-server\fR is not given.
595 .IP "\fB\-no_proxy\fR \fIaddresses\fR" 4
596 .IX Item "-no_proxy addresses"
597 List of IP addresses and/or DNS names of servers
598 not to use an HTTP(S) proxy for, separated by commas and/or whitespace
599 (where in the latter case the whole argument must be enclosed in "...").
600 Default is from the environment variable \f(CW\*(C`no_proxy\*(C'\fR if set, else \f(CW\*(C`NO_PROXY\*(C'\fR.
601 This option is ignored if \fI\-server\fR is not given.
602 .IP "\fB\-recipient\fR \fIname\fR" 4
603 .IX Item "-recipient name"
604 Distinguished Name (DN) to use in the recipient field of CMP request message
605 headers, i.e., the CMP server (usually the addressed CA).
606 .Sp
607 The recipient field in the header of a CMP message is mandatory.
608 If not given explicitly the recipient is determined in the following order:
609 the subject of the CMP server certificate given with the \fB\-srvcert\fR option,
610 the \fB\-issuer\fR option,
611 the issuer of the certificate given with the \fB\-oldcert\fR option,
612 the issuer of the CMP client certificate (\fB\-cert\fR option),
613 as far as any of those is present, else the NULL-DN as last resort.
614 .Sp
615 The argument must be formatted as \fI/type0=value0/type1=value1/type2=...\fR.
616 For details see the description of the \fB\-subject\fR option.
617 .IP "\fB\-path\fR \fIremote_path\fR" 4
618 .IX Item "-path remote_path"
619 HTTP path at the CMP server (aka CMP alias) to use for POST requests.
620 Defaults to any path given with \fB\-server\fR, else \f(CW"/"\fR.
621 .IP "\fB\-keep_alive\fR \fIvalue\fR" 4
622 .IX Item "-keep_alive value"
623 If the given value is 0 then HTTP connections are closed after each response
624 (which would be the default behavior of HTTP 1.0)
625 even if a CMP transaction needs more than one round trip.
626 If the value is 1 or 2
627 then for each transaction a persistent connection is requested.
628 If the value is 2 then a persistent connection is required,
629 i.e., an error occurs if the server does not grant it.
630 The default value is 1, which means preferring to keep the connection open.
631 .IP "\fB\-msg_timeout\fR \fIseconds\fR" 4
632 .IX Item "-msg_timeout seconds"
633 Number of seconds a CMP request-response message round trip
634 is allowed to take before a timeout error is returned.
635 A value <= 0 means no limitation (waiting indefinitely).
636 Default is to use the \fB\-total_timeout\fR setting.
637 .IP "\fB\-total_timeout\fR \fIseconds\fR" 4
638 .IX Item "-total_timeout seconds"
639 Maximum total number of seconds a transaction may take,
640 including polling etc.
641 A value <= 0 means no limitation (waiting indefinitely).
642 Default is 0.
643 .SS "Server authentication options"
644 .IX Subsection "Server authentication options"
645 .IP "\fB\-trusted\fR \fIfilenames\fR|\fIuris\fR" 4
646 .IX Item "-trusted filenames|uris"
647 The certificate(s), typically of root CAs, the client shall use as trust anchors
648 when validating signature-based protection of CMP response messages.
649 This option is ignored if the \fB\-srvcert\fR option is given as well.
650 It provides more flexibility than \fB\-srvcert\fR because the CMP protection
651 certificate of the server is not pinned but may be any certificate
652 from which a chain to one of the given trust anchors can be constructed.
653 .Sp
654 If none of \fB\-trusted\fR, \fB\-srvcert\fR, and \fB\-secret\fR is given, message validation
655 errors will be thrown unless \fB\-unprotected_errors\fR permits an exception.
656 .Sp
657 Multiple sources may be given, separated by commas and/or whitespace
658 (where in the latter case the whole argument must be enclosed in "...").
659 Each source may contain multiple certificates.
660 .Sp
661 The certificate verification options
662 \&\fB\-verify_hostname\fR, \fB\-verify_ip\fR, and \fB\-verify_email\fR
663 have no effect on the certificate verification enabled via this option.
664 .IP "\fB\-untrusted\fR \fIfilenames\fR|\fIuris\fR" 4
665 .IX Item "-untrusted filenames|uris"
666 Non-trusted intermediate CA certificate(s).
667 Any extra certificates given with the \fB\-cert\fR option are appended to it.
668 All these certificates may be useful for cert path construction
669 for the own CMP signer certificate (to include in the extraCerts field of
670 request messages) and for the TLS client certificate (if TLS is used)
671 as well as for chain building
672 when validating server certificates (checking signature-based
673 CMP message protection) and when validating newly enrolled certificates.
674 .Sp
675 Multiple sources may be given, separated by commas and/or whitespace
676 (where in the latter case the whole argument must be enclosed in "...").
677 Each source may contain multiple certificates.
678 .IP "\fB\-srvcert\fR \fIfilename\fR|\fIuri\fR" 4
679 .IX Item "-srvcert filename|uri"
680 The specific CMP server certificate to expect and directly trust (even if it is
681 expired) when verifying signature-based protection of CMP response messages.
682 This pins the accepted server and results in ignoring the \fB\-trusted\fR option.
683 .Sp
684 If set, the subject of the certificate is also used
685 as default value for the recipient of CMP requests
686 and as default value for the expected sender of CMP responses.
687 .IP "\fB\-expect_sender\fR \fIname\fR" 4
688 .IX Item "-expect_sender name"
689 Distinguished Name (DN) expected in the sender field of incoming CMP messages.
690 Defaults to the subject DN of the pinned \fB\-srvcert\fR, if any.
691 .Sp
692 This can be used to make sure that only a particular entity is accepted as
693 CMP message signer, and attackers are not able to use arbitrary certificates
694 of a trusted PKI hierarchy to fraudulently pose as a CMP server.
695 Note that this option gives slightly more freedom than setting the \fB\-srvcert\fR,
696 which pins the server to the holder of a particular certificate, while the
697 expected sender name will continue to match after updates of the server cert.
698 .Sp
699 The argument must be formatted as \fI/type0=value0/type1=value1/type2=...\fR.
700 For details see the description of the \fB\-subject\fR option.
701 .IP \fB\-ignore_keyusage\fR 4
702 .IX Item "-ignore_keyusage"
703 Ignore key usage restrictions in CMP signer certificates when validating
704 signature-based protection of incoming CMP messages.
705 By default, \f(CW\*(C`digitalSignature\*(C'\fR must be allowed by CMP signer certificates.
706 This option applies to both CMP clients and the mock server.
707 .IP \fB\-unprotected_errors\fR 4
708 .IX Item "-unprotected_errors"
709 Accept missing or invalid protection of negative responses from the server.
710 This applies to the following message types and contents:
711 .RS 4
712 .IP \(bu 4
713 error messages
714 .IP \(bu 4
715 negative certificate responses (IP/CP/KUP)
716 .IP \(bu 4
717 negative revocation responses (RP)
718 .IP \(bu 4
719 negative PKIConf messages
720 .RE
721 .RS 4
722 .Sp
723 \&\fBWARNING:\fR This setting leads to unspecified behavior and it is meant
724 exclusively to allow interoperability with server implementations violating
725 RFC 9810, e.g.:
726 .IP \(bu 4
727 section 5.1.3.1 allows exceptions from protecting only for special
728 cases:
729 "There MAY be cases in which the PKIProtection BIT STRING is deliberately not
730 used to protect a message [...] because other protection, external to PKIX, will
731 be applied instead."
732 .IP \(bu 4
733 section 5.3.21 is clear on ErrMsgContent: "The CA MUST always sign it
734 with a signature key."
735 .IP \(bu 4
736 appendix D.4 shows PKIConf message having protection
737 .RE
738 .RS 4
739 .RE
740 .IP \fB\-no_cache_extracerts\fR 4
741 .IX Item "-no_cache_extracerts"
742 Do not cache certificates in the extraCerts field of CMP messages received.
743 By default, they are kept as they may be helpful for validating further messages.
744 This option applies to both CMP clients and the mock server.
745 .Sp
746 In any case, after successfully validating an incoming message, its protection
747 certificate (if any) is cached for reuse with validation of subsequent messages.
748 This is done not only for efficiency but also
749 to eliminate the need for the sender to include its certificate and related chain
750 in the extraCerts field of subsequent messages of the same transaction.
751 .IP "\fB\-srvcertout\fR \fIfilename\fR" 4
752 .IX Item "-srvcertout filename"
753 The file where to save the successfully validated certificate, if any,
754 that the CMP server used for signature-based response message protection.
755 If there is no such certificate, typically because the protection was MAC-based,
756 this is indicated by deleting the file (if it existed).
757 .IP "\fB\-extracertsout\fR \fIfilename\fR" 4
758 .IX Item "-extracertsout filename"
759 The file where to save the list of certificates contained in the extraCerts
760 field of the last received response message that is not a pollRep nor PKIConf.
761 .IP "\fB\-cacertsout\fR \fIfilename\fR" 4
762 .IX Item "-cacertsout filename"
763 The file where to save the list of CA certificates contained in the caPubs field
764 if a positive certificate response (i.e., IP, CP, or KUP) message was received
765 or contained in a general response (genp) message with infoType \f(CW\*(C`caCerts\*(C'\fR.
766 .IP "\fB\-oldwithold\fR \fIfilename\fR" 4
767 .IX Item "-oldwithold filename"
768 The root CA certificate to include in a genm request of infoType \f(CW\*(C`rootCaCert\*(C'\fR.
769 If present and the optional oldWithNew certificate is received,
770 it is verified using the newWithNew certificate as the (only) trust anchor.
771 .IP "\fB\-newwithnew\fR \fIfilename\fR" 4
772 .IX Item "-newwithnew filename"
773 This option must be provided when \fB\-infotype\fR \fIrootCaCert\fR is given.
774 It specifies the file to save the newWithNew certificate
775 received in a genp message of type \f(CW\*(C`rootCaKeyUpdate\*(C'\fR.
776 If on success no such cert was received, this file (if present) is deleted
777 to indicate that the requested root CA certificate update is not available.
778 .Sp
779 Any received newWithNew certificate is verified
780 using any received newWithOld certificate as untrusted intermediate certificate
781 and the certificate provided with \fB\-oldwithold\fR as the (only) trust anchor,
782 or if not provided, using the certificates given with the \fB\-trusted\fR option.
783 .Sp
784 \&\fBWARNING:\fR
785 The newWithNew certificate is meant to be a certificate that will be trusted.
786 The trust placed in it cannot be stronger than the trust placed in
787 the \fB\-oldwithold\fR certificate if present, otherwise it cannot be stronger than
788 the weakest trust placed in any of the \fB\-trusted\fR certificates.
789 .IP "\fB\-newwithold\fR \fIfilename\fR" 4
790 .IX Item "-newwithold filename"
791 The file to save any newWithOld certificate
792 received in a genp message of infoType \f(CW\*(C`rootCaKeyUpdate\*(C'\fR.
793 If on success no such cert was received, this is indicated by deleting the file.
794 .IP "\fB\-oldwithnew\fR \fIfilename\fR" 4
795 .IX Item "-oldwithnew filename"
796 The file to save any oldWithNew certificate
797 received in a genp message of infoType \f(CW\*(C`rootCaKeyUpdate\*(C'\fR.
798 If on success no such cert was received, this is indicated by deleting the file.
799 .IP "\fB\-crlcert\fR \fIfilename\fR" 4
800 .IX Item "-crlcert filename"
801 Certificate to derive CRL issuer data for the source field
802 when obtaining a CRL in a genm request with infoType \f(CW\*(C`crlStatusList\*(C'\fR.
803 Any available distribution point name is preferred over issuer names.
804 .IP "\fB\-oldcrl\fR \fIfilename\fR" 4
805 .IX Item "-oldcrl filename"
806 The CRL to obtain an update for in a genm request with infoType \f(CW\*(C`crlStatusList\*(C'\fR.
807 Unless the \fB\-crlcert\fR option is provided as well,
808 the given CRL is used for deriving CRL issuer data for the source field.
809 Any available distribution point name is preferred over issuer names.
810 If the CRL contains a thisUpdate field, its value is copied to the request.
811 .IP "\fB\-crlout\fR \fIfilename\fR" 4
812 .IX Item "-crlout filename"
813 The file to save any CRL received in a genp message of infoType \f(CW\*(C`crls\*(C'\fR.
814 If on success no such CRL was received, this is indicated by deleting the file.
815 .SS "Client authentication options"
816 .IX Subsection "Client authentication options"
817 .IP "\fB\-ref\fR \fIvalue\fR" 4
818 .IX Item "-ref value"
819 Reference number/string/value to use as fallback senderKID; this is required
820 if no sender name can be determined from the \fB\-cert\fR or <\-subject> options and
821 is typically used when authenticating with pre-shared key (password-based MAC).
822 .IP "\fB\-secret\fR \fIarg\fR" 4
823 .IX Item "-secret arg"
824 Provides the source of a secret value to use with MAC-based message protection.
825 This takes precedence over the \fB\-cert\fR and \fB\-key\fR options.
826 The secret is used for creating MAC-based protection of outgoing messages
827 and for validating incoming messages that have MAC-based protection.
828 The algorithm used by default is Password-Based Message Authentication Code (PBM)
829 as defined in RFC 9810 section 5.1.3.1.
830 .Sp
831 For more information about the format of \fIarg\fR see
832 \&\fBopenssl\-passphrase\-options\fR\|(1).
833 .IP "\fB\-cert\fR \fIfilename\fR|\fIuri\fR" 4
834 .IX Item "-cert filename|uri"
835 The client's current CMP signer certificate.
836 Requires the corresponding key to be given with \fB\-key\fR.
837 .Sp
838 The subject and the public key contained in this certificate
839 serve as fallback values in the certificate template of IR/CR/KUR messages.
840 .Sp
841 The subject of this certificate will be used as sender of outgoing CMP messages,
842 while the subject of \fB\-oldcert\fR or \fB\-subjectName\fR may provide fallback values.
843 .Sp
844 The issuer of this certificate is used as one of the recipient fallback values
845 and as fallback issuer entry in the certificate template of IR/CR/KUR messages.
846 .Sp
847 When performing signature-based message protection,
848 this "protection certificate", also called "signer certificate",
849 will be included first in the extraCerts field of outgoing messages
850 and the signature is done with the corresponding key.
851 In Initialization Request (IR) messages this can be used for authenticating
852 using an external entity certificate as defined in appendix D.7 of RFC 9810.
853 .Sp
854 For Key Update Request (KUR) messages this is also used as
855 the certificate to be updated if the \fB\-oldcert\fR option is not given.
856 .Sp
857 If the file includes further certs, they are appended to the untrusted certs
858 because they typically constitute the chain of the client certificate, which
859 is included in the extraCerts field in signature-protected request messages.
860 .IP "\fB\-own_trusted\fR \fIfilenames\fR|\fIuris\fR" 4
861 .IX Item "-own_trusted filenames|uris"
862 If this list of certificates is provided then the chain built for
863 the client-side CMP signer certificate given with the \fB\-cert\fR option
864 is verified using the given certificates as trust anchors.
865 .Sp
866 Multiple sources may be given, separated by commas and/or whitespace
867 (where in the latter case the whole argument must be enclosed in "...").
868 Each source may contain multiple certificates.
869 .Sp
870 The certificate verification options
871 \&\fB\-verify_hostname\fR, \fB\-verify_ip\fR, and \fB\-verify_email\fR
872 have no effect on the certificate verification enabled via this option.
873 .IP "\fB\-key\fR \fIfilename\fR|\fIuri\fR" 4
874 .IX Item "-key filename|uri"
875 The corresponding private key file for the client's current certificate given in
876 the \fB\-cert\fR option.
877 This will be used for signature-based message protection unless the \fB\-secret\fR
878 option indicating MAC-based protection or \fB\-unprotected_requests\fR is given.
879 .Sp
880 It is also used as a fallback for the \fB\-newkey\fR option with IR/CR/KUR messages.
881 .IP "\fB\-keypass\fR \fIarg\fR" 4
882 .IX Item "-keypass arg"
883 Pass phrase source for the private key given with the \fB\-key\fR option.
884 Also used for \fB\-cert\fR and \fB\-oldcert\fR in case it is an encrypted PKCS#12 file.
885 If not given here, the password will be prompted for if needed.
886 .Sp
887 For more information about the format of \fIarg\fR see
888 \&\fBopenssl\-passphrase\-options\fR\|(1).
889 .IP "\fB\-digest\fR \fIname\fR" 4
890 .IX Item "-digest name"
891 Specifies name of supported digest to use in RFC 9810's MSG_SIG_ALG
892 and as the one-way function (OWF) in \f(CW\*(C`MSG_MAC_ALG\*(C'\fR.
893 If applicable, this is used for message protection and
894 proof-of-possession (POPO) signatures.
895 To see the list of supported digests, use \f(CW\*(C`openssl list \-digest\-commands\*(C'\fR.
896 Defaults to \f(CW\*(C`sha256\*(C'\fR.
897 .IP "\fB\-mac\fR \fIname\fR" 4
898 .IX Item "-mac name"
899 Specifies the name of the MAC algorithm in \f(CW\*(C`MSG_MAC_ALG\*(C'\fR.
900 To get the names of supported MAC algorithms use \f(CW\*(C`openssl list \-mac\-algorithms\*(C'\fR
901 and possibly combine such a name with the name of a supported digest algorithm,
902 e.g., hmacWithSHA256.
903 Defaults to \f(CW\*(C`hmac\-sha1\*(C'\fR, for backward compatibility with RFC 4210.
904 .IP "\fB\-extracerts\fR \fIfilenames\fR|\fIuris\fR" 4
905 .IX Item "-extracerts filenames|uris"
906 Certificates to append in the extraCerts field when sending messages.
907 They can be used as the default CMP signer certificate chain to include.
908 .Sp
909 Multiple sources may be given, separated by commas and/or whitespace
910 (where in the latter case the whole argument must be enclosed in "...").
911 Each source may contain multiple certificates.
912 .IP \fB\-unprotected_requests\fR 4
913 .IX Item "-unprotected_requests"
914 Send request messages without CMP-level protection.
915 .SS "Credentials format options"
916 .IX Subsection "Credentials format options"
917 .IP "\fB\-certform\fR \fIPEM|DER\fR" 4
918 .IX Item "-certform PEM|DER"
919 File format to use when saving a certificate to a file.
920 Default value is PEM.
921 .IP "\fB\-crlform\fR \fIPEM|DER\fR" 4
922 .IX Item "-crlform PEM|DER"
923 File format to use when saving a CRL to a file.
924 Default value is DER.
925 DER format is preferred because it enables more efficient storage
926 of large CRLs.
927 .IP "\fB\-keyform\fR \fIPEM|DER|P12|ENGINE\fR" 4
928 .IX Item "-keyform PEM|DER|P12|ENGINE"
929 The format of the key input; unspecified by default.
930 See "Format Options" in \fBopenssl\fR\|(1) for details.
931 .IP "\fB\-otherpass\fR \fIarg\fR" 4
932 .IX Item "-otherpass arg"
933 Pass phrase source for certificate given with the \fB\-trusted\fR, \fB\-untrusted\fR,
934 \&\fB\-own_trusted\fR, \fB\-srvcert\fR, \fB\-crlcert\fR, \fB\-out_trusted\fR, \fB\-extracerts\fR,
935 \&\fB\-srv_trusted\fR, \fB\-srv_untrusted\fR, \fB\-ref_cert\fR,
936 \&\fB\-rsp_extracerts\fR, \fB\-rsp_capubs\fR,
937 \&\fB\-rsp_newwithnew\fR, \fB\-rsp_newwithold\fR, \fB\-rsp_oldwithnew\fR,
938 \&\fB\-tls_extra\fR, and \fB\-tls_trusted\fR options.
939 If not given here, the password will be prompted for if needed.
940 .Sp
941 For more information about the format of \fIarg\fR see
942 \&\fBopenssl\-passphrase\-options\fR\|(1).
943 .IP "\fB\-engine\fR \fIid\fR" 4
944 .IX Item "-engine id"
945 See "Engine Options" in \fBopenssl\fR\|(1).
946 This option is deprecated.
947 .Sp
948 As an alternative to using this combination:
949 .Sp
950 .Vb 1
951 \& \-engine {engineid} \-key {keyid} \-keyform ENGINE
952 .Ve
953 .Sp
954 \&... it's also possible to just give the key ID in URI form to \fB\-key\fR,
955 like this:
956 .Sp
957 .Vb 1
958 \& \-key org.openssl.engine:{engineid}:{keyid}
959 .Ve
960 .Sp
961 This applies to all options specifying keys: \fB\-key\fR, \fB\-newkey\fR, and
962 \&\fB\-tls_key\fR.
963 .SS "Provider options"
964 .IX Subsection "Provider options"
965 .IP "\fB\-provider\fR \fIname\fR" 4
966 .IX Item "-provider name"
967 .PD 0
968 .IP "\fB\-provider\-path\fR \fIpath\fR" 4
969 .IX Item "-provider-path path"
970 .IP "\fB\-provparam\fR \fI[name:]key=value\fR" 4
971 .IX Item "-provparam [name:]key=value"
972 .IP "\fB\-propquery\fR \fIpropq\fR" 4
973 .IX Item "-propquery propq"
974 .PD
975 See "Provider Options" in \fBopenssl\fR\|(1), \fBprovider\fR\|(7), and \fBproperty\fR\|(7).
976 .SS "Random state options"
977 .IX Subsection "Random state options"
978 .IP "\fB\-rand\fR \fIfiles\fR, \fB\-writerand\fR \fIfile\fR" 4
979 .IX Item "-rand files, -writerand file"
980 See "Random State Options" in \fBopenssl\fR\|(1) for details.
981 .SS "TLS connection options"
982 .IX Subsection "TLS connection options"
983 .IP \fB\-tls_used\fR 4
984 .IX Item "-tls_used"
985 Make the CMP client use TLS (regardless if other TLS-related options are set)
986 for message exchange with the server via HTTP.
987 This option is not supported with the \fI\-port\fR option.
988 It is implied if the \fB\-server\fR option is given with the scheme \f(CW\*(C`https\*(C'\fR.
989 It is ignored if the \fB\-server\fR option is not given or \fB\-use_mock_srv\fR is given
990 or \fB\-rspin\fR is given with enough filename arguments.
991 .Sp
992 The following TLS-related options are ignored if TLS is not used.
993 .IP "\fB\-tls_cert\fR \fIfilename\fR|\fIuri\fR" 4
994 .IX Item "-tls_cert filename|uri"
995 Client's TLS certificate to use for authenticating to the TLS server.
996 If the source includes further certs they are used (along with \fB\-untrusted\fR
997 certs) for constructing the client cert chain provided to the TLS server.
998 .IP "\fB\-tls_key\fR \fIfilename\fR|\fIuri\fR" 4
999 .IX Item "-tls_key filename|uri"
1000 Private key for the client's TLS certificate.
1001 .IP "\fB\-tls_keypass\fR \fIarg\fR" 4
1002 .IX Item "-tls_keypass arg"
1003 Pass phrase source for client's private TLS key \fB\-tls_key\fR.
1004 Also used for \fB\-tls_cert\fR in case it is an encrypted PKCS#12 file.
1005 If not given here, the password will be prompted for if needed.
1006 .Sp
1007 For more information about the format of \fIarg\fR see
1008 \&\fBopenssl\-passphrase\-options\fR\|(1).
1009 .IP "\fB\-tls_extra\fR \fIfilenames\fR|\fIuris\fR" 4
1010 .IX Item "-tls_extra filenames|uris"
1011 Extra certificates to provide to the TLS server during handshake.
1012 .IP "\fB\-tls_trusted\fR \fIfilenames\fR|\fIuris\fR" 4
1013 .IX Item "-tls_trusted filenames|uris"
1014 Trusted certificate(s) to use for validating the TLS server certificate.
1015 This implies hostname validation.
1016 .Sp
1017 Multiple sources may be given, separated by commas and/or whitespace
1018 (where in the latter case the whole argument must be enclosed in "...").
1019 Each source may contain multiple certificates.
1020 .Sp
1021 The certificate verification options
1022 \&\fB\-verify_hostname\fR, \fB\-verify_ip\fR, and \fB\-verify_email\fR
1023 have no effect on the certificate verification enabled via this option.
1024 .IP "\fB\-tls_host\fR \fIname\fR" 4
1025 .IX Item "-tls_host name"
1026 Address to be checked during hostname validation.
1027 This may be a DNS name or an IP address.
1028 If not given it defaults to the \fB\-server\fR address.
1029 .SS "Client-side options for debugging and offline scenarios"
1030 .IX Subsection "Client-side options for debugging and offline scenarios"
1031 .IP \fB\-batch\fR 4
1032 .IX Item "-batch"
1033 Do not interactively prompt for input, for instance when a password is needed.
1034 This can be useful for batch processing and testing.
1035 .IP "\fB\-repeat\fR \fInumber\fR" 4
1036 .IX Item "-repeat number"
1037 Invoke the command the given positive number of times with the same parameters.
1038 Default is one invocation.
1039 .IP "\fB\-reqin\fR \fIfilenames\fR" 4
1040 .IX Item "-reqin filenames"
1041 Take the sequence of CMP requests to send to the server from the given file(s)
1042 rather than from the sequence of requests produced internally.
1043 .Sp
1044 This option is useful for supporting offline scenarios where the certificate
1045 request (or any other CMP request) is produced beforehand and sent out later.
1046 .Sp
1047 This option is ignored if the \fB\-rspin\fR option is given
1048 because in the latter case no requests are actually sent.
1049 .Sp
1050 Note that in any case the client produces internally its sequence
1051 of CMP request messages. Thus, all options required for doing this
1052 (such as \fB\-cmd\fR and all options providing the required parameters)
1053 need to be given also when the \fB\-reqin\fR option is present.
1054 .Sp
1055 If the \fB\-reqin\fR option is given for a certificate request
1056 and no \fB\-newkey\fR, \fB\-key\fR, \fB\-oldcert\fR, or \fB\-csr\fR option is given,
1057 a fallback public key is taken from the request message file
1058 (if it is included in the certificate template).
1059 .Sp
1060 Hint: In case the \fB\-reqin\fR option is given for a certificate request, there are
1061 situations where the client has access to the public key to be certified but
1062 not to the private key that by default will be needed for proof of possession.
1063 In this case the POPO is not actually needed (because the internally produced
1064 certificate request message will not be sent), and its generation
1065 can be disabled using the options \fB\-popo\fR \fI\-1\fR or \fB\-popo\fR \fI0\fR.
1066 .Sp
1067 Multiple filenames may be given, separated by commas and/or whitespace
1068 (where in the latter case the whole argument must be enclosed in "...").
1069 .Sp
1070 The files are read as far as needed to complete the transaction
1071 and filenames have been provided. If more requests are needed,
1072 the remaining ones are taken from the items at the respective position
1073 in the sequence of requests produced internally.
1074 .Sp
1075 The client needs to update the recipNonce field in the given requests (except
1076 for the first one) in order to satisfy the checks to be performed by the server.
1077 This causes re-protection (if protecting requests is required).
1078 .IP \fB\-reqin_new_tid\fR 4
1079 .IX Item "-reqin_new_tid"
1080 Use a fresh transactionID for CMP request messages read using \fB\-reqin\fR,
1081 which causes their reprotection (if protecting requests is required).
1082 This may be needed in case the sequence of requests is reused
1083 and the CMP server complains that the transaction ID has already been used.
1084 .IP "\fB\-reqout\fR \fIfilenames\fR" 4
1085 .IX Item "-reqout filenames"
1086 Save the sequence of CMP requests created by the client to the given file(s).
1087 These requests are not sent to the server if the \fB\-reqin\fR option is used, too.
1088 .Sp
1089 Multiple filenames may be given, separated by commas and/or whitespace.
1090 .Sp
1091 Files are written as far as needed to save the transaction
1092 and filenames have been provided.
1093 If the transaction contains more requests, the remaining ones are not saved.
1094 .IP "\fB\-reqout_only\fR \fIfilename\fR" 4
1095 .IX Item "-reqout_only filename"
1096 Save the first CMP requests created by the client to the given file and exit.
1097 Any options related to CMP servers and their responses are ignored.
1098 This option does not combine with the \fB\-port\fR option.
1099 .Sp
1100 This option is useful for supporting offline scenarios where the certificate
1101 request (or any other CMP request) is produced beforehand and sent out later.
1102 .IP "\fB\-rspin\fR \fIfilenames\fR" 4
1103 .IX Item "-rspin filenames"
1104 Process the sequence of CMP responses provided in the given file(s),
1105 not contacting any given server,
1106 as long as enough filenames are provided to complete the transaction.
1107 .Sp
1108 Multiple filenames may be given, separated by commas and/or whitespace.
1109 .Sp
1110 Any server specified via the \fI\-server\fR or \fI\-use_mock_srv\fR options is contacted
1111 only if more responses are needed to complete the transaction.
1112 In this case the transaction will fail
1113 unless the server has been prepared to continue the already started transaction.
1114 .IP "\fB\-rspout\fR \fIfilenames\fR" 4
1115 .IX Item "-rspout filenames"
1116 Save the sequence of actually used CMP responses to the given file(s).
1117 These have been received from the server unless \fB\-rspin\fR takes effect.
1118 .Sp
1119 Multiple filenames may be given, separated by commas and/or whitespace.
1120 .Sp
1121 Files are written as far as needed to save the responses
1122 contained in the transaction and filenames have been provided.
1123 If the transaction contains more responses, the remaining ones are not saved.
1124 .IP \fB\-use_mock_srv\fR 4
1125 .IX Item "-use_mock_srv"
1126 Test the client using the internal CMP server mock-up at API level,
1127 bypassing socket-based transfer via HTTP.
1128 This excludes the \fB\-server\fR and \fB\-port\fR options.
1129 .SS "Mock server options"
1130 .IX Subsection "Mock server options"
1131 .IP "\fB\-port\fR \fInumber\fR" 4
1132 .IX Item "-port number"
1133 Act as HTTP-based CMP server mock-up listening on the given local port.
1134 The client may address the server via, e.g., \f(CW127.0.0.1\fR or \f(CW\*(C`[::1]\*(C'\fR.
1135 This option excludes the \fB\-server\fR and \fB\-use_mock_srv\fR options.
1136 The \fB\-rspin\fR, \fB\-rspout\fR, \fB\-reqin\fR, and \fB\-reqout\fR options
1137 so far are not supported in this mode.
1138 .IP "\fB\-max_msgs\fR \fInumber\fR" 4
1139 .IX Item "-max_msgs number"
1140 Maximum number of CMP (request) messages the CMP HTTP server mock-up
1141 should handle, which must be nonnegative.
1142 The default value is 0, which means that no limit is imposed.
1143 In any case the server terminates on internal errors, but not when it
1144 detects a CMP-level error that it can successfully answer with an error message.
1145 .IP "\fB\-srv_ref\fR \fIvalue\fR" 4
1146 .IX Item "-srv_ref value"
1147 Reference value to use as senderKID of server in case no \fB\-srv_cert\fR is given.
1148 .IP "\fB\-srv_secret\fR \fIarg\fR" 4
1149 .IX Item "-srv_secret arg"
1150 Password source for server authentication with a pre-shared key (secret).
1151 .IP "\fB\-srv_cert\fR \fIfilename\fR|\fIuri\fR" 4
1152 .IX Item "-srv_cert filename|uri"
1153 Certificate of the server.
1154 .IP "\fB\-srv_key\fR \fIfilename\fR|\fIuri\fR" 4
1155 .IX Item "-srv_key filename|uri"
1156 Private key used by the server for signing messages.
1157 .IP "\fB\-srv_keypass\fR \fIarg\fR" 4
1158 .IX Item "-srv_keypass arg"
1159 Server private key (and cert) file pass phrase source.
1160 .IP "\fB\-srv_trusted\fR \fIfilenames\fR|\fIuris\fR" 4
1161 .IX Item "-srv_trusted filenames|uris"
1162 Trusted certificates for client authentication.
1163 .Sp
1164 The certificate verification options
1165 \&\fB\-verify_hostname\fR, \fB\-verify_ip\fR, and \fB\-verify_email\fR
1166 have no effect on the certificate verification enabled via this option.
1167 .IP "\fB\-srv_untrusted\fR \fIfilenames\fR|\fIuris\fR" 4
1168 .IX Item "-srv_untrusted filenames|uris"
1169 Intermediate CA certs that may be useful when validating client certificates.
1170 .IP "\fB\-ref_cert\fR \fIfilename\fR|\fIuri\fR" 4
1171 .IX Item "-ref_cert filename|uri"
1172 Certificate to be expected for RR messages and any oldCertID in KUR messages.
1173 .IP "\fB\-rsp_cert\fR \fIfilename\fR|\fIuri\fR" 4
1174 .IX Item "-rsp_cert filename|uri"
1175 Certificate to be returned as mock enrollment result.
1176 .IP "\fB\-rsp_key\fR \fIfilename\fR|\fIuri\fR" 4
1177 .IX Item "-rsp_key filename|uri"
1178 Private key to be returned as central key generation result.
1179 .IP "\fB\-rsp_keypass\fR \fIarg\fR" 4
1180 .IX Item "-rsp_keypass arg"
1181 Pass phrase source for \fBrsp_cert\fR and \fBrsp_key\fR.
1182 .IP "\fB\-rsp_crl\fR \fIfilename\fR|\fIuri\fR" 4
1183 .IX Item "-rsp_crl filename|uri"
1184 CRL to be returned in genp of type \f(CW\*(C`crls\*(C'\fR.
1185 .IP "\fB\-rsp_extracerts\fR \fIfilenames\fR|\fIuris\fR" 4
1186 .IX Item "-rsp_extracerts filenames|uris"
1187 Extra certificates to be included in mock certification responses.
1188 .IP "\fB\-rsp_capubs\fR \fIfilenames\fR|\fIuris\fR" 4
1189 .IX Item "-rsp_capubs filenames|uris"
1190 CA certificates to be included in mock Initialization Response (IP) message.
1191 .IP "\fB\-rsp_newwithnew\fR \fIfilename\fR|\fIuri\fR" 4
1192 .IX Item "-rsp_newwithnew filename|uri"
1193 Certificate to be returned in newWithNew field of genp of type rootCaKeyUpdate.
1194 .IP "\fB\-rsp_newwithold\fR \fIfilename\fR|\fIuri\fR" 4
1195 .IX Item "-rsp_newwithold filename|uri"
1196 Certificate to be returned in newWithOld field of genp of type rootCaKeyUpdate.
1197 .IP "\fB\-rsp_oldwithnew\fR \fIfilename\fR|\fIuri\fR" 4
1198 .IX Item "-rsp_oldwithnew filename|uri"
1199 Certificate to be returned in oldWithNew field of genp of type rootCaKeyUpdate.
1200 .IP "\fB\-poll_count\fR \fInumber\fR" 4
1201 .IX Item "-poll_count number"
1202 Number of times the client must poll before receiving a certificate.
1203 .IP "\fB\-check_after\fR \fInumber\fR" 4
1204 .IX Item "-check_after number"
1205 The checkAfter value (number of seconds to wait) to include in poll response.
1206 .IP \fB\-grant_implicitconf\fR 4
1207 .IX Item "-grant_implicitconf"
1208 Grant implicit confirmation of newly enrolled certificate.
1209 .IP "\fB\-pkistatus\fR \fInumber\fR" 4
1210 .IX Item "-pkistatus number"
1211 PKIStatus to be included in server response.
1212 Valid range is 0 (accepted) .. 6 (keyUpdateWarning).
1213 .IP "\fB\-failure\fR \fInumber\fR" 4
1214 .IX Item "-failure number"
1215 A single failure info bit number to be included in server response.
1216 Valid range is 0 (badAlg) .. 26 (duplicateCertReq).
1217 .IP "\fB\-failurebits\fR \fInumber\fR Number representing failure bits to be included in server response. Valid range is 0 .. 2^27 \- 1." 4
1218 .IX Item "-failurebits number Number representing failure bits to be included in server response. Valid range is 0 .. 2^27 - 1."
1219 .PD 0
1220 .IP "\fB\-statusstring\fR \fIarg\fR" 4
1221 .IX Item "-statusstring arg"
1222 .PD
1223 Text to be included as status string in server response.
1224 .IP \fB\-send_error\fR 4
1225 .IX Item "-send_error"
1226 Force server to reply with error message.
1227 .IP \fB\-send_unprotected\fR 4
1228 .IX Item "-send_unprotected"
1229 Send response messages without CMP-level protection.
1230 .IP \fB\-send_unprot_err\fR 4
1231 .IX Item "-send_unprot_err"
1232 In case of negative responses, server shall send unprotected error messages,
1233 certificate responses (IP/CP/KUP), and revocation responses (RP).
1234 WARNING: This setting leads to behavior violating RFC 9810.
1235 .IP \fB\-accept_unprotected\fR 4
1236 .IX Item "-accept_unprotected"
1237 Accept missing or invalid protection of requests.
1238 .IP \fB\-accept_unprot_err\fR 4
1239 .IX Item "-accept_unprot_err"
1240 Accept unprotected error messages from client.
1241 So far this has no effect because the server does not accept any error messages.
1242 .IP \fB\-accept_raverified\fR 4
1243 .IX Item "-accept_raverified"
1244 Accept RAVERIFIED as proof of possession (POPO).
1245 .SS "Certificate verification options, for both CMP and TLS"
1246 .IX Subsection "Certificate verification options, for both CMP and TLS"
1247 .IP "\fB\-allow_proxy_certs\fR, \fB\-attime\fR, \fB\-no_check_time\fR, \fB\-check_ss_sig\fR, \fB\-crl_check\fR, \fB\-crl_check_all\fR, \fB\-explicit_policy\fR, \fB\-extended_crl\fR, \fB\-ignore_critical\fR, \fB\-inhibit_any\fR, \fB\-inhibit_map\fR, \fB\-no_alt_chains\fR, \fB\-partial_chain\fR, \fB\-policy\fR, \fB\-policy_check\fR, \fB\-policy_print\fR, \fB\-purpose\fR, \fB\-suiteB_128\fR, \fB\-suiteB_128_only\fR, \fB\-suiteB_192\fR, \fB\-trusted_first\fR, \fB\-use_deltas\fR, \fB\-auth_level\fR, \fB\-verify_depth\fR, \fB\-verify_email\fR, \fB\-verify_hostname\fR, \fB\-verify_ip\fR, \fB\-verify_name\fR, \fB\-x509_strict\fR \fB\-issuer_checks\fR" 4
1248 .IX Item "-allow_proxy_certs, -attime, -no_check_time, -check_ss_sig, -crl_check, -crl_check_all, -explicit_policy, -extended_crl, -ignore_critical, -inhibit_any, -inhibit_map, -no_alt_chains, -partial_chain, -policy, -policy_check, -policy_print, -purpose, -suiteB_128, -suiteB_128_only, -suiteB_192, -trusted_first, -use_deltas, -auth_level, -verify_depth, -verify_email, -verify_hostname, -verify_ip, -verify_name, -x509_strict -issuer_checks"
1249 Set various options of certificate chain verification.
1250 See "Verification Options" in \fBopenssl\-verification\-options\fR\|(1) for details.
1251 .Sp
1252 The certificate verification options
1253 \&\fB\-verify_hostname\fR, \fB\-verify_ip\fR, and \fB\-verify_email\fR
1254 only affect the certificate verification enabled via the \fB\-out_trusted\fR option.
1255 .SH NOTES
1256 .IX Header "NOTES"
1257 When a client obtains, from a CMP server, CA certificates that it is going to
1258 trust, for instance via the \f(CW\*(C`caPubs\*(C'\fR field of a certificate response
1259 or using general messages with infoType \f(CW\*(C`caCerts\*(C'\fR or \f(CW\*(C`rootCaCert\*(C'\fR,
1260 authentication of the CMP server is particularly critical.
1261 So special care must be taken setting up server authentication
1262 using \fB\-trusted\fR and related options for certificate-based authentication
1263 or \fB\-secret\fR for MAC-based protection.
1264 If authentication is certificate-based, the \fB\-srvcertout\fR option
1265 should be used to obtain the validated server certificate
1266 and perform an authorization check based on it.
1267 .PP
1268 When setting up CMP configurations and experimenting with enrollment options
1269 typically various errors occur until the configuration is correct and complete.
1270 When the CMP server reports an error the client will by default
1271 check the protection of the CMP response message.
1272 Yet some CMP services tend not to protect negative responses.
1273 In this case the client will reject them, and thus their contents are not shown
1274 although they usually contain hints that would be helpful for diagnostics.
1275 For assisting in such cases the CMP client offers a workaround via the
1276 \&\fB\-unprotected_errors\fR option, which allows accepting such negative messages.
1277 .PP
1278 If OpenSSL was built with trace support enabled (e.g., \f(CW\*(C`./config enable\-trace\*(C'\fR)
1279 and the environment variable \fBOPENSSL_TRACE\fR includes \fBHTTP\fR,
1280 the requests and the response headers transferred via HTTP are printed.
1281 .SH EXAMPLES
1282 .IX Header "EXAMPLES"
1283 .SS "Simple examples using the default OpenSSL configuration file"
1284 .IX Subsection "Simple examples using the default OpenSSL configuration file"
1285 This CMP client implementation comes with demonstrative CMP sections
1286 in the example configuration file \fIopenssl/apps/openssl.cnf\fR,
1287 which can be used to interact conveniently with the Insta Demo CA.
1288 .PP
1289 In order to enroll an initial certificate from that CA it is sufficient
1290 to issue the following shell commands.
1291 .PP
1292 .Vb 1
1293 \& export OPENSSL_CONF=/path/to/openssl/apps/openssl.cnf
1294 .Ve
1295 .PP
1296 .Vb 2
1297 \& openssl genrsa \-out insta.priv.pem
1298 \& openssl cmp \-section insta
1299 .Ve
1300 .PP
1301 This should produce the file \fIinsta.cert.pem\fR containing a new certificate
1302 for the private key held in \fIinsta.priv.pem\fR.
1303 It can be viewed using, e.g.,
1304 .PP
1305 .Vb 1
1306 \& openssl x509 \-noout \-text \-in insta.cert.pem
1307 .Ve
1308 .PP
1309 In case the network setup requires using an HTTP proxy it may be given as usual
1310 via the environment variable \fBhttp_proxy\fR or via the \fB\-proxy\fR option in the
1311 configuration file or the CMP command-line argument \fB\-proxy\fR, for example
1312 .PP
1313 .Vb 1
1314 \& \-proxy http://192.168.1.1:8080
1315 .Ve
1316 .PP
1317 In the Insta Demo CA scenario both clients and the server may use the pre-shared
1318 secret \fIinsta\fR and the reference value \fI3078\fR to authenticate to each other.
1319 .PP
1320 Alternatively, CMP messages may be protected in signature-based manner,
1321 where the trust anchor in this case is \fIinsta.ca.crt\fR
1322 and the client may use any certificate already obtained from that CA,
1323 as specified in the \fB[signature]\fR section of the example configuration.
1324 This can be used in combination with the \fB[insta]\fR section simply by
1325 .PP
1326 .Vb 1
1327 \& openssl cmp \-section insta,signature
1328 .Ve
1329 .PP
1330 By default the CMP IR message type is used, yet CR works equally here.
1331 This may be specified directly at the command line:
1332 .PP
1333 .Vb 1
1334 \& openssl cmp \-section insta \-cmd cr
1335 .Ve
1336 .PP
1337 or by referencing in addition the \fB[cr]\fR section of the example configuration:
1338 .PP
1339 .Vb 1
1340 \& openssl cmp \-section insta,cr
1341 .Ve
1342 .PP
1343 In order to update the enrolled certificate one may call
1344 .PP
1345 .Vb 1
1346 \& openssl cmp \-section insta,kur,signature
1347 .Ve
1348 .PP
1349 using signature-based protection with the certificate that is to be updated.
1350 For certificate updates, MAC-based protection should generally not be used.
1351 .PP
1352 In a similar way any previously enrolled certificate may be revoked by
1353 .PP
1354 .Vb 1
1355 \& openssl cmp \-section insta,rr \-trusted insta.ca.crt
1356 .Ve
1357 .PP
1358 or
1359 .PP
1360 .Vb 1
1361 \& openssl cmp \-section insta,rr,signature
1362 .Ve
1363 .PP
1364 Many more options can be given in the configuration file
1365 and/or on the command line.
1366 For instance, the \fB\-reqexts\fR CLI option may refer to a section in the
1367 configuration file defining X.509 extensions to use in certificate requests,
1368 such as \f(CW\*(C`v3_req\*(C'\fR in \fIopenssl/apps/openssl.cnf\fR:
1369 .PP
1370 .Vb 1
1371 \& openssl cmp \-section insta,cr \-reqexts v3_req
1372 .Ve
1373 .SS "Certificate enrollment"
1374 .IX Subsection "Certificate enrollment"
1375 The following examples do not make use of a configuration file at first.
1376 They assume that a CMP server can be contacted on the local TCP port 80
1377 and accepts requests under the alias \fI/pkix/\fR.
1378 .PP
1379 For enrolling its very first certificate the client generates a client key
1380 and sends an initial request message to the local CMP server
1381 using a pre-shared secret key for mutual authentication.
1382 In this example the client does not have the CA certificate yet,
1383 so we specify the name of the CA with the \fB\-recipient\fR option
1384 and save any CA certificates that we may receive in the \f(CW\*(C`capubs.pem\*(C'\fR file.
1385 .PP
1386 In below command line usage examples the \f(CW\*(C`\e\*(C'\fR at line ends is used just
1387 for formatting; each of the command invocations should be on a single line.
1388 .PP
1389 .Vb 5
1390 \& openssl genrsa \-out cl_key.pem
1391 \& openssl cmp \-cmd ir \-server 127.0.0.1:80/pkix/ \-recipient "/CN=CMPserver" \e
1392 \& \-ref 1234 \-secret pass:1234\-5678 \e
1393 \& \-newkey cl_key.pem \-subject "/CN=MyName" \e
1394 \& \-cacertsout capubs.pem \-certout cl_cert.pem
1395 .Ve
1396 .SS "Certificate update"
1397 .IX Subsection "Certificate update"
1398 Then, when the client certificate and its related key pair needs to be updated,
1399 the client can send a key update request taking the certs in \f(CW\*(C`capubs.pem\*(C'\fR
1400 as trusted for authenticating the server and using the previous cert and key
1401 for its own authentication.
1402 Then it can start using the new cert and key.
1403 .PP
1404 .Vb 6
1405 \& openssl genrsa \-out cl_key_new.pem
1406 \& openssl cmp \-cmd kur \-server 127.0.0.1:80/pkix/ \e
1407 \& \-trusted capubs.pem \e
1408 \& \-cert cl_cert.pem \-key cl_key.pem \e
1409 \& \-newkey cl_key_new.pem \-certout cl_cert.pem
1410 \& cp cl_key_new.pem cl_key.pem
1411 .Ve
1412 .PP
1413 This command sequence can be repeated as often as needed.
1414 .SS "Requesting information from CMP server"
1415 .IX Subsection "Requesting information from CMP server"
1416 Requesting "all relevant information" with an empty General Message.
1417 This prints information about all received ITAV \fBinfoType\fRs to stdout.
1418 .PP
1419 .Vb 2
1420 \& openssl cmp \-cmd genm \-server 127.0.0.1/pkix/ \-recipient "/CN=CMPserver" \e
1421 \& \-ref 1234 \-secret pass:1234\-5678
1422 .Ve
1423 .SS "Using a custom configuration file"
1424 .IX Subsection "Using a custom configuration file"
1425 For CMP client invocations, in particular for certificate enrollment,
1426 usually many parameters need to be set, which is tedious and error-prone to do
1427 on the command line.
1428 Therefore, the client offers the possibility to read
1429 options from sections of the OpenSSL config file, usually called \fIopenssl.cnf\fR.
1430 The values found there can still be extended and even overridden by any
1431 subsequently loaded sections and on the command line.
1432 .PP
1433 After including in the configuration file the following sections:
1434 .PP
1435 .Vb 8
1436 \& [cmp]
1437 \& server = 127.0.0.1
1438 \& path = pkix/
1439 \& trusted = capubs.pem
1440 \& cert = cl_cert.pem
1441 \& key = cl_key.pem
1442 \& newkey = cl_key.pem
1443 \& certout = cl_cert.pem
1444 \&
1445 \& [init]
1446 \& recipient = "/CN=CMPserver"
1447 \& trusted =
1448 \& cert =
1449 \& key =
1450 \& ref = 1234
1451 \& secret = pass:1234\-5678\-1234\-567
1452 \& subject = "/CN=MyName"
1453 \& cacertsout = capubs.pem
1454 .Ve
1455 .PP
1456 the above enrollment transactions reduce to
1457 .PP
1458 .Vb 2
1459 \& openssl cmp \-section cmp,init
1460 \& openssl cmp \-cmd kur \-newkey cl_key_new.pem
1461 .Ve
1462 .PP
1463 and the above transaction using a general message reduces to
1464 .PP
1465 .Vb 1
1466 \& openssl cmp \-section cmp,init \-cmd genm
1467 .Ve
1468 .SH "SEE ALSO"
1469 .IX Header "SEE ALSO"
1470 \&\fBopenssl\-genrsa\fR\|(1), \fBopenssl\-ecparam\fR\|(1), \fBopenssl\-list\fR\|(1),
1471 \&\fBopenssl\-req\fR\|(1), \fBopenssl\-x509\fR\|(1), \fBx509v3_config\fR\|(5)
1472 .SH HISTORY
1473 .IX Header "HISTORY"
1474 The \fBcmp\fR application was added in OpenSSL 3.0.
1475 .PP
1476 The \fB\-engine\fR option was deprecated in OpenSSL 3.0.
1477 .PP
1478 The \fB\-oldwithold\fR, \fB\-newwithnew\fR, \fB\-newwithold\fR, \fB\-oldwithnew\fR,
1479 The \fB\-srvcertout\fR, and \fB\-serial\fR option were added in OpenSSL 3.2, as well
1480 as an extension of \fB\-cacertsout\fR to use when getting CA certificates.
1481 Since then, the \fB\-issuer\fR may be used also for certificates to be revoked.
1482 .PP
1483 The \fB\-profile\fR and \fB\-no_cache_extracerts\fR options were added in OpenSSL 3.3,
1484 as well as support for delayed delivery of all types of response messages.
1485 .PP
1486 The \fB\-template\fR, \fB\-crlcert\fR, \fB\-oldcrl\fR, \fB\-crlout\fR, \fB\-crlform\fR
1487 and \fB\-rsp_crl\fR options were added in OpenSSL 3.4.
1488 .PP
1489 \&\fB\-centralkeygen\fR, \fB\-newkeyout\fR, \fB\-rsp_key\fR and
1490 \&\fB\-rsp_keypass\fR were added in OpenSSL 3.5.
1491 .SH COPYRIGHT
1492 .IX Header "COPYRIGHT"
1493 Copyright 2007\-2026 The OpenSSL Project Authors. All Rights Reserved.
1494 .PP
1495 Licensed under the Apache License 2.0 (the "License"). You may not use
1496 this file except in compliance with the License. You can obtain a copy
1497 in the file LICENSE in the source distribution or at
1498 <https://www.openssl.org/source/license.html>.