Use OSSL_STORE for load_{,pub}key() and load_cert() in apps/lib/apps.c
[openssl.git] / doc / man1 / openssl-spkac.pod.in
1 =pod
2
3 =begin comment
4 {- join("\n", @autowarntext) -}
5
6 =end comment
7
8 =head1 NAME
9
10 openssl-spkac - SPKAC printing and generating command
11
12 =head1 SYNOPSIS
13
14 B<openssl> B<spkac>
15 [B<-help>]
16 [B<-in> I<filename>]
17 [B<-out> I<filename>]
18 [B<-key> I<keyfile>]
19 [B<-keyform> B<DER>|B<PEM>|B<P12>|B<ENGINE>]
20 [B<-passin> I<arg>]
21 [B<-challenge> I<string>]
22 [B<-pubkey>]
23 [B<-spkac> I<spkacname>]
24 [B<-spksect> I<section>]
25 [B<-noout>]
26 [B<-verify>]
27 {- $OpenSSL::safe::opt_engine_synopsis -}
28 {- $OpenSSL::safe::opt_provider_synopsis -}
29
30 =for openssl ifdef engine
31
32 =head1 DESCRIPTION
33
34 This command processes Netscape signed public key and challenge
35 (SPKAC) files. It can print out their contents, verify the signature and
36 produce its own SPKACs from a supplied private key.
37
38 =head1 OPTIONS
39
40 =over 4
41
42 =item B<-help>
43
44 Print out a usage message.
45
46 =item B<-in> I<filename>
47
48 This specifies the input filename to read from or standard input if this
49 option is not specified. Ignored if the B<-key> option is used.
50
51 =item B<-out> I<filename>
52
53 Specifies the output filename to write to or standard output by
54 default.
55
56 =item B<-key> I<keyfile>
57
58 Create an SPKAC file using the private key in I<keyfile>. The
59 B<-in>, B<-noout>, B<-spksect> and B<-verify> options are ignored if
60 present.
61
62 =item B<-keyform> B<DER>|B<PEM>|B<P12>|B<ENGINE>
63
64 The key format; the default is B<PEM>.
65 The only value with effect is B<ENGINE>; all others have become obsolete.
66 See L<openssl(1)/Format Options> for details.
67
68 =item B<-passin> I<arg>
69
70 The input file password source. For more information about the format of I<arg>
71 see L<openssl(1)/Pass Phrase Options>.
72
73 =item B<-challenge> I<string>
74
75 Specifies the challenge string if an SPKAC is being created.
76
77 =item B<-spkac> I<spkacname>
78
79 Allows an alternative name form the variable containing the
80 SPKAC. The default is "SPKAC". This option affects both
81 generated and input SPKAC files.
82
83 =item B<-spksect> I<section>
84
85 Allows an alternative name form the section containing the
86 SPKAC. The default is the default section.
87
88 =item B<-noout>
89
90 Don't output the text version of the SPKAC (not used if an
91 SPKAC is being created).
92
93 =item B<-pubkey>
94
95 Output the public key of an SPKAC (not used if an SPKAC is
96 being created).
97
98 =item B<-verify>
99
100 Verifies the digital signature on the supplied SPKAC.
101
102 {- $OpenSSL::safe::opt_engine_item -}
103
104 {- $OpenSSL::safe::opt_provider_item -}
105
106 =back
107
108 =head1 EXAMPLES
109
110 Print out the contents of an SPKAC:
111
112  openssl spkac -in spkac.cnf
113
114 Verify the signature of an SPKAC:
115
116  openssl spkac -in spkac.cnf -noout -verify
117
118 Create an SPKAC using the challenge string "hello":
119
120  openssl spkac -key key.pem -challenge hello -out spkac.cnf
121
122 Example of an SPKAC, (long lines split up for clarity):
123
124  SPKAC=MIG5MGUwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA\
125  1cCoq2Wa3Ixs47uI7FPVwHVIPDx5yso105Y6zpozam135a\
126  8R0CpoRvkkigIyXfcCjiVi5oWk+6FfPaD03uPFoQIDAQAB\
127  FgVoZWxsbzANBgkqhkiG9w0BAQQFAANBAFpQtY/FojdwkJ\
128  h1bEIYuc2EeM2KHTWPEepWYeawvHD0gQ3DngSC75YCWnnD\
129  dq+NQ3F+X4deMx9AaEglZtULwV4=
130
131 =head1 NOTES
132
133 A created SPKAC with suitable DN components appended can be fed to
134 L<openssl-ca(1)>.
135
136 SPKACs are typically generated by Netscape when a form is submitted
137 containing the B<KEYGEN> tag as part of the certificate enrollment
138 process.
139
140 The challenge string permits a primitive form of proof of possession
141 of private key. By checking the SPKAC signature and a random challenge
142 string some guarantee is given that the user knows the private key
143 corresponding to the public key being certified. This is important in
144 some applications. Without this it is possible for a previous SPKAC
145 to be used in a "replay attack".
146
147 =head1 SEE ALSO
148
149 L<openssl(1)>,
150 L<openssl-ca(1)>
151
152 =head1 HISTORY
153
154 All B<-keyform> values except B<ENGINE> have become obsolete in OpenSSL 3.0.0
155 and have no effect.
156
157 =head1 COPYRIGHT
158
159 Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
160
161 Licensed under the Apache License 2.0 (the "License").  You may not use
162 this file except in compliance with the License.  You can obtain a copy
163 in the file LICENSE in the source distribution or at
164 L<https://www.openssl.org/source/license.html>.
165
166 =cut