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