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