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