openssl-s_time.1ossl 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. .\" -*- mode: troff; coding: utf-8 -*-
  2. .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
  3. .\"
  4. .\" Standard preamble:
  5. .\" ========================================================================
  6. .de Sp \" Vertical space (when we can't use .PP)
  7. .if t .sp .5v
  8. .if n .sp
  9. ..
  10. .de Vb \" Begin verbatim text
  11. .ft CW
  12. .nf
  13. .ne \\$1
  14. ..
  15. .de Ve \" End verbatim text
  16. .ft R
  17. .fi
  18. ..
  19. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
  20. .ie n \{\
  21. . ds C` ""
  22. . ds C' ""
  23. 'br\}
  24. .el\{\
  25. . ds C`
  26. . ds C'
  27. 'br\}
  28. .\"
  29. .\" Escape single quotes in literal strings from groff's Unicode transform.
  30. .ie \n(.g .ds Aq \(aq
  31. .el .ds Aq '
  32. .\"
  33. .\" If the F register is >0, we'll generate index entries on stderr for
  34. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  35. .\" entries marked with X<> in POD. Of course, you'll have to process the
  36. .\" output yourself in some meaningful fashion.
  37. .\"
  38. .\" Avoid warning from groff about undefined register 'F'.
  39. .de IX
  40. ..
  41. .nr rF 0
  42. .if \n(.g .if rF .nr rF 1
  43. .if (\n(rF:(\n(.g==0)) \{\
  44. . if \nF \{\
  45. . de IX
  46. . tm Index:\\$1\t\\n%\t"\\$2"
  47. ..
  48. . if !\nF==2 \{\
  49. . nr % 0
  50. . nr F 2
  51. . \}
  52. . \}
  53. .\}
  54. .rr rF
  55. .\" ========================================================================
  56. .\"
  57. .IX Title "OPENSSL-S_TIME 1ossl"
  58. .TH OPENSSL-S_TIME 1ossl 2025-01-17 3.4.0 OpenSSL
  59. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  60. .\" way too many mistakes in technical documents.
  61. .if n .ad l
  62. .nh
  63. .SH NAME
  64. openssl\-s_time \- SSL/TLS performance timing program
  65. .SH SYNOPSIS
  66. .IX Header "SYNOPSIS"
  67. \&\fBopenssl\fR \fBs_time\fR
  68. [\fB\-help\fR]
  69. [\fB\-connect\fR \fIhost\fR:\fIport\fR]
  70. [\fB\-www\fR \fIpage\fR]
  71. [\fB\-cert\fR \fIfilename\fR]
  72. [\fB\-key\fR \fIfilename\fR]
  73. [\fB\-reuse\fR]
  74. [\fB\-new\fR]
  75. [\fB\-verify\fR \fIdepth\fR]
  76. [\fB\-time\fR \fIseconds\fR]
  77. [\fB\-ssl3\fR]
  78. [\fB\-tls1\fR]
  79. [\fB\-tls1_1\fR]
  80. [\fB\-tls1_2\fR]
  81. [\fB\-tls1_3\fR]
  82. [\fB\-bugs\fR]
  83. [\fB\-cipher\fR \fIcipherlist\fR]
  84. [\fB\-ciphersuites\fR \fIval\fR]
  85. [\fB\-nameopt\fR \fIoption\fR]
  86. [\fB\-cafile\fR \fIfile\fR]
  87. [\fB\-CAfile\fR \fIfile\fR]
  88. [\fB\-no\-CAfile\fR]
  89. [\fB\-CApath\fR \fIdir\fR]
  90. [\fB\-no\-CApath\fR]
  91. [\fB\-CAstore\fR \fIuri\fR]
  92. [\fB\-no\-CAstore\fR]
  93. [\fB\-provider\fR \fIname\fR]
  94. [\fB\-provider\-path\fR \fIpath\fR]
  95. [\fB\-propquery\fR \fIpropq\fR]
  96. .SH DESCRIPTION
  97. .IX Header "DESCRIPTION"
  98. This command implements a generic SSL/TLS client which
  99. connects to a remote host using SSL/TLS. It can request a page from the server
  100. and includes the time to transfer the payload data in its timing measurements.
  101. It measures the number of connections within a given timeframe, the amount of
  102. data transferred (if any), and calculates the average time spent for one
  103. connection.
  104. .SH OPTIONS
  105. .IX Header "OPTIONS"
  106. .IP \fB\-help\fR 4
  107. .IX Item "-help"
  108. Print out a usage message.
  109. .IP "\fB\-connect\fR \fIhost\fR:\fIport\fR" 4
  110. .IX Item "-connect host:port"
  111. This specifies the host and optional port to connect to.
  112. If the host string is an IPv6 address, it must be enclosed in \f(CW\*(C`[\*(C'\fR and \f(CW\*(C`]\*(C'\fR.
  113. .IP "\fB\-www\fR \fIpage\fR" 4
  114. .IX Item "-www page"
  115. This specifies the page to GET from the server. A value of '/' gets the
  116. \&\fIindex.html\fR page. If this parameter is not specified, then this command
  117. will only perform the handshake to establish SSL connections but not transfer
  118. any payload data.
  119. .IP "\fB\-cert\fR \fIcertname\fR" 4
  120. .IX Item "-cert certname"
  121. The certificate to use, if one is requested by the server. The default is
  122. not to use a certificate. The file is in PEM format.
  123. .IP "\fB\-key\fR \fIkeyfile\fR" 4
  124. .IX Item "-key keyfile"
  125. The private key to use. If not specified then the certificate file will
  126. be used. The file is in PEM format.
  127. .IP "\fB\-verify\fR \fIdepth\fR" 4
  128. .IX Item "-verify depth"
  129. The verify depth to use. This specifies the maximum length of the
  130. server certificate chain and turns on server certificate verification.
  131. Currently the verify operation continues after errors so all the problems
  132. with a certificate chain can be seen. As a side effect the connection
  133. will never fail due to a server certificate verify failure.
  134. .IP \fB\-new\fR 4
  135. .IX Item "-new"
  136. Performs the timing test using a new session ID for each connection.
  137. If neither \fB\-new\fR nor \fB\-reuse\fR are specified, they are both on by default
  138. and executed in sequence.
  139. .IP \fB\-reuse\fR 4
  140. .IX Item "-reuse"
  141. Performs the timing test using the same session ID; this can be used as a test
  142. that session caching is working. If neither \fB\-new\fR nor \fB\-reuse\fR are
  143. specified, they are both on by default and executed in sequence.
  144. .IP \fB\-bugs\fR 4
  145. .IX Item "-bugs"
  146. There are several known bugs in SSL and TLS implementations. Adding this
  147. option enables various workarounds.
  148. .IP "\fB\-cipher\fR \fIcipherlist\fR" 4
  149. .IX Item "-cipher cipherlist"
  150. This allows the TLSv1.2 and below cipher list sent by the client to be modified.
  151. This list will be combined with any TLSv1.3 ciphersuites that have been
  152. configured. Although the server determines which cipher suite is used it should
  153. take the first supported cipher in the list sent by the client. See
  154. \&\fBopenssl\-ciphers\fR\|(1) for more information.
  155. .IP "\fB\-ciphersuites\fR \fIval\fR" 4
  156. .IX Item "-ciphersuites val"
  157. This allows the TLSv1.3 ciphersuites sent by the client to be modified. This
  158. list will be combined with any TLSv1.2 and below ciphersuites that have been
  159. configured. Although the server determines which cipher suite is used it should
  160. take the first supported cipher in the list sent by the client. See
  161. \&\fBopenssl\-ciphers\fR\|(1) for more information. The format for this list is a
  162. simple colon (":") separated list of TLSv1.3 ciphersuite names.
  163. .IP "\fB\-time\fR \fIlength\fR" 4
  164. .IX Item "-time length"
  165. Specifies how long (in seconds) this command should establish connections
  166. and optionally transfer payload data from a server. Server and client
  167. performance and the link speed determine how many connections it
  168. can establish.
  169. .IP "\fB\-nameopt\fR \fIoption\fR" 4
  170. .IX Item "-nameopt option"
  171. This specifies how the subject or issuer names are displayed.
  172. See \fBopenssl\-namedisplay\-options\fR\|(1) for details.
  173. .IP "\fB\-CAfile\fR \fIfile\fR, \fB\-no\-CAfile\fR, \fB\-CApath\fR \fIdir\fR, \fB\-no\-CApath\fR, \fB\-CAstore\fR \fIuri\fR, \fB\-no\-CAstore\fR" 4
  174. .IX Item "-CAfile file, -no-CAfile, -CApath dir, -no-CApath, -CAstore uri, -no-CAstore"
  175. See "Trusted Certificate Options" in \fBopenssl\-verification\-options\fR\|(1) for details.
  176. .IP "\fB\-provider\fR \fIname\fR" 4
  177. .IX Item "-provider name"
  178. .PD 0
  179. .IP "\fB\-provider\-path\fR \fIpath\fR" 4
  180. .IX Item "-provider-path path"
  181. .IP "\fB\-propquery\fR \fIpropq\fR" 4
  182. .IX Item "-propquery propq"
  183. .PD
  184. See "Provider Options" in \fBopenssl\fR\|(1), \fBprovider\fR\|(7), and \fBproperty\fR\|(7).
  185. .IP "\fB\-cafile\fR \fIfile\fR" 4
  186. .IX Item "-cafile file"
  187. This is an obsolete synonym for \fB\-CAfile\fR.
  188. .IP "\fB\-ssl3\fR, \fB\-tls1\fR, \fB\-tls1_1\fR, \fB\-tls1_2\fR, \fB\-tls1_3\fR" 4
  189. .IX Item "-ssl3, -tls1, -tls1_1, -tls1_2, -tls1_3"
  190. See "TLS Version Options" in \fBopenssl\fR\|(1).
  191. .SH NOTES
  192. .IX Header "NOTES"
  193. This command can be used to measure the performance of an SSL connection.
  194. To connect to an SSL HTTP server and get the default page the command
  195. .PP
  196. .Vb 1
  197. \& openssl s_time \-connect servername:443 \-www / \-CApath yourdir \-CAfile yourfile.pem \-cipher commoncipher [\-ssl3]
  198. .Ve
  199. .PP
  200. would typically be used (https uses port 443). \fIcommoncipher\fR is a cipher to
  201. which both client and server can agree, see the \fBopenssl\-ciphers\fR\|(1) command
  202. for details.
  203. .PP
  204. If the handshake fails then there are several possible causes, if it is
  205. nothing obvious like no client certificate then the \fB\-bugs\fR and
  206. \&\fB\-ssl3\fR options can be tried
  207. in case it is a buggy server. In particular you should play with these
  208. options \fBbefore\fR submitting a bug report to an OpenSSL mailing list.
  209. .PP
  210. A frequent problem when attempting to get client certificates working
  211. is that a web client complains it has no certificates or gives an empty
  212. list to choose from. This is normally because the server is not sending
  213. the clients certificate authority in its "acceptable CA list" when it
  214. requests a certificate. By using \fBopenssl\-s_client\fR\|(1) the CA list can be
  215. viewed and checked. However, some servers only request client authentication
  216. after a specific URL is requested. To obtain the list in this case it
  217. is necessary to use the \fB\-prexit\fR option of \fBopenssl\-s_client\fR\|(1) and
  218. send an HTTP request for an appropriate page.
  219. .PP
  220. If a certificate is specified on the command line using the \fB\-cert\fR
  221. option it will not be used unless the server specifically requests
  222. a client certificate. Therefore, merely including a client certificate
  223. on the command line is no guarantee that the certificate works.
  224. .SH BUGS
  225. .IX Header "BUGS"
  226. Because this program does not have all the options of the
  227. \&\fBopenssl\-s_client\fR\|(1) program to turn protocols on and off, you may not
  228. be able to measure the performance of all protocols with all servers.
  229. .PP
  230. The \fB\-verify\fR option should really exit if the server verification
  231. fails.
  232. .SH HISTORY
  233. .IX Header "HISTORY"
  234. The \fB\-cafile\fR option was deprecated in OpenSSL 3.0.
  235. .SH "SEE ALSO"
  236. .IX Header "SEE ALSO"
  237. \&\fBopenssl\fR\|(1),
  238. \&\fBopenssl\-s_client\fR\|(1),
  239. \&\fBopenssl\-s_server\fR\|(1),
  240. \&\fBopenssl\-ciphers\fR\|(1),
  241. \&\fBossl_store\-file\fR\|(7)
  242. .SH COPYRIGHT
  243. .IX Header "COPYRIGHT"
  244. Copyright 2004\-2024 The OpenSSL Project Authors. All Rights Reserved.
  245. .PP
  246. Licensed under the Apache License 2.0 (the "License"). You may not use
  247. this file except in compliance with the License. You can obtain a copy
  248. in the file LICENSE in the source distribution or at
  249. <https://www.openssl.org/source/license.html>.