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