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