openssl-s_time.pod.in 6.4 KB

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