Use simple names in core_names.h
[openssl.git] / doc / man1 / openssl-spkac.pod
1 =pod
2
3 =head1 NAME
4
5 openssl-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=MIG5MGUwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA\
119  1cCoq2Wa3Ixs47uI7FPVwHVIPDx5yso105Y6zpozam135a\
120  8R0CpoRvkkigIyXfcCjiVi5oWk+6FfPaD03uPFoQIDAQAB\
121  FgVoZWxsbzANBgkqhkiG9w0BAQQFAANBAFpQtY/FojdwkJ\
122  h1bEIYuc2EeM2KHTWPEepWYeawvHD0gQ3DngSC75YCWnnD\
123  dq+NQ3F+X4deMx9AaEglZtULwV4=
124
125 =head1 NOTES
126
127 A created SPKAC with suitable DN components appended can be fed into
128 the B<ca> utility.
129
130 SPKACs are typically generated by Netscape when a form is submitted
131 containing the B<KEYGEN> tag as part of the certificate enrollment
132 process.
133
134 The challenge string permits a primitive form of proof of possession
135 of private key. By checking the SPKAC signature and a random challenge
136 string some guarantee is given that the user knows the private key
137 corresponding to the public key being certified. This is important in
138 some applications. Without this it is possible for a previous SPKAC
139 to be used in a "replay attack".
140
141 =head1 SEE ALSO
142
143 L<openssl(1)>,
144 L<openssl-ca(1)>
145
146 =head1 COPYRIGHT
147
148 Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
149
150 Licensed under the Apache License 2.0 (the "License").  You may not use
151 this file except in compliance with the License.  You can obtain a copy
152 in the file LICENSE in the source distribution or at
153 L<https://www.openssl.org/source/license.html>.
154
155 =cut