1OPENSSL-CMP(1ossl)                  OpenSSL                 OPENSSL-CMP(1ossl)
2
3
4

NAME

6       openssl-cmp - Certificate Management Protocol (CMP, RFC 4210)
7       application
8

SYNOPSIS

10       openssl cmp [-help] [-config filename] [-section names] [-verbosity
11       level]
12
13       Generic message options:
14
15       [-cmd ir|cr|kur|p10cr|rr|genm] [-infotype name] [-geninfo OID:int:N]
16
17       Certificate enrollment options:
18
19       [-newkey filename|uri] [-newkeypass arg] [-subject name] [-issuer name]
20       [-days number] [-reqexts name] [-sans spec] [-san_nodefault] [-policies
21       name] [-policy_oids names] [-policy_oids_critical] [-popo number] [-csr
22       filename] [-out_trusted filenames|uris] [-implicit_confirm]
23       [-disable_confirm] [-certout filename] [-chainout filename]
24
25       Certificate enrollment and revocation options:
26
27       [-oldcert filename|uri] [-revreason number]
28
29       Message transfer options:
30
31       [-server [http[s]://][userinfo@]host[:port][/path][?query][#fragment]]
32       [-proxy [http[s]://][userinfo@]host[:port][/path][?query][#fragment]]
33       [-no_proxy addresses] [-recipient name] [-path remote_path]
34       [-keep_alive value] [-msg_timeout seconds] [-total_timeout seconds]
35
36       Server authentication options:
37
38       [-trusted filenames|uris] [-untrusted filenames|uris] [-srvcert
39       filename|uri] [-expect_sender name] [-ignore_keyusage]
40       [-unprotected_errors] [-extracertsout filename] [-cacertsout filename]
41
42       Client authentication and protection options:
43
44       [-ref value] [-secret arg] [-cert filename|uri] [-own_trusted
45       filenames|uris] [-key filename|uri] [-keypass arg] [-digest name] [-mac
46       name] [-extracerts filenames|uris] [-unprotected_requests]
47
48       Credentials format options:
49
50       [-certform PEM|DER] [-keyform PEM|DER|P12|ENGINE] [-otherpass arg]
51       [-engine id] [-provider name] [-provider-path path] [-propquery propq]
52
53       Random state options:
54
55       [-rand files] [-writerand file]
56
57       TLS connection options:
58
59       [-tls_used] [-tls_cert filename|uri] [-tls_key filename|uri]
60       [-tls_keypass arg] [-tls_extra filenames|uris] [-tls_trusted
61       filenames|uris] [-tls_host name]
62
63       Client-side debugging options:
64
65       [-batch] [-repeat number] [-reqin filenames] [-reqin_new_tid] [-reqout
66       filenames] [-rspin filenames] [-rspout filenames] [-use_mock_srv]
67
68       Mock server options:
69
70       [-port number] [-max_msgs number] [-srv_ref value] [-srv_secret arg]
71       [-srv_cert filename|uri] [-srv_key filename|uri] [-srv_keypass arg]
72       [-srv_trusted filenames|uris] [-srv_untrusted filenames|uris]
73       [-rsp_cert filename|uri] [-rsp_extracerts filenames|uris] [-rsp_capubs
74       filenames|uris] [-poll_count number] [-check_after number]
75       [-grant_implicitconf] [-pkistatus number] [-failure number]
76       [-failurebits number] [-statusstring arg] [-send_error]
77       [-send_unprotected] [-send_unprot_err] [-accept_unprotected]
78       [-accept_unprot_err] [-accept_raverified]
79
80       Certificate verification options, for both CMP and TLS:
81
82       [-allow_proxy_certs] [-attime timestamp] [-no_check_time]
83       [-check_ss_sig] [-crl_check] [-crl_check_all] [-explicit_policy]
84       [-extended_crl] [-ignore_critical] [-inhibit_any] [-inhibit_map]
85       [-partial_chain] [-policy arg] [-policy_check] [-policy_print]
86       [-purpose purpose] [-suiteB_128] [-suiteB_128_only] [-suiteB_192]
87       [-trusted_first] [-no_alt_chains] [-use_deltas] [-auth_level num]
88       [-verify_depth num] [-verify_email email] [-verify_hostname hostname]
89       [-verify_ip ip] [-verify_name name] [-x509_strict] [-issuer_checks]
90

DESCRIPTION

92       The cmp command is a client implementation for the Certificate
93       Management Protocol (CMP) as defined in RFC4210.  It can be used to
94       request certificates from a CA server, update their certificates,
95       request certificates to be revoked, and perform other types of CMP
96       requests.
97

OPTIONS

99       -help
100           Display a summary of all options
101
102       -config filename
103           Configuration file to use.  An empty string "" means none.  Default
104           filename is from the environment variable "OPENSSL_CONF".
105
106       -section names
107           Section(s) to use within config file defining CMP options.  An
108           empty string "" means no specific section.  Default is "cmp".
109
110           Multiple section names may be given, separated by commas and/or
111           whitespace (where in the latter case the whole argument must be
112           enclosed in "...").  Contents of sections named later may override
113           contents of sections named before.  In any case, as usual, the
114           "[default]" section and finally the unnamed section (as far as
115           present) can provide per-option fallback values.
116
117       -verbosity level
118           Level of verbosity for logging, error output, etc.  0 = EMERG, 1 =
119           ALERT, 2 = CRIT, 3 = ERR, 4 = WARN, 5 = NOTE, 6 = INFO, 7 = DEBUG,
120           8 = TRACE.  Defaults to 6 = INFO.
121
122   Generic message options
123       -cmd ir|cr|kur|p10cr|rr|genm
124           CMP command to execute.  Currently implemented commands are:
125
126           ir    - Initialization Request
127           cr    - Certificate Request
128           p10cr - PKCS#10 Certification Request (for legacy support)
129           kur   - Key Update Request
130           rr    - Revocation Request
131           genm  - General Message
132
133           ir requests initialization of an end entity into a PKI hierarchy by
134           issuing a first certificate.
135
136           cr requests issuing an additional certificate for an end entity
137           already initialized to the PKI hierarchy.
138
139           p10cr requests issuing an additional certificate similarly to cr
140           but using legacy PKCS#10 CSR format.
141
142           kur requests a (key) update for an existing certificate.
143
144           rr requests revocation of an existing certificate.
145
146           genm requests information using a General Message, where optionally
147           included InfoTypeAndValues may be used to state which info is of
148           interest.  Upon receipt of the General Response, information about
149           all received ITAV infoTypes is printed to stdout.
150
151       -infotype name
152           Set InfoType name to use for requesting specific info in genm,
153           e.g., "signKeyPairTypes".
154
155       -geninfo OID:int:N
156           generalInfo integer values to place in request PKIHeader with given
157           OID, e.g., "1.2.3.4:int:56789".
158
159   Certificate enrollment options
160       -newkey filename|uri
161           The source of the private or public key for the certificate
162           requested in Initialization Request (IR), Certification
163           Request(CR), or Key Update Request (KUR).  Defaults to the public
164           key in the PKCS#10 CSR given with the -csr option, the public key
165           of the reference certificate, or the current client key.
166
167       -newkeypass arg
168           Pass phrase source for the key given with the -newkey option.  If
169           not given here, the password will be prompted for if needed.
170
171           For more information about the format of arg see
172           openssl-passphrase-options(1).
173
174       -subject name
175           X509 Distinguished Name (DN) of subject to use in the requested
176           certificate template.  For KUR, it defaults to the public key in
177           the PKCS#10 CSR given with the -csr option, if provided, or of the
178           reference certificate (see -oldcert) if provided.  This default is
179           used for IR and CR only if no SANs are set.  If the NULL-DN ("/")
180           is given then no subject is placed in the template.
181
182           If provided and neither -cert nor -oldcert is given, the subject DN
183           is used as fallback sender of outgoing CMP messages.
184
185           The argument must be formatted as
186           /type0=value0/type1=value1/type2=....  Special characters may be
187           escaped by "\" (backslash); whitespace is retained.  Empty values
188           are permitted, but the corresponding type will not be included.
189           Giving a single "/" will lead to an empty sequence of RDNs (a NULL-
190           DN).  Multi-valued RDNs can be formed by placing a "+" character
191           instead of a "/" between the AttributeValueAssertions (AVAs) that
192           specify the members of the set.  Example:
193
194           "/DC=org/DC=OpenSSL/DC=users/UID=123456+CN=John Doe"
195
196       -issuer name
197           X509 issuer Distinguished Name (DN) of the CA server to place in
198           the requested certificate template in IR/CR/KUR.  If the NULL-DN
199           ("/") is given then no issuer is placed in the template.
200
201           If provided and neither -recipient nor -srvcert is given, the
202           issuer DN is used as fallback recipient of outgoing CMP messages.
203
204           The argument must be formatted as
205           /type0=value0/type1=value1/type2=....  For details see the
206           description of the -subject option.
207
208       -days number
209           Number of days the new certificate is requested to be valid for,
210           counting from the current time of the host.  Also triggers the
211           explicit request that the validity period starts from the current
212           time (as seen by the host).
213
214       -reqexts name
215           Name of section in OpenSSL config file defining certificate request
216           extensions.  If the -csr option is present, these extensions
217           augment the extensions contained the given PKCS#10 CSR, overriding
218           any extensions with same OIDs.
219
220       -sans spec
221           One or more IP addresses, DNS names, or URIs separated by commas or
222           whitespace (where in the latter case the whole argument must be
223           enclosed in "...")  to add as Subject Alternative Name(s) (SAN)
224           certificate request extension.  If the special element "critical"
225           is given the SANs are flagged as critical.  Cannot be used if any
226           Subject Alternative Name extension is set via -reqexts.
227
228       -san_nodefault
229           When Subject Alternative Names are not given via -sans nor defined
230           via -reqexts, they are copied by default from the reference
231           certificate (see -oldcert).  This can be disabled by giving the
232           -san_nodefault option.
233
234       -policies name
235           Name of section in OpenSSL config file defining policies to be set
236           as certificate request extension.  This option cannot be used
237           together with -policy_oids.
238
239       -policy_oids names
240           One or more OID(s), separated by commas and/or whitespace (where in
241           the latter case the whole argument must be enclosed in "...")  to
242           add as certificate policies request extension.  This option cannot
243           be used together with -policies.
244
245       -policy_oids_critical
246           Flag the policies given with -policy_oids as critical.
247
248       -popo number
249           Proof-of-Possession (POPO) method to use for IR/CR/KUR; values:
250           "-1"..<2> where "-1" = NONE, 0 = RAVERIFIED, 1 = SIGNATURE
251           (default), 2 = KEYENC.
252
253           Note that a signature-based POPO can only be produced if a private
254           key is provided via the -newkey or -key options.
255
256       -csr filename
257           PKCS#10 CSR in PEM or DER format containing a certificate request.
258           With -cmd p10cr it is used directly in a legacy P10CR message.
259           When used with -cmd ir, cr, or kur, it is transformed into the
260           respective regular CMP request.  It may also be used with -cmd rr
261           to specify the certificate to be revoked via the included subject
262           name and public key.
263
264       -out_trusted filenames|uris
265           Trusted certificate(s) to use for validating the newly enrolled
266           certificate.
267
268           Multiple sources may be given, separated by commas and/or
269           whitespace (where in the latter case the whole argument must be
270           enclosed in "...").  Each source may contain multiple certificates.
271
272           The certificate verification options -verify_hostname, -verify_ip,
273           and -verify_email only affect the certificate verification enabled
274           via this option.
275
276       -implicit_confirm
277           Request implicit confirmation of newly enrolled certificates.
278
279       -disable_confirm
280           Do not send certificate confirmation message for newly enrolled
281           certificate without requesting implicit confirmation to cope with
282           broken servers not supporting implicit confirmation correctly.
283           WARNING: This leads to behavior violating RFC 4210.
284
285       -certout filename
286           The file where the newly enrolled certificate should be saved.
287
288       -chainout filename
289           The file where the chain of the newly enrolled certificate should
290           be saved.
291
292   Certificate enrollment and revocation options
293       -oldcert filename|uri
294           The certificate to be updated (i.e., renewed or re-keyed) in Key
295           Update Request (KUR) messages or to be revoked in Revocation
296           Request (RR) messages.  For KUR the certificate to be updated
297           defaults to -cert, and the resulting certificate is called
298           reference certificate.  For RR the certificate to be revoked can
299           also be specified using -csr.
300
301           The reference certificate, if any, is also used for deriving
302           default subject DN and Subject Alternative Names and the default
303           issuer entry in the requested certificate template of an IR/CR/KUR.
304           Its subject is used as sender of outgoing messages if -cert is not
305           given.  Its issuer is used as default recipient in CMP message
306           headers if neither -recipient, -srvcert, nor -issuer is given.
307
308       -revreason number
309           Set CRLReason to be included in revocation request (RR); values:
310           0..10 or "-1" for none (which is the default).
311
312           Reason numbers defined in RFC 5280 are:
313
314              CRLReason ::= ENUMERATED {
315                   unspecified             (0),
316                   keyCompromise           (1),
317                   cACompromise            (2),
318                   affiliationChanged      (3),
319                   superseded              (4),
320                   cessationOfOperation    (5),
321                   certificateHold         (6),
322                   -- value 7 is not used
323                   removeFromCRL           (8),
324                   privilegeWithdrawn      (9),
325                   aACompromise           (10)
326               }
327
328   Message transfer options
329       -server [http[s]://][userinfo@]host[:port][/path][?query][#fragment]
330           The DNS hostname or IP address and optionally port of the CMP
331           server to connect to using HTTP(S).  This excludes -port and
332           -use_mock_srv and is ignored with -rspin.
333
334           The scheme "https" may be given only if the -tls_used option is
335           used.  In this case the default port is 443, else 80.  The optional
336           userinfo and fragment components are ignored.  Any given query
337           component is handled as part of the path component.  If a path is
338           included it provides the default value for the -path option.
339
340       -proxy [http[s]://][userinfo@]host[:port][/path][?query][#fragment]
341           The HTTP(S) proxy server to use for reaching the CMP server unless
342           -no_proxy applies, see below.  The proxy port defaults to 80 or 443
343           if the scheme is "https"; apart from that the optional "http://" or
344           "https://" prefix is ignored (note that TLS may be selected by
345           -tls_used), as well as any path, userinfo, and query, and fragment
346           components.  Defaults to the environment variable "http_proxy" if
347           set, else "HTTP_PROXY" in case no TLS is used, otherwise
348           "https_proxy" if set, else "HTTPS_PROXY".  This option is ignored
349           if -server is not given.
350
351       -no_proxy addresses
352           List of IP addresses and/or DNS names of servers not to use an
353           HTTP(S) proxy for, separated by commas and/or whitespace (where in
354           the latter case the whole argument must be enclosed in "...").
355           Default is from the environment variable "no_proxy" if set, else
356           "NO_PROXY".  This option is ignored if -server is not given.
357
358       -recipient name
359           Distinguished Name (DN) to use in the recipient field of CMP
360           request message headers, i.e., the CMP server (usually the
361           addressed CA).
362
363           The recipient field in the header of a CMP message is mandatory.
364           If not given explicitly the recipient is determined in the
365           following order: the subject of the CMP server certificate given
366           with the -srvcert option, the -issuer option, the issuer of the
367           certificate given with the -oldcert option, the issuer of the CMP
368           client certificate (-cert option), as far as any of those is
369           present, else the NULL-DN as last resort.
370
371           The argument must be formatted as
372           /type0=value0/type1=value1/type2=....  For details see the
373           description of the -subject option.
374
375       -path remote_path
376           HTTP path at the CMP server (aka CMP alias) to use for POST
377           requests.  Defaults to any path given with -server, else "/".
378
379       -keep_alive value
380           If the given value is 0 then HTTP connections are not kept open
381           after receiving a response, which is the default behavior for HTTP
382           1.0.  If the value is 1 or 2 then persistent connections are
383           requested.  If the value is 2 then persistent connections are
384           required, i.e., in case the server does not grant them an error
385           occurs.  The default value is 1, which means preferring to keep the
386           connection open.
387
388       -msg_timeout seconds
389           Number of seconds (or 0 for infinite) a CMP request-response
390           message round trip is allowed to take before a timeout error is
391           returned.  Default is to use the -total_timeout setting.
392
393       -total_timeout seconds
394           Maximum number seconds an overall enrollment transaction may take,
395           including attempts polling for certificates on "waiting" PKIStatus.
396           Default is 0 (infinite).
397
398   Server authentication options
399       -trusted filenames|uris
400           When validating signature-based protection of CMP response
401           messages, these are the CA certificate(s) to trust while checking
402           certificate chains during CMP server authentication.  This option
403           gives more flexibility than the -srvcert option because the server-
404           side CMP signer certificate is not pinned but may be any
405           certificate for which a chain to one of the given trusted
406           certificates can be constructed.
407
408           If no -trusted, -srvcert, and -secret option is given then
409           protected response messages from the server are not authenticated.
410
411           Multiple sources may be given, separated by commas and/or
412           whitespace (where in the latter case the whole argument must be
413           enclosed in "...").  Each source may contain multiple certificates.
414
415           The certificate verification options -verify_hostname, -verify_ip,
416           and -verify_email have no effect on the certificate verification
417           enabled via this option.
418
419       -untrusted filenames|uris
420           Non-trusted intermediate CA certificate(s).  Any extra certificates
421           given with the -cert option are appended to it.  All these
422           certificates may be useful for cert path construction for the CMP
423           client certificate (to include in the extraCerts field of outgoing
424           messages) and for the TLS client certificate (if TLS is enabled) as
425           well as for chain building when validating the CMP server
426           certificate (checking signature-based CMP message protection) and
427           when validating newly enrolled certificates.
428
429           Multiple sources may be given, separated by commas and/or
430           whitespace.  Each file may contain multiple certificates.
431
432       -srvcert filename|uri
433           The specific CMP server certificate to expect and directly trust
434           (even if it is expired) when validating signature-based protection
435           of CMP response messages.  May be set alternatively to the -trusted
436           option to pin the accepted server.
437
438           If set, the subject of the certificate is also used as default
439           value for the recipient of CMP requests and as default value for
440           the expected sender of incoming CMP messages.
441
442       -expect_sender name
443           Distinguished Name (DN) expected in the sender field of incoming
444           CMP messages.  Defaults to the subject DN of the pinned -srvcert,
445           if any.
446
447           This can be used to make sure that only a particular entity is
448           accepted as CMP message signer, and attackers are not able to use
449           arbitrary certificates of a trusted PKI hierarchy to fraudulently
450           pose as a CMP server.  Note that this option gives slightly more
451           freedom than setting the -srvcert, which pins the server to the
452           holder of a particular certificate, while the expected sender name
453           will continue to match after updates of the server cert.
454
455           The argument must be formatted as
456           /type0=value0/type1=value1/type2=....  For details see the
457           description of the -subject option.
458
459       -ignore_keyusage
460           Ignore key usage restrictions in CMP signer certificates when
461           validating signature-based protection of incoming CMP messages,
462           else "digitalSignature" must be allowed for signer certificate.
463
464       -unprotected_errors
465           Accept missing or invalid protection of negative responses from the
466           server.  This applies to the following message types and contents:
467
468           •   error messages
469
470           •   negative certificate responses (IP/CP/KUP)
471
472           •   negative revocation responses (RP)
473
474           •   negative PKIConf messages
475
476           WARNING: This setting leads to unspecified behavior and it is meant
477           exclusively to allow interoperability with server implementations
478           violating RFC 4210, e.g.:
479
480           •   section 5.1.3.1 allows exceptions from protecting only for
481               special cases: "There MAY be cases in which the PKIProtection
482               BIT STRING is deliberately not used to protect a message [...]
483               because other protection, external to PKIX, will be applied
484               instead."
485
486           •   section 5.3.21 is clear on ErrMsgContent: "The CA MUST always
487               sign it with a signature key."
488
489           •   appendix D.4 shows PKIConf message having protection
490
491       -extracertsout filename
492           The file where to save all certificates contained in the extraCerts
493           field of the last received response message (except for pollRep and
494           PKIConf).
495
496       -cacertsout filename
497           The file where to save any CA certificates contained in the caPubs
498           field of the last received certificate response (i.e., IP, CP, or
499           KUP) message.
500
501   Client authentication options
502       -ref value
503           Reference number/string/value to use as fallback senderKID; this is
504           required if no sender name can be determined from the -cert or
505           <-subject> options and is typically used when authenticating with
506           pre-shared key (password-based MAC).
507
508       -secret arg
509           Prefer PBM-based message protection with given source of a secret
510           value.  The secret is used for creating PBM-based protection of
511           outgoing messages and (as far as needed) for validating PBM-based
512           protection of incoming messages.  PBM stands for Password-Based
513           Message Authentication Code.  This takes precedence over the -cert
514           and -key options.
515
516           For more information about the format of arg see
517           openssl-passphrase-options(1).
518
519       -cert filename|uri
520           The client's current CMP signer certificate.  Requires the
521           corresponding key to be given with -key.  The subject of this
522           certificate will be used as sender of outgoing CMP messages, while
523           the subject of -oldcert or -subjectName may provide fallback
524           values.  The issuer of this certificate is used as one of the
525           recipient fallback values and as fallback issuer entry in the
526           certificate template of IR/CR/KUR.  When using signature-based
527           message protection, this "protection certificate" will be included
528           first in the extraCerts field of outgoing messages and the
529           signature is done with the corresponding key.  In Initialization
530           Request (IR) messages this can be used for authenticating using an
531           external entity certificate as defined in appendix E.7 of RFC 4210.
532           For Key Update Request (KUR) messages this is also used as the
533           certificate to be updated if the -oldcert option is not given.  If
534           the file includes further certs, they are appended to the untrusted
535           certs because they typically constitute the chain of the client
536           certificate, which is included in the extraCerts field in
537           signature-protected request messages.
538
539       -own_trusted filenames|uris
540           If this list of certificates is provided then the chain built for
541           the client-side CMP signer certificate given with the -cert option
542           is verified using the given certificates as trust anchors.
543
544           Multiple sources may be given, separated by commas and/or
545           whitespace (where in the latter case the whole argument must be
546           enclosed in "...").  Each source may contain multiple certificates.
547
548           The certificate verification options -verify_hostname, -verify_ip,
549           and -verify_email have no effect on the certificate verification
550           enabled via this option.
551
552       -key filename|uri
553           The corresponding private key file for the client's current
554           certificate given in the -cert option.  This will be used for
555           signature-based message protection unless the -secret option
556           indicating PBM or -unprotected_requests is given.
557
558       -keypass arg
559           Pass phrase source for the private key given with the -key option.
560           Also used for -cert and -oldcert in case it is an encrypted PKCS#12
561           file.  If not given here, the password will be prompted for if
562           needed.
563
564           For more information about the format of arg see
565           openssl-passphrase-options(1).
566
567       -digest name
568           Specifies name of supported digest to use in RFC 4210's MSG_SIG_ALG
569           and as the one-way function (OWF) in MSG_MAC_ALG.  If applicable,
570           this is used for message protection and Proof-of-Possession (POPO)
571           signatures.  To see the list of supported digests, use "openssl
572           list -digest-commands".  Defaults to "sha256".
573
574       -mac name
575           Specifies the name of the MAC algorithm in MSG_MAC_ALG.  To get the
576           names of supported MAC algorithms use "openssl list
577           -mac-algorithms" and possibly combine such a name with the name of
578           a supported digest algorithm, e.g., hmacWithSHA256.  Defaults to
579           "hmac-sha1" as per RFC 4210.
580
581       -extracerts filenames|uris
582           Certificates to append in the extraCerts field when sending
583           messages.  They can be used as the default CMP signer certificate
584           chain to include.
585
586           Multiple sources may be given, separated by commas and/or
587           whitespace (where in the latter case the whole argument must be
588           enclosed in "...").  Each source may contain multiple certificates.
589
590       -unprotected_requests
591           Send messages without CMP-level protection.
592
593   Credentials format options
594       -certform PEM|DER
595           File format to use when saving a certificate to a file.  Default
596           value is PEM.
597
598       -keyform PEM|DER|P12|ENGINE
599           The format of the key input; unspecified by default.  See "Format
600           Options" in openssl(1) for details.
601
602       -otherpass arg
603           Pass phrase source for certificate given with the -trusted,
604           -untrusted, -own_trusted, -srvcert, -out_trusted, -extracerts,
605           -srv_trusted, -srv_untrusted, -rsp_extracerts, -rsp_capubs,
606           -tls_extra, and -tls_trusted options.  If not given here, the
607           password will be prompted for if needed.
608
609           For more information about the format of arg see
610           openssl-passphrase-options(1).
611
612       -engine id
613           See "Engine Options" in openssl(1).  This option is deprecated.
614
615           As an alternative to using this combination:
616
617               -engine {engineid} -key {keyid} -keyform ENGINE
618
619           ... it's also possible to just give the key ID in URI form to -key,
620           like this:
621
622               -key org.openssl.engine:{engineid}:{keyid}
623
624           This applies to all options specifying keys: -key, -newkey, and
625           -tls_key.
626
627   Provider options
628       -provider name
629       -provider-path path
630       -propquery propq
631           See "Provider Options" in openssl(1), provider(7), and property(7).
632
633   Random state options
634       -rand files, -writerand file
635           See "Random State Options" in openssl(1) for details.
636
637   TLS connection options
638       -tls_used
639           Enable using TLS (even when other TLS_related options are not set)
640           when connecting to CMP server via HTTP.  This option is not
641           supported with the -port option and is ignored with the
642           -use_mock_srv and -rspin options or if the -server option is not
643           given.
644
645       -tls_cert filename|uri
646           Client's TLS certificate.  If the source includes further certs
647           they are used (along with -untrusted certs) for constructing the
648           client cert chain provided to the TLS server.
649
650       -tls_key filename|uri
651           Private key for the client's TLS certificate.
652
653       -tls_keypass arg
654           Pass phrase source for client's private TLS key -tls_key.  Also
655           used for -tls_cert in case it is an encrypted PKCS#12 file.  If not
656           given here, the password will be prompted for if needed.
657
658           For more information about the format of arg see
659           openssl-passphrase-options(1).
660
661       -tls_extra filenames|uris
662           Extra certificates to provide to TLS server during TLS handshake
663
664       -tls_trusted filenames|uris
665           Trusted certificate(s) to use for validating the TLS server
666           certificate.  This implies hostname validation.
667
668           Multiple sources may be given, separated by commas and/or
669           whitespace (where in the latter case the whole argument must be
670           enclosed in "...").  Each source may contain multiple certificates.
671
672           The certificate verification options -verify_hostname, -verify_ip,
673           and -verify_email have no effect on the certificate verification
674           enabled via this option.
675
676       -tls_host name
677           Address to be checked during hostname validation.  This may be a
678           DNS name or an IP address.  If not given it defaults to the -server
679           address.
680
681   Client-side debugging options
682       -batch
683           Do not interactively prompt for input, for instance when a password
684           is needed.  This can be useful for batch processing and testing.
685
686       -repeat number
687           Invoke the command the given positive number of times with the same
688           parameters.  Default is one invocation.
689
690       -reqin filenames
691           Take sequence of CMP requests from file(s).
692
693           Multiple filenames may be given, separated by commas and/or
694           whitespace (where in the latter case the whole argument must be
695           enclosed in "...").  As many files are read as needed for a
696           complete transaction.
697
698       -reqin_new_tid
699           Use a fresh transactionID for CMP request messages read using
700           -reqin, which requires re-protecting them as far as they were
701           protected before.  This may be needed in case the sequence of
702           requests is reused and the CMP server complains that the
703           transaction ID has already been used.
704
705       -reqout filenames
706           Save sequence of CMP requests to file(s).
707
708           Multiple filenames may be given, separated by commas and/or
709           whitespace.  As many files are written as needed to store the
710           complete transaction.
711
712       -rspin filenames
713           Process sequence of CMP responses provided in file(s), skipping
714           server.  This excludes -server, -port, and -use_mock_srv.
715
716           Multiple filenames may be given, separated by commas and/or
717           whitespace.  As many files are read as needed for the complete
718           transaction.
719
720       -rspout filenames
721           Save sequence of CMP responses to file(s).
722
723           Multiple filenames may be given, separated by commas and/or
724           whitespace.  As many files are written as needed to store the
725           complete transaction.
726
727       -use_mock_srv
728           Test the client using the internal CMP server mock-up at API level,
729           bypassing socket-based transfer via HTTP.  This excludes -server,
730           -port, and -rspin.
731
732   Mock server options
733       -port number
734           Act as HTTP-based CMP server mock-up listening on the given port.
735           This excludes -server, -rspin, and -use_mock_srv.
736
737       -max_msgs number
738           Maximum number of CMP (request) messages the CMP HTTP server mock-
739           up should handle, which must be nonnegative.  The default value is
740           0, which means that no limit is imposed.  In any case the server
741           terminates on internal errors, but not when it detects a CMP-level
742           error that it can successfully answer with an error message.
743
744       -srv_ref value
745           Reference value to use as senderKID of server in case no -srv_cert
746           is given.
747
748       -srv_secret arg
749           Password source for server authentication with a pre-shared key
750           (secret).
751
752       -srv_cert filename|uri
753           Certificate of the server.
754
755       -srv_key filename|uri
756           Private key used by the server for signing messages.
757
758       -srv_keypass arg
759           Server private key (and cert) file pass phrase source.
760
761       -srv_trusted filenames|uris
762           Trusted certificates for client authentication.
763
764           The certificate verification options -verify_hostname, -verify_ip,
765           and -verify_email have no effect on the certificate verification
766           enabled via this option.
767
768       -srv_untrusted filenames|uris
769           Intermediate CA certs that may be useful when validating client
770           certificates.
771
772       -rsp_cert filename|uri
773           Certificate to be returned as mock enrollment result.
774
775       -rsp_extracerts filenames|uris
776           Extra certificates to be included in mock certification responses.
777
778       -rsp_capubs filenames|uris
779           CA certificates to be included in mock Initialization Response (IP)
780           message.
781
782       -poll_count number
783           Number of times the client must poll before receiving a
784           certificate.
785
786       -check_after number
787           The checkAfter value (number of seconds to wait) to include in poll
788           response.
789
790       -grant_implicitconf
791           Grant implicit confirmation of newly enrolled certificate.
792
793       -pkistatus number
794           PKIStatus to be included in server response.  Valid range is 0
795           (accepted) .. 6 (keyUpdateWarning).
796
797       -failure number
798           A single failure info bit number to be included in server response.
799           Valid range is 0 (badAlg) .. 26 (duplicateCertReq).
800
801       -failurebits number Number representing failure bits to be included in
802       server response. Valid range is 0 .. 2^27 - 1.
803       -statusstring arg
804           Text to be included as status string in server response.
805
806       -send_error
807           Force server to reply with error message.
808
809       -send_unprotected
810           Send response messages without CMP-level protection.
811
812       -send_unprot_err
813           In case of negative responses, server shall send unprotected error
814           messages, certificate responses (IP/CP/KUP), and revocation
815           responses (RP).  WARNING: This setting leads to behavior violating
816           RFC 4210.
817
818       -accept_unprotected
819           Accept missing or invalid protection of requests.
820
821       -accept_unprot_err
822           Accept unprotected error messages from client.
823
824       -accept_raverified
825           Accept RAVERIFED as proof-of-possession (POPO).
826
827   Certificate verification options, for both CMP and TLS
828       -allow_proxy_certs, -attime, -no_check_time, -check_ss_sig, -crl_check,
829       -crl_check_all, -explicit_policy, -extended_crl, -ignore_critical,
830       -inhibit_any, -inhibit_map, -no_alt_chains, -partial_chain, -policy,
831       -policy_check, -policy_print, -purpose, -suiteB_128, -suiteB_128_only,
832       -suiteB_192, -trusted_first, -use_deltas, -auth_level, -verify_depth,
833       -verify_email, -verify_hostname, -verify_ip, -verify_name, -x509_strict
834       -issuer_checks
835           Set various options of certificate chain verification.  See
836           "Verification Options" in openssl-verification-options(1) for
837           details.
838
839           The certificate verification options -verify_hostname, -verify_ip,
840           and -verify_email only affect the certificate verification enabled
841           via the -out_trusted option.
842

NOTES

844       When setting up CMP configurations and experimenting with enrollment
845       options typically various errors occur until the configuration is
846       correct and complete.  When the CMP server reports an error the client
847       will by default check the protection of the CMP response message.  Yet
848       some CMP services tend not to protect negative responses.  In this case
849       the client will reject them, and thus their contents are not shown
850       although they usually contain hints that would be helpful for
851       diagnostics.  For assisting in such cases the CMP client offers a
852       workaround via the -unprotected_errors option, which allows accepting
853       such negative messages.
854

EXAMPLES

856   Simple examples using the default OpenSSL configuration file
857       This CMP client implementation comes with demonstrative CMP sections in
858       the example configuration file openssl/apps/openssl.cnf, which can be
859       used to interact conveniently with the Insta Demo CA.
860
861       In order to enroll an initial certificate from that CA it is sufficient
862       to issue the following shell commands.
863
864         export OPENSSL_CONF=/path/to/openssl/apps/openssl.cnf
865
866         openssl genrsa -out insta.priv.pem
867         openssl cmp -section insta
868
869       This should produce the file insta.cert.pem containing a new
870       certificate for the private key held in insta.priv.pem.  It can be
871       viewed using, e.g.,
872
873         openssl x509 -noout -text -in insta.cert.pem
874
875       In case the network setup requires using an HTTP proxy it may be given
876       as usual via the environment variable http_proxy or via the -proxy
877       option in the configuration file or the CMP command-line argument
878       -proxy, for example
879
880         -proxy http://192.168.1.1:8080
881
882       In the Insta Demo CA scenario both clients and the server may use the
883       pre-shared secret insta and the reference value 3078 to authenticate to
884       each other.
885
886       Alternatively, CMP messages may be protected in signature-based manner,
887       where the trust anchor in this case is insta.ca.crt and the client may
888       use any certificate already obtained from that CA, as specified in the
889       [signature] section of the example configuration.  This can be used in
890       combination with the [insta] section simply by
891
892         openssl cmp -section insta,signature
893
894       By default the CMP IR message type is used, yet CR works equally here.
895       This may be specified directly at the command line:
896
897         openssl cmp -section insta -cmd cr
898
899       or by referencing in addition the [cr] section of the example
900       configuration:
901
902         openssl cmp -section insta,cr
903
904       In order to update the enrolled certificate one may call
905
906         openssl cmp -section insta,kur
907
908       using with PBM-based protection or
909
910         openssl cmp -section insta,kur,signature
911
912       using signature-based protection.
913
914       In a similar way any previously enrolled certificate may be revoked by
915
916         openssl cmp -section insta,rr -trusted insta.ca.crt
917
918       or
919
920         openssl cmp -section insta,rr,signature
921
922       Many more options can be given in the configuration file and/or on the
923       command line.  For instance, the -reqexts CLI option may refer to a
924       section in the configuration file defining X.509 extensions to use in
925       certificate requests, such as "v3_req" in openssl/apps/openssl.cnf:
926
927         openssl cmp -section insta,cr -reqexts v3_req
928
929   Certificate enrollment
930       The following examples do not make use of a configuration file at
931       first.  They assume that a CMP server can be contacted on the local TCP
932       port 80 and accepts requests under the alias /pkix/.
933
934       For enrolling its very first certificate the client generates a client
935       key and sends an initial request message to the local CMP server using
936       a pre-shared secret key for mutual authentication.  In this example the
937       client does not have the CA certificate yet, so we specify the name of
938       the CA with the -recipient option and save any CA certificates that we
939       may receive in the "capubs.pem" file.
940
941       In below command line usage examples the "\" at line ends is used just
942       for formatting; each of the command invocations should be on a single
943       line.
944
945         openssl genrsa -out cl_key.pem
946         openssl cmp -cmd ir -server 127.0.0.1:80/pkix/ -recipient "/CN=CMPserver" \
947           -ref 1234 -secret pass:1234-5678 \
948           -newkey cl_key.pem -subject "/CN=MyName" \
949           -cacertsout capubs.pem -certout cl_cert.pem
950
951   Certificate update
952       Then, when the client certificate and its related key pair needs to be
953       updated, the client can send a key update request taking the certs in
954       "capubs.pem" as trusted for authenticating the server and using the
955       previous cert and key for its own authentication.  Then it can start
956       using the new cert and key.
957
958         openssl genrsa -out cl_key_new.pem
959         openssl cmp -cmd kur -server 127.0.0.1:80/pkix/ \
960           -trusted capubs.pem \
961           -cert cl_cert.pem -key cl_key.pem \
962           -newkey cl_key_new.pem -certout cl_cert.pem
963         cp cl_key_new.pem cl_key.pem
964
965       This command sequence can be repated as often as needed.
966
967   Requesting information from CMP server
968       Requesting "all relevant information" with an empty General Message.
969       This prints information about all received ITAV infoTypes to stdout.
970
971         openssl cmp -cmd genm -server 127.0.0.1/pkix/ -recipient "/CN=CMPserver" \
972           -ref 1234 -secret pass:1234-5678
973
974   Using a custom configuration file
975       For CMP client invocations, in particular for certificate enrollment,
976       usually many parameters need to be set, which is tedious and error-
977       prone to do on the command line.  Therefore, the client offers the
978       possibility to read options from sections of the OpenSSL config file,
979       usually called openssl.cnf.  The values found there can still be
980       extended and even overridden by any subsequently loaded sections and on
981       the command line.
982
983       After including in the configuration file the following sections:
984
985         [cmp]
986         server = 127.0.0.1
987         path = pkix/
988         trusted = capubs.pem
989         cert = cl_cert.pem
990         key = cl_key.pem
991         newkey = cl_key.pem
992         certout = cl_cert.pem
993
994         [init]
995         recipient = "/CN=CMPserver"
996         trusted =
997         cert =
998         key =
999         ref = 1234
1000         secret = pass:1234-5678-1234-567
1001         subject = "/CN=MyName"
1002         cacertsout = capubs.pem
1003
1004       the above enrollment transactions reduce to
1005
1006         openssl cmp -section cmp,init
1007         openssl cmp -cmd kur -newkey cl_key_new.pem
1008
1009       and the above transaction using a general message reduces to
1010
1011         openssl cmp -section cmp,init -cmd genm
1012

SEE ALSO

1014       openssl-genrsa(1), openssl-ecparam(1), openssl-list(1), openssl-req(1),
1015       openssl-x509(1), x509v3_config(5)
1016

HISTORY

1018       The cmp application was added in OpenSSL 3.0.
1019
1020       The -engine option was deprecated in OpenSSL 3.0.
1021
1023       Copyright 2007-2022 The OpenSSL Project Authors. All Rights Reserved.
1024
1025       Licensed under the Apache License 2.0 (the "License").  You may not use
1026       this file except in compliance with the License.  You can obtain a copy
1027       in the file LICENSE in the source distribution or at
1028       <https://www.openssl.org/source/license.html>.
1029
1030
1031
10323.0.5                             2022-11-01                OPENSSL-CMP(1ossl)
Impressum