Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 1 | =pod |
| 2 | |
| 3 | =head1 NAME |
| 4 | |
Rich Salz | 3f2181e | 2017-10-18 15:33:56 -0400 | [diff] [blame] | 5 | openssl-spkac, |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 6 | spkac - SPKAC printing and generating utility |
| 7 | |
| 8 | =head1 SYNOPSIS |
| 9 | |
| 10 | B<openssl> B<spkac> |
A J Mohan Rao | 169394d | 2016-02-05 11:58:45 -0500 | [diff] [blame] | 11 | [B<-help>] |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 12 | [B<-in filename>] |
| 13 | [B<-out filename>] |
| 14 | [B<-key keyfile>] |
Luke Faraone | 66e5970 | 2017-05-15 18:23:17 -0700 | [diff] [blame] | 15 | [B<-keyform PEM|DER|ENGINE>] |
Dr. Stephen Henson | a3fe382 | 2000-02-16 23:16:01 +0000 | [diff] [blame] | 16 | [B<-passin arg>] |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 17 | [B<-challenge string>] |
Dr. Stephen Henson | 82fc1d9 | 2000-02-03 02:56:48 +0000 | [diff] [blame] | 18 | [B<-pubkey>] |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 19 | [B<-spkac spkacname>] |
| 20 | [B<-spksect section>] |
| 21 | [B<-noout>] |
| 22 | [B<-verify>] |
Richard Levitte | bfa3555 | 2003-01-30 22:02:27 +0000 | [diff] [blame] | 23 | [B<-engine id>] |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 24 | |
| 25 | =head1 DESCRIPTION |
| 26 | |
| 27 | The B<spkac> command processes Netscape signed public key and challenge |
| 28 | (SPKAC) files. It can print out their contents, verify the signature and |
| 29 | produce its own SPKACs from a supplied private key. |
| 30 | |
Rich Salz | 3dfda1a | 2016-12-12 11:14:40 -0500 | [diff] [blame] | 31 | =head1 OPTIONS |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 32 | |
| 33 | =over 4 |
| 34 | |
A J Mohan Rao | 169394d | 2016-02-05 11:58:45 -0500 | [diff] [blame] | 35 | =item B<-help> |
| 36 | |
| 37 | Print out a usage message. |
| 38 | |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 39 | =item B<-in filename> |
| 40 | |
| 41 | This specifies the input filename to read from or standard input if this |
| 42 | option is not specified. Ignored if the B<-key> option is used. |
| 43 | |
| 44 | =item B<-out filename> |
| 45 | |
Pauli | c4de074 | 2017-03-30 07:38:30 +1000 | [diff] [blame] | 46 | Specifies the output filename to write to or standard output by |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 47 | default. |
| 48 | |
| 49 | =item B<-key keyfile> |
| 50 | |
Pauli | c4de074 | 2017-03-30 07:38:30 +1000 | [diff] [blame] | 51 | Create an SPKAC file using the private key in B<keyfile>. The |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 52 | B<-in>, B<-noout>, B<-spksect> and B<-verify> options are ignored if |
| 53 | present. |
| 54 | |
Luke Faraone | 66e5970 | 2017-05-15 18:23:17 -0700 | [diff] [blame] | 55 | =item B<-keyform PEM|DER|ENGINE> |
| 56 | |
| 57 | Whether the key format is PEM, DER, or an engine-backed key. |
| 58 | The default is PEM. |
| 59 | |
Dr. Stephen Henson | f07fb9b | 2000-02-08 01:34:59 +0000 | [diff] [blame] | 60 | =item B<-passin password> |
| 61 | |
Pauli | c4de074 | 2017-03-30 07:38:30 +1000 | [diff] [blame] | 62 | The input file password source. For more information about the format of B<arg> |
Rich Salz | 9b86974 | 2015-08-17 15:21:33 -0400 | [diff] [blame] | 63 | see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>. |
Dr. Stephen Henson | f07fb9b | 2000-02-08 01:34:59 +0000 | [diff] [blame] | 64 | |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 65 | =item B<-challenge string> |
| 66 | |
Pauli | c4de074 | 2017-03-30 07:38:30 +1000 | [diff] [blame] | 67 | Specifies the challenge string if an SPKAC is being created. |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 68 | |
| 69 | =item B<-spkac spkacname> |
| 70 | |
Pauli | c4de074 | 2017-03-30 07:38:30 +1000 | [diff] [blame] | 71 | Allows an alternative name form the variable containing the |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 72 | SPKAC. The default is "SPKAC". This option affects both |
| 73 | generated and input SPKAC files. |
| 74 | |
| 75 | =item B<-spksect section> |
| 76 | |
Pauli | c4de074 | 2017-03-30 07:38:30 +1000 | [diff] [blame] | 77 | Allows an alternative name form the section containing the |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 78 | SPKAC. The default is the default section. |
| 79 | |
| 80 | =item B<-noout> |
| 81 | |
Pauli | c4de074 | 2017-03-30 07:38:30 +1000 | [diff] [blame] | 82 | Don't output the text version of the SPKAC (not used if an |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 83 | SPKAC is being created). |
| 84 | |
Dr. Stephen Henson | 82fc1d9 | 2000-02-03 02:56:48 +0000 | [diff] [blame] | 85 | =item B<-pubkey> |
| 86 | |
Pauli | c4de074 | 2017-03-30 07:38:30 +1000 | [diff] [blame] | 87 | Output the public key of an SPKAC (not used if an SPKAC is |
Dr. Stephen Henson | 82fc1d9 | 2000-02-03 02:56:48 +0000 | [diff] [blame] | 88 | being created). |
| 89 | |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 90 | =item B<-verify> |
| 91 | |
Pauli | c4de074 | 2017-03-30 07:38:30 +1000 | [diff] [blame] | 92 | Verifies the digital signature on the supplied SPKAC. |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 93 | |
Richard Levitte | bfa3555 | 2003-01-30 22:02:27 +0000 | [diff] [blame] | 94 | =item B<-engine id> |
| 95 | |
Pauli | c4de074 | 2017-03-30 07:38:30 +1000 | [diff] [blame] | 96 | Specifying an engine (by its unique B<id> string) will cause B<spkac> |
Richard Levitte | bfa3555 | 2003-01-30 22:02:27 +0000 | [diff] [blame] | 97 | to attempt to obtain a functional reference to the specified engine, |
| 98 | thus initialising it if needed. The engine will then be set as the default |
| 99 | for all available algorithms. |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 100 | |
| 101 | =back |
| 102 | |
| 103 | =head1 EXAMPLES |
| 104 | |
| 105 | Print out the contents of an SPKAC: |
| 106 | |
Ulf Möller | 19d2bb5 | 2000-01-07 01:39:59 +0000 | [diff] [blame] | 107 | openssl spkac -in spkac.cnf |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 108 | |
| 109 | Verify the signature of an SPKAC: |
| 110 | |
Ulf Möller | 19d2bb5 | 2000-01-07 01:39:59 +0000 | [diff] [blame] | 111 | openssl spkac -in spkac.cnf -noout -verify |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 112 | |
| 113 | Create an SPKAC using the challenge string "hello": |
| 114 | |
| 115 | openssl spkac -key key.pem -challenge hello -out spkac.cnf |
| 116 | |
| 117 | Example 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 | |
| 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 | |
Rich Salz | 9b86974 | 2015-08-17 15:21:33 -0400 | [diff] [blame] | 143 | L<ca(1)> |
Dr. Stephen Henson | 01aad2c | 1999-11-12 14:04:41 +0000 | [diff] [blame] | 144 | |
Rich Salz | e2f9261 | 2016-05-18 11:44:05 -0400 | [diff] [blame] | 145 | =head1 COPYRIGHT |
| 146 | |
Pauli | c4de074 | 2017-03-30 07:38:30 +1000 | [diff] [blame] | 147 | Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved. |
Rich Salz | e2f9261 | 2016-05-18 11:44:05 -0400 | [diff] [blame] | 148 | |
| 149 | Licensed under the OpenSSL license (the "License"). You may not use |
| 150 | this file except in compliance with the License. You can obtain a copy |
| 151 | in the file LICENSE in the source distribution or at |
| 152 | L<https://www.openssl.org/source/license.html>. |
| 153 | |
| 154 | =cut |