openssl-cmp.1ossl 64 KB

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