e4ad670b5e61d0774b750e20e187d69d4e380267
[openssl.git] / doc / man1 / openssl-spkac.pod
1 =pod
2
3 =head1 NAME
4
5 openssl-spkac - SPKAC printing and generating utility
6
7 =head1 SYNOPSIS
8
9 B<openssl> B<spkac>
10 [B<-help>]
11 [B<-in> I<filename>]
12 [B<-out> I<filename>]
13 [B<-key> I<keyfile>]
14 [B<-keyform> B<DER>|B<PEM>|B<ENGINE>]
15 [B<-passin> I<arg>]
16 [B<-challenge> I<string>]
17 [B<-pubkey>]
18 [B<-spkac> I<spkacname>]
19 [B<-spksect> I<section>]
20 [B<-noout>]
21 [B<-verify>]
22 [B<-engine> I<id>]
23
24 =for comment ifdef engine
25
26 =head1 DESCRIPTION
27
28 The B<spkac> command processes Netscape signed public key and challenge
29 (SPKAC) files. It can print out their contents, verify the signature and
30 produce its own SPKACs from a supplied private key.
31
32 =head1 OPTIONS
33
34 =over 4
35
36 =item B<-help>
37
38 Print out a usage message.
39
40 =item B<-in> I<filename>
41
42 This specifies the input filename to read from or standard input if this
43 option is not specified. Ignored if the B<-key> option is used.
44
45 =item B<-out> I<filename>
46
47 Specifies the output filename to write to or standard output by
48 default.
49
50 =item B<-key> I<keyfile>
51
52 Create an SPKAC file using the private key in I<keyfile>. The
53 B<-in>, B<-noout>, B<-spksect> and B<-verify> options are ignored if
54 present.
55
56 =item B<-keyform> B<DER>|B<PEM>|B<ENGINE>
57
58 Whether the key format is PEM, DER, or an engine-backed key.
59 The default is PEM.
60
61 =item B<-passin> I<arg>
62
63 The input file password source. For more information about the format of I<arg>
64 see L<openssl(1)/Pass phrase options>.
65
66 =item B<-challenge> I<string>
67
68 Specifies the challenge string if an SPKAC is being created.
69
70 =item B<-spkac> I<spkacname>
71
72 Allows an alternative name form the variable containing the
73 SPKAC. The default is "SPKAC". This option affects both
74 generated and input SPKAC files.
75
76 =item B<-spksect> I<section>
77
78 Allows an alternative name form the section containing the
79 SPKAC. The default is the default section.
80
81 =item B<-noout>
82
83 Don't output the text version of the SPKAC (not used if an
84 SPKAC is being created).
85
86 =item B<-pubkey>
87
88 Output the public key of an SPKAC (not used if an SPKAC is
89 being created).
90
91 =item B<-verify>
92
93 Verifies the digital signature on the supplied SPKAC.
94
95 =item B<-engine> I<id>
96
97 Specifying an engine (by its unique I<id> string) will cause B<spkac>
98 to attempt to obtain a functional reference to the specified engine,
99 thus initialising it if needed. The engine will then be set as the default
100 for all available algorithms.
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 into
130 the B<ca> utility.
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 COPYRIGHT
149
150 Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
151
152 Licensed under the Apache License 2.0 (the "License").  You may not use
153 this file except in compliance with the License.  You can obtain a copy
154 in the file LICENSE in the source distribution or at
155 L<https://www.openssl.org/source/license.html>.
156
157 =cut