diff options
author | jmc <> | 2016-09-01 08:26:44 +0000 |
---|---|---|
committer | jmc <> | 2016-09-01 08:26:44 +0000 |
commit | 29691310a3ac3c03344011aed5df5a4a0cb892e3 (patch) | |
tree | 8d73d2620022b2ec34aef1c239a3b7dfd440ac62 /src | |
parent | 1f7abdf5a5dbb8be23c2a3f07bd7e812d2f2a8b8 (diff) | |
download | openbsd-29691310a3ac3c03344011aed5df5a4a0cb892e3.tar.gz openbsd-29691310a3ac3c03344011aed5df5a4a0cb892e3.tar.bz2 openbsd-29691310a3ac3c03344011aed5df5a4a0cb892e3.zip |
shorten s_client;
Diffstat (limited to 'src')
-rw-r--r-- | src/usr.bin/openssl/openssl.1 | 192 |
1 files changed, 50 insertions, 142 deletions
diff --git a/src/usr.bin/openssl/openssl.1 b/src/usr.bin/openssl/openssl.1 index e4732394d0..ad68095950 100644 --- a/src/usr.bin/openssl/openssl.1 +++ b/src/usr.bin/openssl/openssl.1 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: openssl.1,v 1.65 2016/08/30 07:53:59 jmc Exp $ | 1 | .\" $OpenBSD: openssl.1,v 1.66 2016/09/01 08:26:44 jmc Exp $ |
2 | .\" ==================================================================== | 2 | .\" ==================================================================== |
3 | .\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. | 3 | .\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. |
4 | .\" | 4 | .\" |
@@ -112,7 +112,7 @@ | |||
112 | .\" | 112 | .\" |
113 | .\" OPENSSL | 113 | .\" OPENSSL |
114 | .\" | 114 | .\" |
115 | .Dd $Mdocdate: August 30 2016 $ | 115 | .Dd $Mdocdate: September 1 2016 $ |
116 | .Dt OPENSSL 1 | 116 | .Dt OPENSSL 1 |
117 | .Os | 117 | .Os |
118 | .Sh NAME | 118 | .Sh NAME |
@@ -2694,13 +2694,13 @@ The | |||
2694 | .Fl keysig | 2694 | .Fl keysig |
2695 | option marks the key for signing only. | 2695 | option marks the key for signing only. |
2696 | Signing only keys can be used for S/MIME signing, authenticode | 2696 | Signing only keys can be used for S/MIME signing, authenticode |
2697 | .Pq ActiveX control signing | 2697 | (ActiveX control signing) |
2698 | and SSL client authentication. | 2698 | and SSL client authentication. |
2699 | .It Fl macalg Ar alg | 2699 | .It Fl macalg Ar alg |
2700 | Specify the MAC digest algorithm. | 2700 | Specify the MAC digest algorithm. |
2701 | The default is SHA1. | 2701 | The default is SHA1. |
2702 | .It Fl maciter | 2702 | .It Fl maciter |
2703 | Included for compatability only: | 2703 | Included for compatibility only: |
2704 | it used to be needed to use MAC iterations counts | 2704 | it used to be needed to use MAC iterations counts |
2705 | but they are now used by default. | 2705 | but they are now used by default. |
2706 | .It Fl name Ar name | 2706 | .It Fl name Ar name |
@@ -3612,13 +3612,9 @@ This requires an RSA private key. | |||
3612 | .It Fl verify | 3612 | .It Fl verify |
3613 | Verify the input data and output the recovered data. | 3613 | Verify the input data and output the recovered data. |
3614 | .El | 3614 | .El |
3615 | .\" | ||
3616 | .\" S_CLIENT | ||
3617 | .\" | ||
3618 | .Sh S_CLIENT | 3615 | .Sh S_CLIENT |
3619 | .nr nS 1 | 3616 | .nr nS 1 |
3620 | .Nm "openssl s_client" | 3617 | .Nm "openssl s_client" |
3621 | .Bk -words | ||
3622 | .Op Fl 4 | 6 | 3618 | .Op Fl 4 | 6 |
3623 | .Op Fl bugs | 3619 | .Op Fl bugs |
3624 | .Op Fl CAfile Ar file | 3620 | .Op Fl CAfile Ar file |
@@ -3626,10 +3622,7 @@ Verify the input data and output the recovered data. | |||
3626 | .Op Fl cert Ar file | 3622 | .Op Fl cert Ar file |
3627 | .Op Fl check_ss_sig | 3623 | .Op Fl check_ss_sig |
3628 | .Op Fl cipher Ar cipherlist | 3624 | .Op Fl cipher Ar cipherlist |
3629 | .Oo | 3625 | .Op Fl connect Ar host Ns Op : Ns Ar port |
3630 | .Fl connect Ar host : Ns Ar port | | ||
3631 | .Ar host Ns / Ns Ar port | ||
3632 | .Oc | ||
3633 | .Op Fl crl_check | 3626 | .Op Fl crl_check |
3634 | .Op Fl crl_check_all | 3627 | .Op Fl crl_check_all |
3635 | .Op Fl crlf | 3628 | .Op Fl crlf |
@@ -3665,30 +3658,34 @@ Verify the input data and output the recovered data. | |||
3665 | .Op Fl verify Ar depth | 3658 | .Op Fl verify Ar depth |
3666 | .Op Fl x509_strict | 3659 | .Op Fl x509_strict |
3667 | .Op Fl xmpphost Ar host | 3660 | .Op Fl xmpphost Ar host |
3668 | .Ek | ||
3669 | .nr nS 0 | 3661 | .nr nS 0 |
3670 | .Pp | 3662 | .Pp |
3671 | The | 3663 | The |
3672 | .Nm s_client | 3664 | .Nm s_client |
3673 | command implements a generic SSL/TLS client which connects | 3665 | command implements a generic SSL/TLS client which connects |
3674 | to a remote host using SSL/TLS. | 3666 | to a remote host using SSL/TLS. |
3675 | It is a | 3667 | .Pp |
3676 | .Em very | 3668 | If a connection is established with an SSL server, any data received |
3677 | useful diagnostic tool for SSL servers. | 3669 | from the server is displayed and any key presses will be sent to the |
3670 | server. | ||
3671 | When used interactively (which means neither | ||
3672 | .Fl quiet | ||
3673 | nor | ||
3674 | .Fl ign_eof | ||
3675 | have been given), the session will be renegotiated if the line begins with an | ||
3676 | .Cm R ; | ||
3677 | if the line begins with a | ||
3678 | .Cm Q | ||
3679 | or if end of file is reached, the connection will be closed down. | ||
3678 | .Pp | 3680 | .Pp |
3679 | The options are as follows: | 3681 | The options are as follows: |
3680 | .Bl -tag -width Ds | 3682 | .Bl -tag -width Ds |
3681 | .It Fl 4 | 3683 | .It Fl 4 |
3682 | Specify that | 3684 | Attempt connections using IPv4 only. |
3683 | .Nm s_client | ||
3684 | should attempt connections using IPv4 only. | ||
3685 | .It Fl 6 | 3685 | .It Fl 6 |
3686 | Specify that | 3686 | Attempt connections using IPv6 only. |
3687 | .Nm s_client | ||
3688 | should attempt connections using IPv6 only. | ||
3689 | .It Fl bugs | 3687 | .It Fl bugs |
3690 | There are several known bugs in SSL and TLS implementations. | 3688 | Enable various workarounds for buggy implementations. |
3691 | Adding this option enables various workarounds. | ||
3692 | .It Fl CAfile Ar file | 3689 | .It Fl CAfile Ar file |
3693 | A | 3690 | A |
3694 | .Ar file | 3691 | .Ar file |
@@ -3719,57 +3716,48 @@ The default is not to use a certificate. | |||
3719 | .Xc | 3716 | .Xc |
3720 | Set various certificate chain validation options. | 3717 | Set various certificate chain validation options. |
3721 | See the | 3718 | See the |
3722 | .Nm VERIFY | 3719 | .Nm verify |
3723 | command for details. | 3720 | command for details. |
3724 | .It Fl cipher Ar cipherlist | 3721 | .It Fl cipher Ar cipherlist |
3725 | This allows the cipher list sent by the client to be modified. | 3722 | Modify the cipher list sent by the client. |
3726 | Although the server determines which cipher suite is used, it should take | 3723 | Although the server determines which cipher suite is used, it should take |
3727 | the first supported cipher in the list sent by the client. | 3724 | the first supported cipher in the list sent by the client. |
3728 | See the | 3725 | See the |
3729 | .Sx CIPHERS | 3726 | .Nm ciphers |
3730 | section above for more information. | 3727 | command for more information. |
3731 | .It Xo | 3728 | .It Fl connect Ar host Ns Op : Ns Ar port |
3732 | .Fl connect Ar host : Ns Ar port | | 3729 | The |
3733 | .Ar host Ns / Ns Ar port | ||
3734 | .Xc | ||
3735 | This specifies the | ||
3736 | .Ar host | 3730 | .Ar host |
3737 | and optional | 3731 | and |
3738 | .Ar port | 3732 | .Ar port |
3739 | to connect to. | 3733 | to connect to. |
3740 | If not specified, an attempt is made to connect to the local host | 3734 | If not specified, an attempt is made to connect to the local host |
3741 | on port 4433. | 3735 | on port 4433. |
3742 | Alternatively, the host and port pair may be separated using a forward-slash | 3736 | Alternatively, the host and port pair may be separated using a forward-slash |
3743 | character. | 3737 | character, |
3744 | This form is useful for numeric IPv6 addresses. | 3738 | which is useful for numeric IPv6 addresses. |
3745 | .It Fl crlf | 3739 | .It Fl crlf |
3746 | This option translates a line feed from the terminal into CR+LF as required | 3740 | Translate a line feed from the terminal into CR+LF, |
3747 | by some servers. | 3741 | as required by some servers. |
3748 | .It Fl debug | 3742 | .It Fl debug |
3749 | Print extensive debugging information including a hex dump of all traffic. | 3743 | Print extensive debugging information, including a hex dump of all traffic. |
3750 | .It Fl ign_eof | 3744 | .It Fl ign_eof |
3751 | Inhibit shutting down the connection when end of file is reached in the | 3745 | Inhibit shutting down the connection when end of file is reached in the input. |
3752 | input. | ||
3753 | .It Fl key Ar keyfile | 3746 | .It Fl key Ar keyfile |
3754 | The private key to use. | 3747 | The private key to use. |
3755 | If not specified, the certificate file will be used. | 3748 | If not specified, the certificate file will be used. |
3756 | .It Fl msg | 3749 | .It Fl msg |
3757 | Show all protocol messages with hex dump. | 3750 | Show all protocol messages with hex dump. |
3758 | .It Fl nbio | 3751 | .It Fl nbio |
3759 | Turns on non-blocking I/O. | 3752 | Turn on non-blocking I/O. |
3760 | .It Fl nbio_test | 3753 | .It Fl nbio_test |
3761 | Tests non-blocking I/O. | 3754 | Test non-blocking I/O. |
3762 | .It Fl no_tls1 | no_tls1_1 | no_tls1_2 | 3755 | .It Fl no_tls1 | no_tls1_1 | no_tls1_2 |
3763 | By default, the initial handshake uses a method which should be compatible | 3756 | Disable the use of TLS1.0, 1.1, and 1.2, respectively. |
3764 | with servers supporting any version of TLS. | ||
3765 | These options disable the use of TLS1.0, 1.1, and 1.2, respectively. | ||
3766 | .Pp | ||
3767 | Unfortunately there are a lot of ancient and broken servers in use which | ||
3768 | cannot handle this technique and will fail to connect. | ||
3769 | .It Fl no_ticket | 3757 | .It Fl no_ticket |
3770 | Disable RFC 4507 session ticket support. | 3758 | Disable RFC 4507 session ticket support. |
3771 | .It Fl pause | 3759 | .It Fl pause |
3772 | Pauses 1 second between each read and write call. | 3760 | Pause 1 second between each read and write call. |
3773 | .It Fl prexit | 3761 | .It Fl prexit |
3774 | Print session information when the program exits. | 3762 | Print session information when the program exits. |
3775 | This will always attempt | 3763 | This will always attempt |
@@ -3778,9 +3766,8 @@ Normally, information will only be printed out once if the connection succeeds. | |||
3778 | This option is useful because the cipher in use may be renegotiated | 3766 | This option is useful because the cipher in use may be renegotiated |
3779 | or the connection may fail because a client certificate is required or is | 3767 | or the connection may fail because a client certificate is required or is |
3780 | requested only after an attempt is made to access a certain URL. | 3768 | requested only after an attempt is made to access a certain URL. |
3781 | .Sy Note : | 3769 | Note that the output produced by this option is not always accurate |
3782 | the output produced by this option is not always accurate because a | 3770 | because a connection might never have been established. |
3783 | connection might never have been established. | ||
3784 | .It Fl proxy Ar host : Ns Ar port | 3771 | .It Fl proxy Ar host : Ns Ar port |
3785 | Use the HTTP proxy at | 3772 | Use the HTTP proxy at |
3786 | .Ar host | 3773 | .Ar host |
@@ -3799,7 +3786,7 @@ when using a PSK cipher suite. | |||
3799 | The key is given as a hexadecimal number without the leading 0x, | 3786 | The key is given as a hexadecimal number without the leading 0x, |
3800 | for example -psk 1a2b3c4d. | 3787 | for example -psk 1a2b3c4d. |
3801 | .It Fl psk_identity Ar identity | 3788 | .It Fl psk_identity Ar identity |
3802 | Use the PSK identity | 3789 | Use the PSK |
3803 | .Ar identity | 3790 | .Ar identity |
3804 | when using a PSK cipher suite. | 3791 | when using a PSK cipher suite. |
3805 | .It Fl quiet | 3792 | .It Fl quiet |
@@ -3808,7 +3795,7 @@ This implicitly turns on | |||
3808 | .Fl ign_eof | 3795 | .Fl ign_eof |
3809 | as well. | 3796 | as well. |
3810 | .It Fl reconnect | 3797 | .It Fl reconnect |
3811 | Reconnects to the same server 5 times using the same session ID; this can | 3798 | Reconnect to the same server 5 times using the same session ID; this can |
3812 | be used as a test that session caching is working. | 3799 | be used as a test that session caching is working. |
3813 | .It Fl servername Ar name | 3800 | .It Fl servername Ar name |
3814 | Include the TLS Server Name Indication (SNI) extension in the ClientHello | 3801 | Include the TLS Server Name Indication (SNI) extension in the ClientHello |
@@ -3818,7 +3805,7 @@ message, using the specified server | |||
3818 | Display the whole server certificate chain: normally only the server | 3805 | Display the whole server certificate chain: normally only the server |
3819 | certificate itself is displayed. | 3806 | certificate itself is displayed. |
3820 | .It Fl starttls Ar protocol | 3807 | .It Fl starttls Ar protocol |
3821 | Send the protocol-specific message(s) to switch to TLS for communication. | 3808 | Send the protocol-specific messages to switch to TLS for communication. |
3822 | .Ar protocol | 3809 | .Ar protocol |
3823 | is a keyword for the intended protocol. | 3810 | is a keyword for the intended protocol. |
3824 | Currently, the supported keywords are | 3811 | Currently, the supported keywords are |
@@ -3829,106 +3816,27 @@ Currently, the supported keywords are | |||
3829 | and | 3816 | and |
3830 | .Qq xmpp . | 3817 | .Qq xmpp . |
3831 | .It Fl state | 3818 | .It Fl state |
3832 | Prints out the SSL session states. | 3819 | Print the SSL session states. |
3833 | .It Fl tls1 | tls1_1 | tls1_2 | 3820 | .It Fl tls1 | tls1_1 | tls1_2 |
3834 | Permit only TLS1.0, 1.1, or 1.2, respectively. | 3821 | Permit only TLS1.0, 1.1, or 1.2, respectively. |
3835 | .It Fl tlsextdebug | 3822 | .It Fl tlsextdebug |
3836 | Print out a hex dump of any TLS extensions received from the server. | 3823 | Print a hex dump of any TLS extensions received from the server. |
3837 | .It Fl verify Ar depth | 3824 | .It Fl verify Ar depth |
3838 | The verify | 3825 | Turn on server certificate verification, |
3839 | .Ar depth | 3826 | with a maximum length of |
3840 | to use. | 3827 | .Ar depth . |
3841 | This specifies the maximum length of the | ||
3842 | server certificate chain and turns on server certificate verification. | ||
3843 | Currently the verify operation continues after errors so all the problems | 3828 | Currently the verify operation continues after errors so all the problems |
3844 | with a certificate chain can be seen. | 3829 | with a certificate chain can be seen. |
3845 | As a side effect the connection will never fail due to a server | 3830 | As a side effect the connection will never fail due to a server |
3846 | certificate verify failure. | 3831 | certificate verify failure. |
3847 | .It Fl xmpphost Ar hostname | 3832 | .It Fl xmpphost Ar hostname |
3848 | This option, when used with | 3833 | When used with |
3849 | .Fl starttls Ar xmpp , | 3834 | .Fl starttls Ar xmpp , |
3850 | specifies the host for the "to" attribute of the stream element. | 3835 | specify the host for the "to" attribute of the stream element. |
3851 | If this option is not specified then the host specified with | 3836 | If this option is not specified then the host specified with |
3852 | .Fl connect | 3837 | .Fl connect |
3853 | will be used. | 3838 | will be used. |
3854 | .El | 3839 | .El |
3855 | .Sh S_CLIENT CONNECTED COMMANDS | ||
3856 | If a connection is established with an SSL server, any data received | ||
3857 | from the server is displayed and any key presses will be sent to the | ||
3858 | server. | ||
3859 | When used interactively (which means neither | ||
3860 | .Fl quiet | ||
3861 | nor | ||
3862 | .Fl ign_eof | ||
3863 | have been given), the session will be renegotiated if the line begins with an | ||
3864 | .Em R ; | ||
3865 | if the line begins with a | ||
3866 | .Em Q | ||
3867 | or if end of file is reached, the connection will be closed down. | ||
3868 | .Sh S_CLIENT NOTES | ||
3869 | .Nm s_client | ||
3870 | can be used to debug SSL servers. | ||
3871 | To connect to an SSL HTTP server the command: | ||
3872 | .Pp | ||
3873 | .Dl $ openssl s_client -connect servername:443 | ||
3874 | .Pp | ||
3875 | would typically be used | ||
3876 | .Pq HTTPS uses port 443 . | ||
3877 | If the connection succeeds, an HTTP command can be given such as | ||
3878 | .Qq GET | ||
3879 | to retrieve a web page. | ||
3880 | .Pp | ||
3881 | If the handshake fails, there are several possible causes; if it is | ||
3882 | nothing obvious like no client certificate, then the | ||
3883 | .Fl bugs , tls1 , tls1_1, tls1_2 , no_tls1 , no_tls1_1 , | ||
3884 | and | ||
3885 | .Fl no_tls1_2 | ||
3886 | options can be tried in case it is a buggy server. | ||
3887 | .Pp | ||
3888 | A frequent problem when attempting to get client certificates working | ||
3889 | is that a web client complains it has no certificates or gives an empty | ||
3890 | list to choose from. | ||
3891 | This is normally because the server is not sending the client's certificate | ||
3892 | authority in its | ||
3893 | .Qq acceptable CA list | ||
3894 | when it requests a certificate. | ||
3895 | By using | ||
3896 | .Nm s_client | ||
3897 | the CA list can be viewed and checked. | ||
3898 | However some servers only request client authentication | ||
3899 | after a specific URL is requested. | ||
3900 | To obtain the list in this case it is necessary to use the | ||
3901 | .Fl prexit | ||
3902 | option and send an HTTP request for an appropriate page. | ||
3903 | .Pp | ||
3904 | If a certificate is specified on the command line using the | ||
3905 | .Fl cert | ||
3906 | option, it will not be used unless the server specifically requests | ||
3907 | a client certificate. | ||
3908 | Therefore merely including a client certificate | ||
3909 | on the command line is no guarantee that the certificate works. | ||
3910 | .Pp | ||
3911 | If there are problems verifying a server certificate, the | ||
3912 | .Fl showcerts | ||
3913 | option can be used to show the whole chain. | ||
3914 | .Pp | ||
3915 | Compression methods are only supported for | ||
3916 | .Fl tls1 . | ||
3917 | .Sh S_CLIENT BUGS | ||
3918 | Because this program has a lot of options and also because some of | ||
3919 | the techniques used are rather old, the C source of | ||
3920 | .Nm s_client | ||
3921 | is rather hard to read and not a model of how things should be done. | ||
3922 | A typical SSL client program would be much simpler. | ||
3923 | .Pp | ||
3924 | The | ||
3925 | .Fl verify | ||
3926 | option should really exit if the server verification fails. | ||
3927 | .Pp | ||
3928 | The | ||
3929 | .Fl prexit | ||
3930 | option is a bit of a hack. | ||
3931 | We should really report information whenever a session is renegotiated. | ||
3932 | .\" | 3840 | .\" |
3933 | .\" S_SERVER | 3841 | .\" S_SERVER |
3934 | .\" | 3842 | .\" |