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