openssl-spkac.1ossl 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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-SPKAC 1ossl"
  58. .TH OPENSSL-SPKAC 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\-spkac \- SPKAC printing and generating command
  65. .SH SYNOPSIS
  66. .IX Header "SYNOPSIS"
  67. \&\fBopenssl\fR \fBspkac\fR
  68. [\fB\-help\fR]
  69. [\fB\-in\fR \fIfilename\fR]
  70. [\fB\-out\fR \fIfilename\fR]
  71. [\fB\-digest\fR \fIdigest\fR]
  72. [\fB\-key\fR \fIfilename\fR|\fIuri\fR]
  73. [\fB\-keyform\fR \fBDER\fR|\fBPEM\fR|\fBP12\fR|\fBENGINE\fR]
  74. [\fB\-passin\fR \fIarg\fR]
  75. [\fB\-challenge\fR \fIstring\fR]
  76. [\fB\-pubkey\fR]
  77. [\fB\-spkac\fR \fIspkacname\fR]
  78. [\fB\-spksect\fR \fIsection\fR]
  79. [\fB\-noout\fR]
  80. [\fB\-verify\fR]
  81. [\fB\-engine\fR \fIid\fR]
  82. [\fB\-provider\fR \fIname\fR]
  83. [\fB\-provider\-path\fR \fIpath\fR]
  84. [\fB\-propquery\fR \fIpropq\fR]
  85. .SH DESCRIPTION
  86. .IX Header "DESCRIPTION"
  87. This command processes Netscape signed public key and challenge
  88. (SPKAC) files. It can print out their contents, verify the signature and
  89. produce its own SPKACs from a supplied private key.
  90. .SH OPTIONS
  91. .IX Header "OPTIONS"
  92. .IP \fB\-help\fR 4
  93. .IX Item "-help"
  94. Print out a usage message.
  95. .IP "\fB\-in\fR \fIfilename\fR" 4
  96. .IX Item "-in filename"
  97. This specifies the input filename to read from or standard input if this
  98. option is not specified. Ignored if the \fB\-key\fR option is used.
  99. .IP "\fB\-out\fR \fIfilename\fR" 4
  100. .IX Item "-out filename"
  101. Specifies the output filename to write to or standard output by
  102. default.
  103. .IP "\fB\-digest\fR \fIdigest\fR" 4
  104. .IX Item "-digest digest"
  105. Use the specified \fIdigest\fR to sign a created SPKAC file.
  106. The default digest algorithm is MD5.
  107. .IP "\fB\-key\fR \fIfilename\fR|\fIuri\fR" 4
  108. .IX Item "-key filename|uri"
  109. Create an SPKAC file using the private key specified by \fIfilename\fR or \fIuri\fR.
  110. The \fB\-in\fR, \fB\-noout\fR, \fB\-spksect\fR and \fB\-verify\fR options are ignored if
  111. present.
  112. .IP "\fB\-keyform\fR \fBDER\fR|\fBPEM\fR|\fBP12\fR|\fBENGINE\fR" 4
  113. .IX Item "-keyform DER|PEM|P12|ENGINE"
  114. The key format; unspecified by default.
  115. See \fBopenssl\-format\-options\fR\|(1) for details.
  116. .IP "\fB\-passin\fR \fIarg\fR" 4
  117. .IX Item "-passin arg"
  118. The input file password source. For more information about the format of \fIarg\fR
  119. see \fBopenssl\-passphrase\-options\fR\|(1).
  120. .IP "\fB\-challenge\fR \fIstring\fR" 4
  121. .IX Item "-challenge string"
  122. Specifies the challenge string if an SPKAC is being created.
  123. .IP "\fB\-spkac\fR \fIspkacname\fR" 4
  124. .IX Item "-spkac spkacname"
  125. Allows an alternative name form the variable containing the
  126. SPKAC. The default is "SPKAC". This option affects both
  127. generated and input SPKAC files.
  128. .IP "\fB\-spksect\fR \fIsection\fR" 4
  129. .IX Item "-spksect section"
  130. Allows an alternative name form the section containing the
  131. SPKAC. The default is the default section.
  132. .IP \fB\-noout\fR 4
  133. .IX Item "-noout"
  134. Don't output the text version of the SPKAC (not used if an
  135. SPKAC is being created).
  136. .IP \fB\-pubkey\fR 4
  137. .IX Item "-pubkey"
  138. Output the public key of an SPKAC (not used if an SPKAC is
  139. being created).
  140. .IP \fB\-verify\fR 4
  141. .IX Item "-verify"
  142. Verifies the digital signature on the supplied SPKAC.
  143. .IP "\fB\-engine\fR \fIid\fR" 4
  144. .IX Item "-engine id"
  145. See "Engine Options" in \fBopenssl\fR\|(1).
  146. This option is deprecated.
  147. .IP "\fB\-provider\fR \fIname\fR" 4
  148. .IX Item "-provider name"
  149. .PD 0
  150. .IP "\fB\-provider\-path\fR \fIpath\fR" 4
  151. .IX Item "-provider-path path"
  152. .IP "\fB\-propquery\fR \fIpropq\fR" 4
  153. .IX Item "-propquery propq"
  154. .PD
  155. See "Provider Options" in \fBopenssl\fR\|(1), \fBprovider\fR\|(7), and \fBproperty\fR\|(7).
  156. .SH EXAMPLES
  157. .IX Header "EXAMPLES"
  158. Print out the contents of an SPKAC:
  159. .PP
  160. .Vb 1
  161. \& openssl spkac \-in spkac.cnf
  162. .Ve
  163. .PP
  164. Verify the signature of an SPKAC:
  165. .PP
  166. .Vb 1
  167. \& openssl spkac \-in spkac.cnf \-noout \-verify
  168. .Ve
  169. .PP
  170. Create an SPKAC using the challenge string "hello":
  171. .PP
  172. .Vb 1
  173. \& openssl spkac \-key key.pem \-challenge hello \-out spkac.cnf
  174. .Ve
  175. .PP
  176. Example of an SPKAC, (long lines split up for clarity):
  177. .PP
  178. .Vb 6
  179. \& SPKAC=MIG5MGUwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA\e
  180. \& 1cCoq2Wa3Ixs47uI7FPVwHVIPDx5yso105Y6zpozam135a\e
  181. \& 8R0CpoRvkkigIyXfcCjiVi5oWk+6FfPaD03uPFoQIDAQAB\e
  182. \& FgVoZWxsbzANBgkqhkiG9w0BAQQFAANBAFpQtY/FojdwkJ\e
  183. \& h1bEIYuc2EeM2KHTWPEepWYeawvHD0gQ3DngSC75YCWnnD\e
  184. \& dq+NQ3F+X4deMx9AaEglZtULwV4=
  185. .Ve
  186. .SH NOTES
  187. .IX Header "NOTES"
  188. A created SPKAC with suitable DN components appended can be fed to
  189. \&\fBopenssl\-ca\fR\|(1).
  190. .PP
  191. SPKACs are typically generated by Netscape when a form is submitted
  192. containing the \fBKEYGEN\fR tag as part of the certificate enrollment
  193. process.
  194. .PP
  195. The challenge string permits a primitive form of proof of possession
  196. of private key. By checking the SPKAC signature and a random challenge
  197. string some guarantee is given that the user knows the private key
  198. corresponding to the public key being certified. This is important in
  199. some applications. Without this it is possible for a previous SPKAC
  200. to be used in a "replay attack".
  201. .SH "SEE ALSO"
  202. .IX Header "SEE ALSO"
  203. \&\fBopenssl\fR\|(1),
  204. \&\fBopenssl\-ca\fR\|(1)
  205. .SH HISTORY
  206. .IX Header "HISTORY"
  207. The \fB\-engine\fR option was deprecated in OpenSSL 3.0.
  208. .PP
  209. The \fB\-digest\fR option was added in OpenSSL 3.0.
  210. .SH COPYRIGHT
  211. .IX Header "COPYRIGHT"
  212. Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
  213. .PP
  214. Licensed under the Apache License 2.0 (the "License"). You may not use
  215. this file except in compliance with the License. You can obtain a copy
  216. in the file LICENSE in the source distribution or at
  217. <https://www.openssl.org/source/license.html>.