]> git.ipfire.org Git - thirdparty/openssl.git/blob - doc/man1/openssl-s_time.pod.in
Add -CAstore and similar to all openssl commands that have -CApath
[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<-new>
91
92 Performs the timing test using a new session ID for each connection.
93 If neither B<-new> nor B<-reuse> are specified, they are both on by default
94 and executed in sequence.
95
96 =item B<-reuse>
97
98 Performs the timing test using the same session ID; this can be used as a test
99 that session caching is working. If neither B<-new> nor B<-reuse> are
100 specified, they are both on by default and executed in sequence.
101
102 =item B<-ssl3>, B<-tls1>, B<-tls1_1>, B<-tls1_2>, B<-tls1_3>
103
104 These options enable specific SSL or TLS protocol versions for the handshake
105 initiated by this command.
106 By default, it negotiates the highest mutually supported protocol
107 version.
108 Note that not all protocols and flags may be available, depending on how
109 OpenSSL was built.
110
111 =item B<-bugs>
112
113 There are several known bugs in SSL and TLS implementations. Adding this
114 option enables various workarounds.
115
116 =item B<-cipher> I<cipherlist>
117
118 This allows the TLSv1.2 and below cipher list sent by the client to be modified.
119 This list will be combined with any TLSv1.3 ciphersuites that have been
120 configured. Although the server determines which cipher suite is used it should
121 take the first supported cipher in the list sent by the client. See
122 L<openssl-ciphers(1)> for more information.
123
124 =item B<-ciphersuites> I<val>
125
126 This allows the TLSv1.3 ciphersuites sent by the client to be modified. This
127 list will be combined with any TLSv1.2 and below ciphersuites that have been
128 configured. Although the server determines which cipher suite is used it should
129 take the first supported cipher in the list sent by the client. See
130 L<openssl-ciphers(1)> for more information. The format for this list is a
131 simple colon (":") separated list of TLSv1.3 ciphersuite names.
132
133 =item B<-time> I<length>
134
135 Specifies how long (in seconds) this command should establish connections
136 and optionally transfer payload data from a server. Server and client
137 performance and the link speed determine how many connections it
138 can establish.
139
140 {- $OpenSSL::safe::opt_trust_item -}
141
142 =back
143
144 =head1 NOTES
145
146 This command can be used to measure the performance of an SSL connection.
147 To connect to an SSL HTTP server and get the default page the command
148
149 openssl s_time -connect servername:443 -www / -CApath yourdir -CAfile yourfile.pem -cipher commoncipher [-ssl3]
150
151 would typically be used (https uses port 443). I<commoncipher> is a cipher to
152 which both client and server can agree, see the L<openssl-ciphers(1)> command
153 for details.
154
155 If the handshake fails then there are several possible causes, if it is
156 nothing obvious like no client certificate then the B<-bugs> and
157 B<-ssl3> options can be tried
158 in case it is a buggy server. In particular you should play with these
159 options B<before> submitting a bug report to an OpenSSL mailing list.
160
161 A frequent problem when attempting to get client certificates working
162 is that a web client complains it has no certificates or gives an empty
163 list to choose from. This is normally because the server is not sending
164 the clients certificate authority in its "acceptable CA list" when it
165 requests a certificate. By using L<openssl-s_client(1)> the CA list can be
166 viewed and checked. However some servers only request client authentication
167 after a specific URL is requested. To obtain the list in this case it
168 is necessary to use the B<-prexit> option of L<openssl-s_client(1)> and
169 send an HTTP request for an appropriate page.
170
171 If a certificate is specified on the command line using the B<-cert>
172 option it will not be used unless the server specifically requests
173 a client certificate. Therefor merely including a client certificate
174 on the command line is no guarantee that the certificate works.
175
176 =head1 BUGS
177
178 Because this program does not have all the options of the
179 L<openssl-s_client(1)> program to turn protocols on and off, you may not
180 be able to measure the performance of all protocols with all servers.
181
182 The B<-verify> option should really exit if the server verification
183 fails.
184
185 =head1 SEE ALSO
186
187 L<openssl(1)>,
188 L<openssl-s_client(1)>,
189 L<openssl-s_server(1)>,
190 L<openssl-ciphers(1)>,
191 L<ossl_store-file(7)>
192
193 =head1 COPYRIGHT
194
195 Copyright 2004-2019 The OpenSSL Project Authors. All Rights Reserved.
196
197 Licensed under the Apache License 2.0 (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