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