info > openssl-cmp(1)

📖 NAME

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

🚀 Quick Reference

Use CaseCommandDescription
Initial enrollmentopenssl cmp -cmd ir -server 127.0.0.1:80/pkix/ -recipient "/CN=CMPserver" -ref 1234 -secret pass:1234-5678 -newkey cl_key.pem -subject "/CN=MyName" -certout cl_cert.pemRequest first certificate from a CMP server using PBM-based authentication
Certificate update (KUR)openssl cmp -cmd kur -server 127.0.0.1:80/pkix/ -trusted capubs.pem -cert cl_cert.pem -key cl_key.pem -newkey cl_key_new.pem -certout cl_cert.pemUpdate (renew/re-key) an existing certificate with signature-based protection
Revocationopenssl cmp -cmd rr -server 127.0.0.1:80/pkix/ -trusted capubs.pem -cert cl_cert.pem -key cl_key.pem -oldcert cl_cert.pem -revreason 1Revoke a certificate (e.g., keyCompromise reason 1)
General Messageopenssl cmp -cmd genm -server 127.0.0.1:80/pkix/ -recipient "/CN=CMPserver" -ref 1234 -secret pass:1234-5678Request information from CMP server (e.g., supported key types)
Using config file sectionsopenssl cmp -section cmp,initLoad options from config file sections (e.g., [cmp] and [init])
Enroll with PKCS#10 CSRopenssl cmp -cmd p10cr -server ... -csr request.csrLegacy PKCS#10 Certification Request

📝 SYNOPSIS

openssl cmp [-help] [-config filename] [-section names] [-verbosity level]

Generic message options:

[-cmd ir|cr|kur|p10cr|rr|genm] [-infotype name] [-geninfo OID:int:N]

Certificate enrollment options:

[-newkey filename|uri] [-newkeypass arg] [-subject name] [-issuer name] [-days number] [-reqexts name] [-sans spec] [-san_nodefault] [-policies name] [-policy_oids names] [-policy_oids_critical] [-popo number] [-csr filename] [-out_trusted filenames|uris] [-implicit_confirm] [-disable_confirm] [-certout filename] [-chainout filename]

Certificate enrollment and revocation options:

[-oldcert filename|uri] [-revreason number]

Message transfer options:

[-server [http[s]://][userinfo@]host[:port][/path][?query][#fragment]] [-proxy [http[s]://][userinfo@]host[:port][/path][?query][#fragment]] [-no_proxy addresses] [-recipient name] [-path remote_path] [-keep_alive value] [-msg_timeout seconds] [-total_timeout seconds]

Server authentication options:

[-trusted filenames|uris] [-untrusted filenames|uris] [-srvcert filename|uri] [-expect_sender name] [-ignore_keyusage] [-unprotected_errors] [-extracertsout filename] [-cacertsout filename]

Client authentication and protection options:

[-ref value] [-secret arg] [-cert filename|uri] [-own_trusted filenames|uris] [-key filename|uri] [-keypass arg] [-digest name] [-mac name] [-extracerts filenames|uris] [-unprotected_requests]

Credentials format options:

[-certform PEM|DER] [-keyform PEM|DER|P12|ENGINE] [-otherpass arg] [-engine id] [-provider name] [-provider-path path] [-propquery propq]

Random state options:

[-rand files] [-writerand file]

TLS connection options:

[-tls_used] [-tls_cert filename|uri] [-tls_key filename|uri] [-tls_keypass arg] [-tls_extra filenames|uris] [-tls_trusted filenames|uris] [-tls_host name]

Client-side debugging options:

[-batch] [-repeat number] [-reqin filenames] [-reqin_new_tid] [-reqout filenames] [-rspin filenames] [-rspout filenames] [-use_mock_srv]

Mock server options:

[-port number] [-max_msgs number] [-srv_ref value] [-srv_secret arg] [-srv_cert filename|uri] [-srv_key filename|uri] [-srv_keypass arg] [-srv_trusted filenames|uris] [-srv_untrusted filenames|uris] [-rsp_cert filename|uri] [-rsp_extracerts filenames|uris] [-rsp_capubs filenames|uris] [-poll_count number] [-check_after number] [-grant_implicitconf] [-pkistatus number] [-failure number] [-failurebits number] [-statusstring arg] [-send_error] [-send_unprotected] [-send_unprot_err] [-accept_unprotected] [-accept_unprot_err] [-accept_raverified]

Certificate verification options, for both CMP and TLS:

[-allow_proxy_certs] [-attime timestamp] [-no_check_time] [-check_ss_sig] [-crl_check] [-crl_check_all] [-explicit_policy] [-extended_crl] [-ignore_critical] [-inhibit_any] [-inhibit_map] [-partial_chain] [-policy arg] [-policy_check] [-policy_print] [-purpose purpose] [-suiteB_128] [-suiteB_128_only] [-suiteB_192] [-trusted_first] [-no_alt_chains] [-use_deltas] [-auth_level num] [-verify_depth num] [-verify_email email] [-verify_hostname hostname] [-verify_ip ip] [-verify_name name] [-x509_strict] [-issuer_checks]

📝 DESCRIPTION

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

⚙️ OPTIONS

🔹 General Options

🔹 Generic Message Options

🔹 Certificate Enrollment Options

🔹 Certificate Enrollment and Revocation Options

🔹 Message Transfer Options

🔹 Server Authentication Options

🔹 Client Authentication and Protection Options

🔹 Credentials Format Options

🔹 Provider Options

🔹 Random State Options

🔹 TLS Connection Options

🔹 Client-Side Debugging Options

🔹 Mock Server Options

🔹 Certificate Verification Options (for both CMP and TLS)

📝 NOTES

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

📝 EXAMPLES

🔹 Simple examples using the default OpenSSL configuration file

This CMP client implementation comes with demonstrative CMP sections in the example configuration file openssl/apps/openssl.cnf, which can be used to interact conveniently with the Insta Demo CA.

In order to enroll an initial certificate from that CA, it is sufficient to issue the following shell commands:

export OPENSSL_CONF=/path/to/openssl/apps/openssl.cnf

openssl genrsa -out insta.priv.pem
openssl cmp -section insta

This should produce the file insta.cert.pem containing a new certificate for the private key held in insta.priv.pem. It can be viewed using, e.g.,

openssl x509 -noout -text -in insta.cert.pem

In case the network setup requires using an HTTP proxy, it may be given as usual via the environment variable http_proxy or via the -proxy option in the configuration file or the command-line argument -proxy, for example:

-proxy http://192.168.1.1:8080

In the Insta Demo CA scenario, both clients and the server may use the pre-shared secret insta and the reference value 3078 to authenticate to each other.

Alternatively, CMP messages may be protected in signature-based manner, where the trust anchor in this case is insta.ca.crt and the client may use any certificate already obtained from that CA, as specified in the [signature] section of the example configuration. This can be used in combination with the [insta] section simply by:

openssl cmp -section insta,signature

By default the CMP IR message type is used, yet CR works equally here. This may be specified directly at the command line:

openssl cmp -section insta -cmd cr

or by referencing in addition the [cr] section of the example configuration:

openssl cmp -section insta,cr

In order to update the enrolled certificate, one may call:

openssl cmp -section insta,kur

using PBM-based protection or

openssl cmp -section insta,kur,signature

using signature-based protection.

In a similar way, any previously enrolled certificate may be revoked by:

openssl cmp -section insta,rr -trusted insta.ca.crt

or

openssl cmp -section insta,rr,signature

Many more options can be given in the configuration file and/or on the command line. For instance, the -reqexts CLI option may refer to a section in the configuration file defining X.509 extensions to use in certificate requests, such as "v3_req" in openssl/apps/openssl.cnf:

openssl cmp -section insta,cr -reqexts v3_req

🔹 Certificate Enrollment

The following examples do not make use of a configuration file at first. They assume that a CMP server can be contacted on the local TCP port 80 and accepts requests under the alias /pkix/.

For enrolling its very first certificate, the client generates a client key and sends an initial request message to the local CMP server using a pre-shared secret key for mutual authentication. In this example the client does not have the CA certificate yet, so we specify the name of the CA with the -recipient option and save any CA certificates that we may receive in the "capubs.pem" file.

In below command line usage examples, the "\" at line ends is used just for formatting; each of the command invocations should be on a single line.

openssl genrsa -out cl_key.pem
openssl cmp -cmd ir -server 127.0.0.1:80/pkix/ -recipient "/CN=CMPserver" \
  -ref 1234 -secret pass:1234-5678 \
  -newkey cl_key.pem -subject "/CN=MyName" \
  -cacertsout capubs.pem -certout cl_cert.pem

🔹 Certificate Update

Then, when the client certificate and its related key pair needs to be updated, the client can send a key update request taking the certs in "capubs.pem" as trusted for authenticating the server and using the previous cert and key for its own authentication. Then it can start using the new cert and key.

openssl genrsa -out cl_key_new.pem
openssl cmp -cmd kur -server 127.0.0.1:80/pkix/ \
  -trusted capubs.pem \
  -cert cl_cert.pem -key cl_key.pem \
  -newkey cl_key_new.pem -certout cl_cert.pem
cp cl_key_new.pem cl_key.pem

This command sequence can be repeated as often as needed.

🔹 Requesting information from CMP server

Requesting "all relevant information" with an empty General Message. This prints information about all received ITAV infoTypes to stdout.

openssl cmp -cmd genm -server 127.0.0.1/pkix/ -recipient "/CN=CMPserver" \
  -ref 1234 -secret pass:1234-5678

🔹 Using a custom configuration file

For CMP client invocations, in particular for certificate enrollment, usually many parameters need to be set, which is tedious and error-prone to do on the command line. Therefore, the client offers the possibility to read options from sections of the OpenSSL config file, usually called openssl.cnf. The values found there can still be extended and even overridden by any subsequently loaded sections and on the command line.

After including in the configuration file the following sections:

[cmp]
server = 127.0.0.1
path = pkix/
trusted = capubs.pem
cert = cl_cert.pem
key = cl_key.pem
newkey = cl_key.pem
certout = cl_cert.pem

[init]
recipient = "/CN=CMPserver"
trusted =
cert =
key =
ref = 1234
secret = pass:1234-5678-1234-567
subject = "/CN=MyName"
cacertsout = capubs.pem

The above enrollment transactions reduce to

openssl cmp -section cmp,init
openssl cmp -cmd kur -newkey cl_key_new.pem

and the above transaction using a general message reduces to

openssl cmp -section cmp,init -cmd genm

📚 SEE ALSO

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

📜 HISTORY

The cmp application was added in OpenSSL 3.0. The -engine option was deprecated in OpenSSL 3.0.

📄 COPYRIGHT

Copyright 2007-2022 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html.

openssl-cmp(1)
📖 NAME 🚀 Quick Reference 📝 SYNOPSIS 📝 DESCRIPTION ⚙️ OPTIONS
🔹 General Options 🔹 Generic Message Options 🔹 Certificate Enrollment Options 🔹 Certificate Enrollment and Revocation Options 🔹 Message Transfer Options 🔹 Server Authentication Options 🔹 Client Authentication and Protection Options 🔹 Credentials Format Options 🔹 Provider Options 🔹 Random State Options 🔹 TLS Connection Options 🔹 Client-Side Debugging Options 🔹 Mock Server Options 🔹 Certificate Verification Options (for both CMP and TLS)
📝 NOTES 📝 EXAMPLES
🔹 Simple examples using the default OpenSSL configuration file 🔹 Certificate Enrollment 🔹 Certificate Update 🔹 Requesting information from CMP server 🔹 Using a custom configuration file
📚 SEE ALSO 📜 HISTORY 📄 COPYRIGHT

Generated by phpman v4.9.26-1-g511901d Author: Che Dong Under GNU General Public License
2026-08-08 10:43 @216.73.216.229
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format