blob: 75b12d85dfc19788ec109304befbd4c9e9529ae2 [file] [log] [blame]
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +00001=pod
2
3=head1 NAME
4
Rich Salz3f2181e2017-10-18 15:33:56 -04005openssl-spkac,
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +00006spkac - SPKAC printing and generating utility
7
8=head1 SYNOPSIS
9
10B<openssl> B<spkac>
A J Mohan Rao169394d2016-02-05 11:58:45 -050011[B<-help>]
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000012[B<-in filename>]
13[B<-out filename>]
14[B<-key keyfile>]
Luke Faraone66e59702017-05-15 18:23:17 -070015[B<-keyform PEM|DER|ENGINE>]
Dr. Stephen Hensona3fe3822000-02-16 23:16:01 +000016[B<-passin arg>]
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000017[B<-challenge string>]
Dr. Stephen Henson82fc1d92000-02-03 02:56:48 +000018[B<-pubkey>]
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000019[B<-spkac spkacname>]
20[B<-spksect section>]
21[B<-noout>]
22[B<-verify>]
Richard Levittebfa35552003-01-30 22:02:27 +000023[B<-engine id>]
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000024
25=head1 DESCRIPTION
26
27The B<spkac> command processes Netscape signed public key and challenge
28(SPKAC) files. It can print out their contents, verify the signature and
29produce its own SPKACs from a supplied private key.
30
Rich Salz3dfda1a2016-12-12 11:14:40 -050031=head1 OPTIONS
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000032
33=over 4
34
A J Mohan Rao169394d2016-02-05 11:58:45 -050035=item B<-help>
36
37Print out a usage message.
38
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000039=item B<-in filename>
40
41This specifies the input filename to read from or standard input if this
42option is not specified. Ignored if the B<-key> option is used.
43
44=item B<-out filename>
45
Paulic4de0742017-03-30 07:38:30 +100046Specifies the output filename to write to or standard output by
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000047default.
48
49=item B<-key keyfile>
50
Paulic4de0742017-03-30 07:38:30 +100051Create an SPKAC file using the private key in B<keyfile>. The
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000052B<-in>, B<-noout>, B<-spksect> and B<-verify> options are ignored if
53present.
54
Luke Faraone66e59702017-05-15 18:23:17 -070055=item B<-keyform PEM|DER|ENGINE>
56
57Whether the key format is PEM, DER, or an engine-backed key.
58The default is PEM.
59
Dr. Stephen Hensonf07fb9b2000-02-08 01:34:59 +000060=item B<-passin password>
61
Paulic4de0742017-03-30 07:38:30 +100062The input file password source. For more information about the format of B<arg>
Rich Salz9b869742015-08-17 15:21:33 -040063see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
Dr. Stephen Hensonf07fb9b2000-02-08 01:34:59 +000064
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000065=item B<-challenge string>
66
Paulic4de0742017-03-30 07:38:30 +100067Specifies the challenge string if an SPKAC is being created.
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000068
69=item B<-spkac spkacname>
70
Paulic4de0742017-03-30 07:38:30 +100071Allows an alternative name form the variable containing the
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000072SPKAC. The default is "SPKAC". This option affects both
73generated and input SPKAC files.
74
75=item B<-spksect section>
76
Paulic4de0742017-03-30 07:38:30 +100077Allows an alternative name form the section containing the
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000078SPKAC. The default is the default section.
79
80=item B<-noout>
81
Paulic4de0742017-03-30 07:38:30 +100082Don't output the text version of the SPKAC (not used if an
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000083SPKAC is being created).
84
Dr. Stephen Henson82fc1d92000-02-03 02:56:48 +000085=item B<-pubkey>
86
Paulic4de0742017-03-30 07:38:30 +100087Output the public key of an SPKAC (not used if an SPKAC is
Dr. Stephen Henson82fc1d92000-02-03 02:56:48 +000088being created).
89
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000090=item B<-verify>
91
Paulic4de0742017-03-30 07:38:30 +100092Verifies the digital signature on the supplied SPKAC.
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +000093
Richard Levittebfa35552003-01-30 22:02:27 +000094=item B<-engine id>
95
Paulic4de0742017-03-30 07:38:30 +100096Specifying an engine (by its unique B<id> string) will cause B<spkac>
Richard Levittebfa35552003-01-30 22:02:27 +000097to attempt to obtain a functional reference to the specified engine,
98thus initialising it if needed. The engine will then be set as the default
99for all available algorithms.
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +0000100
101=back
102
103=head1 EXAMPLES
104
105Print out the contents of an SPKAC:
106
Ulf Möller19d2bb52000-01-07 01:39:59 +0000107 openssl spkac -in spkac.cnf
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +0000108
109Verify the signature of an SPKAC:
110
Ulf Möller19d2bb52000-01-07 01:39:59 +0000111 openssl spkac -in spkac.cnf -noout -verify
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +0000112
113Create an SPKAC using the challenge string "hello":
114
115 openssl spkac -key key.pem -challenge hello -out spkac.cnf
116
117Example of an SPKAC, (long lines split up for clarity):
118
119 SPKAC=MIG5MGUwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA1cCoq2Wa3Ixs47uI7F\
120 PVwHVIPDx5yso105Y6zpozam135a8R0CpoRvkkigIyXfcCjiVi5oWk+6FfPaD03u\
121 PFoQIDAQABFgVoZWxsbzANBgkqhkiG9w0BAQQFAANBAFpQtY/FojdwkJh1bEIYuc\
122 2EeM2KHTWPEepWYeawvHD0gQ3DngSC75YCWnnDdq+NQ3F+X4deMx9AaEglZtULwV\
123 4=
124
125=head1 NOTES
126
127A created SPKAC with suitable DN components appended can be fed into
128the B<ca> utility.
129
130SPKACs are typically generated by Netscape when a form is submitted
131containing the B<KEYGEN> tag as part of the certificate enrollment
132process.
133
134The challenge string permits a primitive form of proof of possession
135of private key. By checking the SPKAC signature and a random challenge
136string some guarantee is given that the user knows the private key
137corresponding to the public key being certified. This is important in
138some applications. Without this it is possible for a previous SPKAC
139to be used in a "replay attack".
140
141=head1 SEE ALSO
142
Rich Salz9b869742015-08-17 15:21:33 -0400143L<ca(1)>
Dr. Stephen Henson01aad2c1999-11-12 14:04:41 +0000144
Rich Salze2f92612016-05-18 11:44:05 -0400145=head1 COPYRIGHT
146
Paulic4de0742017-03-30 07:38:30 +1000147Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
Rich Salze2f92612016-05-18 11:44:05 -0400148
149Licensed under the OpenSSL license (the "License"). You may not use
150this file except in compliance with the License. You can obtain a copy
151in the file LICENSE in the source distribution or at
152L<https://www.openssl.org/source/license.html>.
153
154=cut