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