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