openssl-cmp.1ossl 66 KB

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