846b9a93a7ab9d8601d42bb54102434c2315ec7c
[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<-in filename>]
11 [B<-out filename>]
12 [B<-key keyfile>]
13 [B<-passin password>]
14 [B<-envpassin var>]
15 [B<-challenge string>]
16 [B<-pubkey>]
17 [B<-spkac spkacname>]
18 [B<-spksect section>]
19 [B<-noout>]
20 [B<-verify>]
21
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<-in filename>
34
35 This specifies the input filename to read from or standard input if this
36 option is not specified. Ignored if the B<-key> option is used.
37
38 =item B<-out filename>
39
40 specifies the output filename to write to or standard output by
41 default.
42
43 =item B<-key keyfile>
44
45 create an SPKAC file using the private key in B<keyfile>. The
46 B<-in>, B<-noout>, B<-spksect> and B<-verify> options are ignored if
47 present.
48
49 =item B<-passin password>
50
51 the private key file password. Since certain utilities like "ps" make the
52 command line visible this option should be used with caution. Ignored if
53 the B<-key> argument is not used.
54
55 =item B<-envpassin var>
56
57 read the private key file password from the environment variable B<var>.
58 Ignored if the B<-key> argument is not used.
59
60 =item B<-challenge string>
61
62 specifies the challenge string if an SPKAC is being created.
63
64 =item B<-spkac spkacname>
65
66 allows an alternative name form the variable containing the
67 SPKAC. The default is "SPKAC". This option affects both
68 generated and input SPKAC files.
69
70 =item B<-spksect section>
71
72 allows an alternative name form the section containing the
73 SPKAC. The default is the default section.
74
75 =item B<-noout>
76
77 don't output the text version of the SPKAC (not used if an
78 SPKAC is being created).
79
80 =item B<-pubkey>
81
82 output the public key of an SPKAC (not used if an SPKAC is
83 being created).
84
85 =item B<-verify>
86
87 verifies the digital signature on the supplied SPKAC.
88
89
90 =back
91
92 =head1 EXAMPLES
93
94 Print out the contents of an SPKAC:
95
96  openssl spkac -in spkac.cnf
97
98 Verify the signature of an SPKAC:
99
100  openssl spkac -in spkac.cnf -noout -verify
101
102 Create an SPKAC using the challenge string "hello":
103
104  openssl spkac -key key.pem -challenge hello -out spkac.cnf
105
106 Example of an SPKAC, (long lines split up for clarity):
107
108  SPKAC=MIG5MGUwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA1cCoq2Wa3Ixs47uI7F\
109  PVwHVIPDx5yso105Y6zpozam135a8R0CpoRvkkigIyXfcCjiVi5oWk+6FfPaD03u\
110  PFoQIDAQABFgVoZWxsbzANBgkqhkiG9w0BAQQFAANBAFpQtY/FojdwkJh1bEIYuc\
111  2EeM2KHTWPEepWYeawvHD0gQ3DngSC75YCWnnDdq+NQ3F+X4deMx9AaEglZtULwV\
112  4=
113
114 =head1 NOTES
115
116 A created SPKAC with suitable DN components appended can be fed into
117 the B<ca> utility.
118
119 SPKACs are typically generated by Netscape when a form is submitted
120 containing the B<KEYGEN> tag as part of the certificate enrollment
121 process.
122
123 The challenge string permits a primitive form of proof of possession
124 of private key. By checking the SPKAC signature and a random challenge
125 string some guarantee is given that the user knows the private key
126 corresponding to the public key being certified. This is important in
127 some applications. Without this it is possible for a previous SPKAC
128 to be used in a "replay attack".
129
130 =head1 SEE ALSO
131
132 L<ca(1)|ca(1)>
133
134 =cut