]> git.ipfire.org Git - thirdparty/openssl.git/blob - doc/man1/openssl-s_time.pod
Add '=for comment ifdef' to pod pages
[thirdparty/openssl.git] / doc / man1 / openssl-s_time.pod
1 =pod
2
3 =head1 NAME
4
5 openssl-s_time - SSL/TLS performance timing program
6
7 =head1 SYNOPSIS
8
9 B<openssl> B<s_time>
10 [B<-help>]
11 [B<-connect> I<host:port>]
12 [B<-www> I<page>]
13 [B<-cert> I<filename>]
14 [B<-key> I<filename>]
15 [B<-CApath> I<directory>]
16 [B<-cafile> I<filename>]
17 [B<-no-CAfile>]
18 [B<-no-CApath>]
19 [B<-reuse>]
20 [B<-new>]
21 [B<-verify> I<depth>]
22 [B<-nameopt> I<option>]
23 [B<-time> I<seconds>]
24 [B<-ssl3>]
25 [B<-tls1>]
26 [B<-tls1_1>]
27 [B<-tls1_2>]
28 [B<-tls1_3>]
29 [B<-bugs>]
30 [B<-cipher> I<cipherlist>]
31 [B<-ciphersuites> I<val>]
32
33 =for comment ifdef ssl3 tls1 tls1_1 tls1_2 tls1_3
34
35 =head1 DESCRIPTION
36
37 The B<s_time> command implements a generic SSL/TLS client which connects to a
38 remote host using SSL/TLS. It can request a page from the server and includes
39 the time to transfer the payload data in its timing measurements. It measures
40 the number of connections within a given timeframe, the amount of data
41 transferred (if any), and calculates the average time spent for one connection.
42
43 =head1 OPTIONS
44
45 =over 4
46
47 =item B<-help>
48
49 Print out a usage message.
50
51 =item B<-connect> I<host:port>
52
53 This specifies the host and optional port to connect to.
54
55 =item B<-www> I<page>
56
57 This specifies the page to GET from the server. A value of '/' gets the
58 index.htm[l] page. If this parameter is not specified, then B<s_time> will only
59 perform the handshake to establish SSL connections but not transfer any
60 payload data.
61
62 =item B<-cert> I<certname>
63
64 The certificate to use, if one is requested by the server. The default is
65 not to use a certificate. The file is in PEM format.
66
67 =item B<-key> I<keyfile>
68
69 The private key to use. If not specified then the certificate file will
70 be used. The file is in PEM format.
71
72 =item B<-verify> I<depth>
73
74 The verify depth to use. This specifies the maximum length of the
75 server certificate chain and turns on server certificate verification.
76 Currently the verify operation continues after errors so all the problems
77 with a certificate chain can be seen. As a side effect the connection
78 will never fail due to a server certificate verify failure.
79
80 =item B<-nameopt> I<option>
81
82 Option which determines how the subject or issuer names are displayed. The
83 B<option> argument can be a single option or multiple options separated by
84 commas. Alternatively the B<-nameopt> switch may be used more than once to
85 set multiple options. See the L<x509(1)> manual page for details.
86
87 =item B<-CApath> I<directory>
88
89 The directory to use for server certificate verification. This directory
90 must be in "hash format", see B<verify> for more information. These are
91 also used when building the client certificate chain.
92
93 =item B<-CAfile> I<file>
94
95 A file containing trusted certificates to use during server authentication
96 and to use when attempting to build the client certificate chain.
97
98 =item B<-no-CAfile>
99
100 Do not load the trusted CA certificates from the default file location
101
102 =item B<-no-CApath>
103
104 Do not load the trusted CA certificates from the default directory location
105
106 =item B<-new>
107
108 Performs the timing test using a new session ID for each connection.
109 If neither B<-new> nor B<-reuse> are specified, they are both on by default
110 and executed in sequence.
111
112 =item B<-reuse>
113
114 Performs the timing test using the same session ID; this can be used as a test
115 that session caching is working. If neither B<-new> nor B<-reuse> are
116 specified, they are both on by default and executed in sequence.
117
118 =item B<-ssl3>, B<-tls1>, B<-tls1_1>, B<-tls1_2>, B<-tls1_3>
119
120 These options enable specific SSL or TLS protocol versions for the handshake
121 initiated by B<s_time>.
122 By default B<s_time> negotiates the highest mutually supported protocol
123 version.
124 Note that not all protocols and flags may be available, depending on how
125 OpenSSL was built.
126
127 =item B<-bugs>
128
129 There are several known bugs in SSL and TLS implementations. Adding this
130 option enables various workarounds.
131
132 =item B<-cipher> I<cipherlist>
133
134 This allows the TLSv1.2 and below cipher list sent by the client to be modified.
135 This list will be combined with any TLSv1.3 ciphersuites that have been
136 configured. Although the server determines which cipher suite is used it should
137 take the first supported cipher in the list sent by the client. See
138 L<ciphers(1)> for more information.
139
140 =item B<-ciphersuites> I<val>
141
142 This allows the TLSv1.3 ciphersuites sent by the client to be modified. This
143 list will be combined with any TLSv1.2 and below ciphersuites that have been
144 configured. Although the server determines which cipher suite is used it should
145 take the first supported cipher in the list sent by the client. See
146 L<ciphers(1)> for more information. The format for this list is a simple
147 colon (":") separated list of TLSv1.3 ciphersuite names.
148
149 =item B<-time> I<length>
150
151 Specifies how long (in seconds) B<s_time> should establish connections and
152 optionally transfer payload data from a server. Server and client performance
153 and the link speed determine how many connections B<s_time> can establish.
154
155 =back
156
157 =head1 NOTES
158
159 B<s_time> can be used to measure the performance of an SSL connection.
160 To connect to an SSL HTTP server and get the default page the command
161
162 openssl s_time -connect servername:443 -www / -CApath yourdir -CAfile yourfile.pem -cipher commoncipher [-ssl3]
163
164 would typically be used (https uses port 443). 'commoncipher' is a cipher to
165 which both client and server can agree, see the L<ciphers(1)> command
166 for details.
167
168 If the handshake fails then there are several possible causes, if it is
169 nothing obvious like no client certificate then the B<-bugs> and
170 B<-ssl3> options can be tried
171 in case it is a buggy server. In particular you should play with these
172 options B<before> submitting a bug report to an OpenSSL mailing list.
173
174 A frequent problem when attempting to get client certificates working
175 is that a web client complains it has no certificates or gives an empty
176 list to choose from. This is normally because the server is not sending
177 the clients certificate authority in its "acceptable CA list" when it
178 requests a certificate. By using L<s_client(1)> the CA list can be
179 viewed and checked. However some servers only request client authentication
180 after a specific URL is requested. To obtain the list in this case it
181 is necessary to use the B<-prexit> option of L<s_client(1)> and
182 send an HTTP request for an appropriate page.
183
184 If a certificate is specified on the command line using the B<-cert>
185 option it will not be used unless the server specifically requests
186 a client certificate. Therefor merely including a client certificate
187 on the command line is no guarantee that the certificate works.
188
189 =head1 BUGS
190
191 Because this program does not have all the options of the
192 L<s_client(1)> program to turn protocols on and off, you may not be
193 able to measure the performance of all protocols with all servers.
194
195 The B<-verify> option should really exit if the server verification
196 fails.
197
198 =head1 SEE ALSO
199
200 L<openssl(1)>,
201 L<openssl-s_client(1)>,
202 L<openssl-s_server(1)>,
203 L<openssl-ciphers(1)>
204
205 =head1 COPYRIGHT
206
207 Copyright 2004-2019 The OpenSSL Project Authors. All Rights Reserved.
208
209 Licensed under the Apache License 2.0 (the "License"). You may not use
210 this file except in compliance with the License. You can obtain a copy
211 in the file LICENSE in the source distribution or at
212 L<https://www.openssl.org/source/license.html>.
213
214 =cut