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