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