]> git.ipfire.org Git - thirdparty/openssl.git/blob - doc/man1/openssl-s_time.pod.in
Infrastructure for templated doc in POD files
[thirdparty/openssl.git] / doc / man1 / openssl-s_time.pod.in
1 =pod
2
3 =begin comment
4 {- join("\n", @autowarntext) -}
5
6 =end comment
7
8 =head1 NAME
9
10 openssl-s_time - SSL/TLS performance timing program
11
12 =head1 SYNOPSIS
13
14 B<openssl> B<s_time>
15 [B<-help>]
16 [B<-connect> I<host>:I<port>]
17 [B<-www> I<page>]
18 [B<-cert> I<filename>]
19 [B<-key> I<filename>]
20 [B<-reuse>]
21 [B<-new>]
22 [B<-verify> I<depth>]
23 [B<-nameopt> I<option>]
24 [B<-time> I<seconds>]
25 [B<-ssl3>]
26 [B<-tls1>]
27 [B<-tls1_1>]
28 [B<-tls1_2>]
29 [B<-tls1_3>]
30 [B<-bugs>]
31 [B<-cipher> I<cipherlist>]
32 [B<-ciphersuites> I<val>]
33 {- $OpenSSL::safe::opt_trust_synopsis -}
34
35 =for openssl ifdef ssl3 tls1 tls1_1 tls1_2 tls1_3
36
37 =head1 DESCRIPTION
38
39 This command implements a generic SSL/TLS client which
40 connects to a remote host using SSL/TLS. It can request a page from the server
41 and includes the time to transfer the payload data in its timing measurements.
42 It measures the number of connections within a given timeframe, the amount of
43 data transferred (if any), and calculates the average time spent for one
44 connection.
45
46 =head1 OPTIONS
47
48 =over 4
49
50 =item B<-help>
51
52 Print out a usage message.
53
54 =item B<-connect> I<host>:I<port>
55
56 This specifies the host and optional port to connect to.
57
58 =item B<-www> I<page>
59
60 This specifies the page to GET from the server. A value of '/' gets the
61 F<index.html> page. If this parameter is not specified, then this command
62 will only perform the handshake to establish SSL connections but not transfer
63 any payload data.
64
65 =item B<-cert> I<certname>
66
67 The certificate to use, if one is requested by the server. The default is
68 not to use a certificate. The file is in PEM format.
69
70 =item B<-key> I<keyfile>
71
72 The private key to use. If not specified then the certificate file will
73 be used. The file is in PEM format.
74
75 =item B<-verify> I<depth>
76
77 The verify depth to use. This specifies the maximum length of the
78 server certificate chain and turns on server certificate verification.
79 Currently the verify operation continues after errors so all the problems
80 with a certificate chain can be seen. As a side effect the connection
81 will never fail due to a server certificate verify failure.
82
83 =item B<-nameopt> I<option>
84
85 Option which determines how the subject or issuer names are displayed. The
86 I<option> argument can be a single option or multiple options separated by
87 commas. Alternatively the B<-nameopt> switch may be used more than once to
88 set multiple options. See the L<openssl-x509(1)> manual page for details.
89
90 =item B<-CApath> I<directory>
91
92 The directory to use for server certificate verification. This directory
93 must be in "hash format", see L<openssl-verify(1)> for more information.
94 These are also used when building the client certificate chain.
95
96 =item B<-new>
97
98 Performs the timing test using a new session ID for each connection.
99 If neither B<-new> nor B<-reuse> are specified, they are both on by default
100 and executed in sequence.
101
102 =item B<-reuse>
103
104 Performs the timing test using the same session ID; this can be used as a test
105 that session caching is working. If neither B<-new> nor B<-reuse> are
106 specified, they are both on by default and executed in sequence.
107
108 =item B<-ssl3>, B<-tls1>, B<-tls1_1>, B<-tls1_2>, B<-tls1_3>
109
110 These options enable specific SSL or TLS protocol versions for the handshake
111 initiated by this command.
112 By default, it negotiates the highest mutually supported protocol
113 version.
114 Note that not all protocols and flags may be available, depending on how
115 OpenSSL was built.
116
117 =item B<-bugs>
118
119 There are several known bugs in SSL and TLS implementations. Adding this
120 option enables various workarounds.
121
122 =item B<-cipher> I<cipherlist>
123
124 This allows the TLSv1.2 and below cipher list sent by the client to be modified.
125 This list will be combined with any TLSv1.3 ciphersuites that have been
126 configured. Although the server determines which cipher suite is used it should
127 take the first supported cipher in the list sent by the client. See
128 L<openssl-ciphers(1)> for more information.
129
130 =item B<-ciphersuites> I<val>
131
132 This allows the TLSv1.3 ciphersuites sent by the client to be modified. This
133 list will be combined with any TLSv1.2 and below ciphersuites that have been
134 configured. Although the server determines which cipher suite is used it should
135 take the first supported cipher in the list sent by the client. See
136 L<openssl-ciphers(1)> for more information. The format for this list is a
137 simple colon (":") separated list of TLSv1.3 ciphersuite names.
138
139 =item B<-time> I<length>
140
141 Specifies how long (in seconds) this command should establish connections
142 and optionally transfer payload data from a server. Server and client
143 performance and the link speed determine how many connections it
144 can establish.
145
146 {- $OpenSSL::safe::opt_trust_item -}
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