]> git.proxmox.com Git - mirror_ovs.git/blame - utilities/ovs-pki.8.in
ofproto: Add pipeline fields support for OF 1.5 packet-out
[mirror_ovs.git] / utilities / ovs-pki.8.in
CommitLineData
91005f03
BP
1.de IQ
2. br
3. ns
4. IP "\\$1"
5..
d2cb6c95 6.TH ovs\-pki 8 "@VERSION@" "Open vSwitch" "Open vSwitch Manual"
064af421
BP
7
8.SH NAME
9ovs\-pki \- OpenFlow public key infrastructure management utility
10
11.SH SYNOPSIS
2562714a
BP
12Each command takes the form:
13.sp
2f446d10 14\fBovs\-pki\fR [\fIoptions\fR] \fIcommand\fR [\fIargs\fR]
064af421 15.sp
2562714a 16The implemented commands and their arguments are:
064af421
BP
17.br
18\fBovs\-pki\fR \fBinit\fR
19.br
2f446d10 20\fBovs\-pki\fR \fBreq\fR \fIname\fR
064af421 21.br
2f446d10 22\fBovs\-pki\fR \fBsign\fR \fIname\fR [\fItype\fR]
064af421 23.br
2f446d10 24\fBovs\-pki\fR \fBreq+sign\fR \fIname\fR [\fItype\fR]
064af421 25.br
2f446d10 26\fBovs\-pki\fR \fBverify\fR \fIname\fR [\fItype\fR]
064af421 27.br
2f446d10 28\fBovs\-pki\fR \fBfingerprint\fR \fIfile\fR
064af421 29.br
2f446d10 30\fBovs\-pki\fR \fBself\-sign\fR \fIname\fR
064af421 31.sp
2f446d10 32Each \fItype\fR above is a certificate type, either \fBswitch\fR
064af421
BP
33(default) or \fBcontroller\fR.
34.sp
35The available options are:
36.br
37[\fB\-k\fR \fItype\fR | \fB\-\^\-key=\fItype\fR]
c8ab9375 38.br
064af421 39[\fB\-B\fR \fInbits\fR | \fB\-\^\-bits=\fInbits\fR]
c8ab9375 40.br
064af421 41[\fB\-D\fR \fIfile\fR | \fB\-\^\-dsaparam=\fIfile\fR]
c8ab9375 42.br
064af421 43[\fB\-b\fR | \fB\-\^\-batch\fR]
c8ab9375 44.br
064af421 45[\fB\-f\fR | \fB\-\^\-force\fR]
c8ab9375 46.br
064af421 47[\fB\-d\fR \fIdir\fR | \fB\-\^\-dir=\fR\fIdir\fR]
c8ab9375 48.br
064af421 49[\fB\-l\fR \fIfile\fR | \fB\-\^\-log=\fIfile\fR]
064af421 50.br
674ebdd1
LR
51[\fB\-u\fR | \fB\-\^\-unique\fR]
52.br
c8ab9375
BP
53[\fB\-h\fR | \fB\-\^\-help\fR]
54.sp
064af421
BP
55Some options do not apply to every command.
56
57.SH DESCRIPTION
58The \fBovs\-pki\fR program sets up and manages a public key
59infrastructure for use with OpenFlow. It is intended to be a simple
60interface for organizations that do not have an established public key
61infrastructure. Other PKI tools can substitute for or supplement the
62use of \fBovs\-pki\fR.
63
64\fBovs\-pki\fR uses \fBopenssl\fR(1) for certificate management and key
65generation.
66
67.SH "OFFLINE COMMANDS"
68
69The following \fBovs\-pki\fR commands support manual PKI
70administration:
71
72.TP
73\fBinit\fR
74Initializes a new PKI (by default in directory \fB@PKIDIR@\fR) and populates
75it with a pair of certificate authorities for controllers and
76switches.
77
78This command should ideally be run on a high\-security machine separate
79from any OpenFlow controller or switch, called the CA machine. The
80files \fBpki/controllerca/cacert.pem\fR and
81\fBpki/switchca/cacert.pem\fR that it produces will need to be copied
82over to the OpenFlow switches and controllers, respectively. Their
83contents may safely be made public.
84
85By default, \fBovs\-pki\fR generates 2048\-bit RSA keys. The \fB\-B\fR
86or \fB\-\^\-bits\fR option (see below) may be used to override the key
87length. The \fB\-k dsa\fR or \fB\-\^\-key=dsa\fR option may be used to use
88DSA in place of RSA. If DSA is selected, the \fBdsaparam.pem\fR file
89generated in the new PKI hierarchy must be copied to any machine on
90which the \fBreq\fR command (see below) will be executed. Its
91contents may safely be made public.
92
93Other files generated by \fBinit\fR may remain on the CA machine.
94The files \fBpki/controllerca/private/cakey.pem\fR and
95\fBpki/switchca/private/cakey.pem\fR have particularly sensitive
96contents that should not be exposed.
97
98.TP
2f446d10
BP
99\fBreq\fR \fIname\fR
100Generates a new private key named \fIname\fR\fB\-privkey.pem\fR and
101corresponding certificate request named \fIname\fR\fB\-req.pem\fR.
064af421
BP
102The private key can be intended for use by a switch or a controller.
103
104This command should ideally be run on the switch or controller that
105will use the private key to identify itself. The file
2f446d10 106\fIname\fR\fB\-req.pem\fR must be copied to the CA machine for signing
064af421
BP
107with the \fBsign\fR command (below).
108
109This command will output a fingerprint to stdout as its final step.
110Write down the fingerprint and take it to the CA machine before
111continuing with the \fBsign\fR step.
112
113When RSA keys are in use (as is the default), \fBreq\fR, unlike the
114rest of \fBovs\-pki\fR's commands, does not need access to a PKI
115hierarchy created by \fBovs\-pki init\fR. The \fB\-B\fR or
116\fB\-\^\-bits\fR option (see below) may be used to specify the number of
117bits in the generated RSA key.
118
119When DSA keys are used (as specified with \fB\-\^\-key=dsa\fR), \fBreq\fR
120needs access to the \fBdsaparam.pem\fR file created as part of the PKI
121hierarchy (but not to other files in that tree). By default,
122\fBovs\-pki\fR looks for this file in \fB@PKIDIR@/dsaparam.pem\fR, but
123the \fB\-D\fR or \fB\-\^\-dsaparam\fR option (see below) may be used to
124specify an alternate location.
125
2f446d10
BP
126\fIname\fR\fB\-privkey.pem\fR has sensitive contents that should not be
127exposed. \fIname\fR\fB\-req.pem\fR may be safely made public.
064af421
BP
128
129.TP
2f446d10
BP
130\fBsign\fR \fIname\fR [\fItype\fR]
131Signs the certificate request named \fIname\fR\fB\-req.pem\fR that was
064af421 132produced in the previous step, producing a certificate named
2f446d10 133\fIname\fR\fB\-cert.pem\fR. \fItype\fR, either \fBswitch\fR (default) or
064af421
BP
134\fBcontroller\fR, indicates the use for which the key is being
135certified.
136
137This command must be run on the CA machine.
138
139The command will output a fingerprint to stdout and request that you
140verify that it is the same fingerprint output by the \fBreq\fR
141command. This ensures that the request being signed is the same one
142produced by \fBreq\fR. (The \fB\-b\fR or \fB\-\^\-batch\fR option
143suppresses the verification step.)
144
2f446d10 145The file \fIname\fR\fB\-cert.pem\fR will need to be copied back to the
064af421
BP
146switch or controller for which it is intended. Its contents may
147safely be made public.
148
149.TP
2f446d10 150\fBreq+sign\fR \fIname\fR [\fItype\fR]
064af421
BP
151Combines the \fBreq\fR and \fBsign\fR commands into a single step,
152outputting all the files produced by each. The
2f446d10 153\fIname\fR\fB\-privkey.pem\fR and \fIname\fR\fB\-cert.pem\fR files must
064af421 154be copied securely to the switch or controller.
2f446d10 155\fIname\fR\fB\-privkey.pem\fR has sensitive contents and must not be
064af421
BP
156exposed in transit. Afterward, it should be deleted from the CA
157machine.
158
159This combined method is, theoretically, less secure than the
160individual steps performed separately on two different machines,
161because there is additional potential for exposure of the private
162key. However, it is also more convenient.
163
164.TP
2f446d10
BP
165\fBverify\fR \fIname\fR [\fItype\fR]
166Verifies that \fIname\fR\fB\-cert.pem\fR is a valid certificate for the
167given \fItype\fR of use, either \fBswitch\fR (default) or
064af421 168\fBcontroller\fR. If the certificate is valid for this use, it prints
2f446d10 169the message ``\fIname\fR\fB\-cert.pem\fR: OK''; otherwise, it prints an
064af421
BP
170error message.
171
172.TP
2f446d10
BP
173\fBfingerprint\fR \fIfile\fR
174Prints the fingerprint for \fIfile\fR. If \fIfile\fR is a
064af421
BP
175certificate, then this is the SHA\-1 digest of the DER encoded version
176of the certificate; otherwise, it is the SHA\-1 digest of the entire
177file.
178
179.TP
2f446d10
BP
180\fBself\-sign\fR \fIname\fR
181Signs the certificate request named \fIname\fB\-req.pem\fR using the
182private key \fIname\fB\-privkey.pem\fR, producing a self-signed
183certificate named \fIname\fB\-cert.pem\fR. The input files should have
064af421
BP
184been produced with \fBovs\-pki req\fR.
185
186Some controllers accept such self-signed certificates.
187
064af421 188.SH OPTIONS
91005f03
BP
189.IP "\fB\-k\fR \fItype\fR"
190.IQ "\fB\-\^\-key=\fItype\fR"
064af421
BP
191For the \fBinit\fR command, sets the public key algorithm to use for
192the new PKI hierarchy. For the \fBreq\fR and \fBreq+sign\fR commands,
193sets the public key algorithm to use for the key to be generated,
194which must match the value specified on \fBinit\fR. With other
195commands, the value has no effect.
196
197The \fItype\fR may be \fBrsa\fR (the default) or \fBdsa\fR.
198
91005f03
BP
199.IP "\fB\-B\fR \fInbits\fR"
200.IQ "\fB\-\^\-bits=\fInbits\fR"
064af421
BP
201Sets the number of bits in the key to be generated. When RSA keys are
202in use, this option affects only the \fBinit\fR, \fBreq\fR, and
203\fBreq+sign\fR commands, and the same value should be given each time.
204With DSA keys are in use, this option affects only the \fBinit\fR
205command.
206
207The value must be at least 1024. The default is 2048.
208
91005f03
BP
209.IP "\fB\-D\fR \fIfile\fR"
210.IQ "\fB\-\^\-dsaparam=\fIfile\fR"
064af421
BP
211Specifies an alternate location for the \fBdsaparam.pem\fR file
212required by the \fBreq\fR and \fBreq+sign\fR commands. This option
213affects only these commands, and only when DSA keys are used.
214
215The default is \fBdsaparam.pem\fR under the PKI hierarchy.
216
91005f03
BP
217.IP "\fB\-b\fR"
218.IQ "\fB\-\^\-batch\fR"
064af421 219Suppresses the interactive verification of fingerprints that the
2562714a 220\fBsign\fR command by default requires.
064af421 221
91005f03
BP
222.IP "\fB\-d\fR \fIdir\fR"
223.IQ "\fB\-\^\-dir=\fR\fIdir\fR"
064af421
BP
224Specifies the location of the PKI hierarchy to be used or created by
225the command (default: \fB@PKIDIR@\fR). All commands, except \fBreq\fR,
226need access to a PKI hierarchy.
227
91005f03
BP
228.IP "\fB\-f\fR"
229.IQ "\fB\-\^\-force\fR"
064af421
BP
230By default, \fBovs\-pki\fR will not overwrite existing files or
231directories. This option overrides this behavior.
232
91005f03
BP
233.IP "\fB\-l\fR \fIfile\fR"
234.IQ "\fB\-\^\-log=\fIfile\fR"
064af421
BP
235Sets the log file to \fIfile\fR. Default:
236\fB@LOGDIR@/ovs\-pki.log\fR.
237
674ebdd1
LR
238.IP "\fB\-u\fR"
239.IQ "\fB\-\^\-unique\fR"
240Changes the format of the certificate's Common Name (CN) field; by
241default, this field has the format "<name> id:<uuid-or-date>", this
242option causes the provided name to be treated as unique and changes
243the format of the CN field to be simply "<name>".
244
91005f03
BP
245.IP "\fB\-h\fR"
246.IQ "\fB\-\^\-help\fR"
064af421 247Prints a help usage message and exits.