2
0

s_time.pod 5.9 KB

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