Remove '=for openssl ifdef'
[openssl.git] / doc / man1 / openssl-spkac.pod.in
1 =pod
2
3 =begin comment
4 {- join("\n", @autowarntext) -}
5
6 =end comment
7
8 =head1 NAME
9
10 openssl-spkac - SPKAC printing and generating command
11
12 =head1 SYNOPSIS
13
14 B<openssl> B<spkac>
15 [B<-help>]
16 [B<-in> I<filename>]
17 [B<-out> I<filename>]
18 [B<-key> I<filename>|I<uri>]
19 [B<-keyform> B<DER>|B<PEM>|B<P12>|B<ENGINE>]
20 [B<-passin> I<arg>]
21 [B<-challenge> I<string>]
22 [B<-pubkey>]
23 [B<-spkac> I<spkacname>]
24 [B<-spksect> I<section>]
25 [B<-noout>]
26 [B<-verify>]
27 {- $OpenSSL::safe::opt_engine_synopsis -}{- $OpenSSL::safe::opt_provider_synopsis -}
28
29 =head1 DESCRIPTION
30
31 This command processes Netscape signed public key and challenge
32 (SPKAC) files. It can print out their contents, verify the signature and
33 produce its own SPKACs from a supplied private key.
34
35 =head1 OPTIONS
36
37 =over 4
38
39 =item B<-help>
40
41 Print out a usage message.
42
43 =item B<-in> I<filename>
44
45 This specifies the input filename to read from or standard input if this
46 option is not specified. Ignored if the B<-key> option is used.
47
48 =item B<-out> I<filename>
49
50 Specifies the output filename to write to or standard output by
51 default.
52
53 =item B<-key> I<filename>|I<uri>
54
55 Create an SPKAC file using the private key specified by I<filename> or I<uri>.
56 The B<-in>, B<-noout>, B<-spksect> and B<-verify> options are ignored if
57 present.
58
59 =item B<-keyform> B<DER>|B<PEM>|B<P12>|B<ENGINE>
60
61 The key format; unspecified by default.
62 See L<openssl-format-options(1)> for details.
63
64 =item B<-passin> I<arg>
65
66 The input file password source. For more information about the format of I<arg>
67 see L<openssl-passphrase-options(1)>.
68
69 =item B<-challenge> I<string>
70
71 Specifies the challenge string if an SPKAC is being created.
72
73 =item B<-spkac> I<spkacname>
74
75 Allows an alternative name form the variable containing the
76 SPKAC. The default is "SPKAC". This option affects both
77 generated and input SPKAC files.
78
79 =item B<-spksect> I<section>
80
81 Allows an alternative name form the section containing the
82 SPKAC. The default is the default section.
83
84 =item B<-noout>
85
86 Don't output the text version of the SPKAC (not used if an
87 SPKAC is being created).
88
89 =item B<-pubkey>
90
91 Output the public key of an SPKAC (not used if an SPKAC is
92 being created).
93
94 =item B<-verify>
95
96 Verifies the digital signature on the supplied SPKAC.
97
98 {- $OpenSSL::safe::opt_engine_item -}
99
100 {- $OpenSSL::safe::opt_provider_item -}
101
102 =back
103
104 =head1 EXAMPLES
105
106 Print out the contents of an SPKAC:
107
108  openssl spkac -in spkac.cnf
109
110 Verify the signature of an SPKAC:
111
112  openssl spkac -in spkac.cnf -noout -verify
113
114 Create an SPKAC using the challenge string "hello":
115
116  openssl spkac -key key.pem -challenge hello -out spkac.cnf
117
118 Example of an SPKAC, (long lines split up for clarity):
119
120  SPKAC=MIG5MGUwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA\
121  1cCoq2Wa3Ixs47uI7FPVwHVIPDx5yso105Y6zpozam135a\
122  8R0CpoRvkkigIyXfcCjiVi5oWk+6FfPaD03uPFoQIDAQAB\
123  FgVoZWxsbzANBgkqhkiG9w0BAQQFAANBAFpQtY/FojdwkJ\
124  h1bEIYuc2EeM2KHTWPEepWYeawvHD0gQ3DngSC75YCWnnD\
125  dq+NQ3F+X4deMx9AaEglZtULwV4=
126
127 =head1 NOTES
128
129 A created SPKAC with suitable DN components appended can be fed to
130 L<openssl-ca(1)>.
131
132 SPKACs are typically generated by Netscape when a form is submitted
133 containing the B<KEYGEN> tag as part of the certificate enrollment
134 process.
135
136 The challenge string permits a primitive form of proof of possession
137 of private key. By checking the SPKAC signature and a random challenge
138 string some guarantee is given that the user knows the private key
139 corresponding to the public key being certified. This is important in
140 some applications. Without this it is possible for a previous SPKAC
141 to be used in a "replay attack".
142
143 =head1 SEE ALSO
144
145 L<openssl(1)>,
146 L<openssl-ca(1)>
147
148 =head1 HISTORY
149
150 The B<-engine> option was deprecated in OpenSSL 3.0.
151
152 =head1 COPYRIGHT
153
154 Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
155
156 Licensed under the Apache License 2.0 (the "License").  You may not use
157 this file except in compliance with the License.  You can obtain a copy
158 in the file LICENSE in the source distribution or at
159 L<https://www.openssl.org/source/license.html>.
160
161 =cut