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