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