5 openssl-s_time - SSL/TLS performance timing program
11 [B<-connect host:port>]
15 [B<-CApath directory>]
30 [B<-cipher cipherlist>]
31 [B<-ciphersuites val>]
35 The B<s_time> command implements a generic SSL/TLS client which connects to a
36 remote host using SSL/TLS. It can request a page from the server and includes
37 the time to transfer the payload data in its timing measurements. It measures
38 the number of connections within a given timeframe, the amount of data
39 transferred (if any), and calculates the average time spent for one connection.
47 Print out a usage message.
49 =item B<-connect host:port>
51 This specifies the host and optional port to connect to.
55 This specifies the page to GET from the server. A value of '/' gets the
56 index.htm[l] page. If this parameter is not specified, then B<s_time> will only
57 perform the handshake to establish SSL connections but not transfer any
60 =item B<-cert certname>
62 The certificate to use, if one is requested by the server. The default is
63 not to use a certificate. The file is in PEM format.
67 The private key to use. If not specified then the certificate file will
68 be used. The file is in PEM format.
70 =item B<-verify depth>
72 The verify depth to use. This specifies the maximum length of the
73 server certificate chain and turns on server certificate verification.
74 Currently the verify operation continues after errors so all the problems
75 with a certificate chain can be seen. As a side effect the connection
76 will never fail due to a server certificate verify failure.
78 =item B<-nameopt option>
80 Option which determines how the subject or issuer names are displayed. The
81 B<option> argument can be a single option or multiple options separated by
82 commas. Alternatively the B<-nameopt> switch may be used more than once to
83 set multiple options. See the L<x509(1)> manual page for details.
85 =item B<-CApath directory>
87 The directory to use for server certificate verification. This directory
88 must be in "hash format", see B<verify> for more information. These are
89 also used when building the client certificate chain.
93 A file containing trusted certificates to use during server authentication
94 and to use when attempting to build the client certificate chain.
98 Do not load the trusted CA certificates from the default file location
102 Do not load the trusted CA certificates from the default directory location
106 Performs the timing test using a new session ID for each connection.
107 If neither B<-new> nor B<-reuse> are specified, they are both on by default
108 and executed in sequence.
112 Performs the timing test using the same session ID; this can be used as a test
113 that session caching is working. If neither B<-new> nor B<-reuse> are
114 specified, they are both on by default and executed in sequence.
116 =item B<-ssl3>, B<-tls1>, B<-tls1_1>, B<-tls1_2>, B<-tls1_3>
118 These options enable specific SSL or TLS protocol versions for the handshake
119 initiated by B<s_time>.
120 By default B<s_time> negotiates the highest mutually supported protocol
122 Note that not all protocols and flags may be available, depending on how
127 There are several known bugs in SSL and TLS implementations. Adding this
128 option enables various workarounds.
130 =item B<-cipher cipherlist>
132 This allows the TLSv1.2 and below cipher list sent by the client to be modified.
133 This list will be combined with any TLSv1.3 ciphersuites that have been
134 configured. Although the server determines which cipher suite is used it should
135 take the first supported cipher in the list sent by the client. See
136 L<ciphers(1)> for more information.
138 =item B<-ciphersuites val>
140 This allows the TLSv1.3 ciphersuites sent by the client to be modified. This
141 list will be combined with any TLSv1.2 and below ciphersuites that have been
142 configured. Although the server determines which cipher suite is used it should
143 take the first supported cipher in the list sent by the client. See
144 L<ciphers(1)> for more information. The format for this list is a simple
145 colon (":") separated list of TLSv1.3 ciphersuite names.
147 =item B<-time length>
149 Specifies how long (in seconds) B<s_time> should establish connections and
150 optionally transfer payload data from a server. Server and client performance
151 and the link speed determine how many connections B<s_time> can establish.
157 B<s_time> can be used to measure the performance of an SSL connection.
158 To connect to an SSL HTTP server and get the default page the command
160 openssl s_time -connect servername:443 -www / -CApath yourdir -CAfile yourfile.pem -cipher commoncipher [-ssl3]
162 would typically be used (https uses port 443). 'commoncipher' is a cipher to
163 which both client and server can agree, see the L<ciphers(1)> command
166 If the handshake fails then there are several possible causes, if it is
167 nothing obvious like no client certificate then the B<-bugs> and
168 B<-ssl3> options can be tried
169 in case it is a buggy server. In particular you should play with these
170 options B<before> submitting a bug report to an OpenSSL mailing list.
172 A frequent problem when attempting to get client certificates working
173 is that a web client complains it has no certificates or gives an empty
174 list to choose from. This is normally because the server is not sending
175 the clients certificate authority in its "acceptable CA list" when it
176 requests a certificate. By using L<s_client(1)> the CA list can be
177 viewed and checked. However some servers only request client authentication
178 after a specific URL is requested. To obtain the list in this case it
179 is necessary to use the B<-prexit> option of L<s_client(1)> and
180 send an HTTP request for an appropriate page.
182 If a certificate is specified on the command line using the B<-cert>
183 option it will not be used unless the server specifically requests
184 a client certificate. Therefor merely including a client certificate
185 on the command line is no guarantee that the certificate works.
189 Because this program does not have all the options of the
190 L<s_client(1)> program to turn protocols on and off, you may not be
191 able to measure the performance of all protocols with all servers.
193 The B<-verify> option should really exit if the server verification
199 L<openssl-s_client(1)>,
200 L<openssl-s_server(1)>,
201 L<openssl-ciphers(1)>
205 Copyright 2004-2019 The OpenSSL Project Authors. All Rights Reserved.
207 Licensed under the Apache License 2.0 (the "License"). You may not use
208 this file except in compliance with the License. You can obtain a copy
209 in the file LICENSE in the source distribution or at
210 L<https://www.openssl.org/source/license.html>.