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