diff options
author | jmc <> | 2016-09-02 18:43:52 +0000 |
---|---|---|
committer | jmc <> | 2016-09-02 18:43:52 +0000 |
commit | b31711d05313b5cda9eade326e32e2e41369ac17 (patch) | |
tree | 940d3e71768a20543f91e951918e00e54a08554f /src | |
parent | c316085e40bc88a23e887823b4e2e5049df2a2c8 (diff) | |
download | openbsd-b31711d05313b5cda9eade326e32e2e41369ac17.tar.gz openbsd-b31711d05313b5cda9eade326e32e2e41369ac17.tar.bz2 openbsd-b31711d05313b5cda9eade326e32e2e41369ac17.zip |
shorten s_server;
Diffstat (limited to 'src')
-rw-r--r-- | src/usr.bin/openssl/openssl.1 | 206 |
1 files changed, 72 insertions, 134 deletions
diff --git a/src/usr.bin/openssl/openssl.1 b/src/usr.bin/openssl/openssl.1 index ad68095950..d6a5ca6601 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.66 2016/09/01 08:26:44 jmc Exp $ | 1 | .\" $OpenBSD: openssl.1,v 1.67 2016/09/02 18:43:52 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: September 1 2016 $ | 115 | .Dd $Mdocdate: September 2 2016 $ |
116 | .Dt OPENSSL 1 | 116 | .Dt OPENSSL 1 |
117 | .Os | 117 | .Os |
118 | .Sh NAME | 118 | .Sh NAME |
@@ -3837,13 +3837,9 @@ If this option is not specified then the host specified with | |||
3837 | .Fl connect | 3837 | .Fl connect |
3838 | will be used. | 3838 | will be used. |
3839 | .El | 3839 | .El |
3840 | .\" | ||
3841 | .\" S_SERVER | ||
3842 | .\" | ||
3843 | .Sh S_SERVER | 3840 | .Sh S_SERVER |
3844 | .nr nS 1 | 3841 | .nr nS 1 |
3845 | .Nm "openssl s_server" | 3842 | .Nm "openssl s_server" |
3846 | .Bk -words | ||
3847 | .Op Fl accept Ar port | 3843 | .Op Fl accept Ar port |
3848 | .Op Fl bugs | 3844 | .Op Fl bugs |
3849 | .Op Fl CAfile Ar file | 3845 | .Op Fl CAfile Ar file |
@@ -3883,7 +3879,6 @@ will be used. | |||
3883 | .Op Fl verify Ar depth | 3879 | .Op Fl verify Ar depth |
3884 | .Op Fl WWW | 3880 | .Op Fl WWW |
3885 | .Op Fl www | 3881 | .Op Fl www |
3886 | .Ek | ||
3887 | .nr nS 0 | 3882 | .nr nS 0 |
3888 | .Pp | 3883 | .Pp |
3889 | The | 3884 | The |
@@ -3891,18 +3886,42 @@ The | |||
3891 | command implements a generic SSL/TLS server which listens | 3886 | command implements a generic SSL/TLS server which listens |
3892 | for connections on a given port using SSL/TLS. | 3887 | for connections on a given port using SSL/TLS. |
3893 | .Pp | 3888 | .Pp |
3889 | If a connection request is established with a client and neither the | ||
3890 | .Fl www | ||
3891 | nor the | ||
3892 | .Fl WWW | ||
3893 | option has been used, then any data received | ||
3894 | from the client is displayed and any key presses are sent to the client. | ||
3895 | Certain single letter commands perform special operations: | ||
3896 | .Pp | ||
3897 | .Bl -tag -width "XXXX" -compact | ||
3898 | .It Ic P | ||
3899 | Send plain text, which should cause the client to disconnect. | ||
3900 | .It Ic Q | ||
3901 | End the current SSL connection and exit. | ||
3902 | .It Ic q | ||
3903 | End the current SSL connection, but still accept new connections. | ||
3904 | .It Ic R | ||
3905 | Renegotiate the SSL session and request a client certificate. | ||
3906 | .It Ic r | ||
3907 | Renegotiate the SSL session. | ||
3908 | .It Ic S | ||
3909 | Print out some session cache status information. | ||
3910 | .El | ||
3911 | .Pp | ||
3894 | The options are as follows: | 3912 | The options are as follows: |
3895 | .Bl -tag -width Ds | 3913 | .Bl -tag -width Ds |
3896 | .It Fl accept Ar port | 3914 | .It Fl accept Ar port |
3897 | The TCP | 3915 | Listen on TCP |
3898 | .Ar port | 3916 | .Ar port |
3899 | to listen on for connections. | 3917 | for connections. |
3900 | If not specified, 4433 is used. | 3918 | The default is port 4433. |
3901 | .It Fl bugs | 3919 | .It Fl bugs |
3902 | There are several known bugs in SSL and TLS implementations. | 3920 | Enable various workarounds for buggy implementations. |
3903 | Adding this option enables various workarounds. | ||
3904 | .It Fl CAfile Ar file | 3921 | .It Fl CAfile Ar file |
3905 | A file containing trusted certificates to use during client authentication | 3922 | A |
3923 | .Ar file | ||
3924 | containing trusted certificates to use during client authentication | ||
3906 | and to use when attempting to build the server certificate chain. | 3925 | and to use when attempting to build the server certificate chain. |
3907 | The list is also used in the list of acceptable client CAs passed to the | 3926 | The list is also used in the list of acceptable client CAs passed to the |
3908 | client when a certificate is requested. | 3927 | client when a certificate is requested. |
@@ -3917,35 +3936,33 @@ see | |||
3917 | for more information. | 3936 | for more information. |
3918 | These are also used when building the server certificate chain. | 3937 | These are also used when building the server certificate chain. |
3919 | .It Fl cert Ar file | 3938 | .It Fl cert Ar file |
3920 | The certificate to use; most server's cipher suites require the use of a | 3939 | The certificate to use: most server's cipher suites require the use of a |
3921 | certificate and some require a certificate with a certain public key type: | 3940 | certificate and some require a certificate with a certain public key type. |
3922 | for example the DSS cipher suites require a certificate containing a DSS | 3941 | For example, the DSS cipher suites require a certificate containing a DSS |
3923 | .Pq DSA | 3942 | (DSA) key. |
3924 | key. | ||
3925 | If not specified, the file | 3943 | If not specified, the file |
3926 | .Pa server.pem | 3944 | .Pa server.pem |
3927 | will be used. | 3945 | will be used. |
3928 | .It Fl cipher Ar cipherlist | 3946 | .It Fl cipher Ar cipherlist |
3947 | Modify the cipher list used by the server. | ||
3929 | This allows the cipher list used by the server to be modified. | 3948 | This allows the cipher list used by the server to be modified. |
3930 | When the client sends a list of supported ciphers, the first client cipher | 3949 | When the client sends a list of supported ciphers, the first client cipher |
3931 | also included in the server list is used. | 3950 | also included in the server list is used. |
3932 | Because the client specifies the preference order, the order of the server | 3951 | Because the client specifies the preference order, the order of the server |
3933 | cipherlist is irrelevant. | 3952 | cipherlist is irrelevant. |
3934 | See the | 3953 | See the |
3935 | .Sx CIPHERS | 3954 | .Nm ciphers |
3936 | section for more information. | 3955 | command for more information. |
3937 | .It Fl context Ar id | 3956 | .It Fl context Ar id |
3938 | Sets the SSL context ID. | 3957 | Set the SSL context ID. |
3939 | It can be given any string value. | 3958 | It can be given any string value. |
3940 | If this option is not present, a default value will be used. | ||
3941 | .It Fl crl_check , crl_check_all | 3959 | .It Fl crl_check , crl_check_all |
3942 | Check the peer certificate has not been revoked by its CA. | 3960 | Check the peer certificate has not been revoked by its CA. |
3943 | The CRLs are appended to the certificate file. | 3961 | The CRLs are appended to the certificate file. |
3944 | With the | ||
3945 | .Fl crl_check_all | 3962 | .Fl crl_check_all |
3946 | option, all CRLs of all CAs in the chain are checked. | 3963 | checks all CRLs of all CAs in the chain. |
3947 | .It Fl crlf | 3964 | .It Fl crlf |
3948 | This option translates a line feed from the terminal into CR+LF. | 3965 | Translate a line feed from the terminal into CR+LF. |
3949 | .It Fl dcert Ar file , Fl dkey Ar file | 3966 | .It Fl dcert Ar file , Fl dkey Ar file |
3950 | Specify an additional certificate and private key; these behave in the | 3967 | Specify an additional certificate and private key; these behave in the |
3951 | same manner as the | 3968 | same manner as the |
@@ -3953,18 +3970,12 @@ same manner as the | |||
3953 | and | 3970 | and |
3954 | .Fl key | 3971 | .Fl key |
3955 | options except there is no default if they are not specified | 3972 | options except there is no default if they are not specified |
3956 | .Pq no additional certificate or key is used . | 3973 | (no additional certificate or key is used). |
3957 | As noted above some cipher suites require a certificate containing a key of | ||
3958 | a certain type. | ||
3959 | Some cipher suites need a certificate carrying an RSA key | ||
3960 | and some a DSS | ||
3961 | .Pq DSA | ||
3962 | key. | ||
3963 | By using RSA and DSS certificates and keys, | 3974 | By using RSA and DSS certificates and keys, |
3964 | a server can support clients which only support RSA or DSS cipher suites | 3975 | a server can support clients which only support RSA or DSS cipher suites |
3965 | by using an appropriate certificate. | 3976 | by using an appropriate certificate. |
3966 | .It Fl debug | 3977 | .It Fl debug |
3967 | Print extensive debugging information including a hex dump of all traffic. | 3978 | Print extensive debugging information, including a hex dump of all traffic. |
3968 | .It Fl dhparam Ar file | 3979 | .It Fl dhparam Ar file |
3969 | The DH parameter file to use. | 3980 | The DH parameter file to use. |
3970 | The ephemeral DH cipher suites generate keys | 3981 | The ephemeral DH cipher suites generate keys |
@@ -3975,13 +3986,11 @@ If this fails, a static set of parameters hard coded into the | |||
3975 | .Nm s_server | 3986 | .Nm s_server |
3976 | program will be used. | 3987 | program will be used. |
3977 | .It Fl hack | 3988 | .It Fl hack |
3978 | This option enables a further workaround for some early Netscape | 3989 | Enables a further workaround for some early Netscape SSL code. |
3979 | SSL code | ||
3980 | .Pq \&? . | ||
3981 | .It Fl HTTP | 3990 | .It Fl HTTP |
3982 | Emulates a simple web server. | 3991 | Emulate a simple web server. |
3983 | Pages will be resolved relative to the current directory; | 3992 | Pages are resolved relative to the current directory. |
3984 | for example if the URL | 3993 | For example if the URL |
3985 | .Pa https://myhost/page.html | 3994 | .Pa https://myhost/page.html |
3986 | is requested, the file | 3995 | is requested, the file |
3987 | .Pa ./page.html | 3996 | .Pa ./page.html |
@@ -3993,33 +4002,29 @@ must end with CRLF). | |||
3993 | Generate SSL/TLS session IDs prefixed by | 4002 | Generate SSL/TLS session IDs prefixed by |
3994 | .Ar arg . | 4003 | .Ar arg . |
3995 | This is mostly useful for testing any SSL/TLS code | 4004 | This is mostly useful for testing any SSL/TLS code |
3996 | .Pq e.g. proxies | 4005 | (e.g. proxies) |
3997 | that wish to deal with multiple servers, when each of which might be | 4006 | that wish to deal with multiple servers, when each of which might be |
3998 | generating a unique range of session IDs | 4007 | generating a unique range of session IDs |
3999 | .Pq e.g. with a certain prefix . | 4008 | (e.g. with a certain prefix). |
4000 | .It Fl key Ar keyfile | 4009 | .It Fl key Ar keyfile |
4001 | The private key to use. | 4010 | The private key to use. |
4002 | If not specified, the certificate file will be used. | 4011 | If not specified, the certificate file will be used. |
4003 | .It Fl msg | 4012 | .It Fl msg |
4004 | Show all protocol messages with hex dump. | 4013 | Show all protocol messages with hex dump. |
4005 | .It Fl nbio | 4014 | .It Fl nbio |
4006 | Turns on non-blocking I/O. | 4015 | Turn on non-blocking I/O. |
4007 | .It Fl nbio_test | 4016 | .It Fl nbio_test |
4008 | Tests non-blocking I/O. | 4017 | Test non-blocking I/O. |
4009 | .It Fl no_dhe | 4018 | .It Fl no_dhe |
4010 | If this option is set, no DH parameters will be loaded, effectively | 4019 | Disable ephemeral DH cipher suites. |
4011 | disabling the ephemeral DH cipher suites. | ||
4012 | .It Fl no_tls1 | no_tls1_1 | no_tls1_2 | 4020 | .It Fl no_tls1 | no_tls1_1 | no_tls1_2 |
4013 | By default, the initial handshake uses a method which should be compatible | 4021 | Disable the use of TLS1.0, 1.1, and 1.2, respectively. |
4014 | with clients supporting any version of TLS. | ||
4015 | These options disable the use of TLS1.0, 1.1, and 1.2, respectively. | ||
4016 | .It Fl no_tmp_rsa | 4022 | .It Fl no_tmp_rsa |
4017 | Certain export cipher suites sometimes use a temporary RSA key; this option | 4023 | Disable temporary RSA key generation. |
4018 | disables temporary RSA key generation. | ||
4019 | .It Fl nocert | 4024 | .It Fl nocert |
4020 | If this option is set, no certificate is used. | 4025 | Do not use a certificate. |
4021 | This restricts the cipher suites available to the anonymous ones | 4026 | This restricts the cipher suites available to the anonymous ones |
4022 | .Pq currently just anonymous DH . | 4027 | (currently just anonymous DH). |
4023 | .It Fl psk Ar key | 4028 | .It Fl psk Ar key |
4024 | Use the PSK key | 4029 | Use the PSK key |
4025 | .Ar key | 4030 | .Ar key |
@@ -4035,100 +4040,33 @@ Inhibit printing of session and certificate information. | |||
4035 | .It Fl serverpref | 4040 | .It Fl serverpref |
4036 | Use server's cipher preferences. | 4041 | Use server's cipher preferences. |
4037 | .It Fl state | 4042 | .It Fl state |
4038 | Prints out the SSL session states. | 4043 | Print the SSL session states. |
4039 | .It Fl tls1 | tls1_1 | tls1_2 | 4044 | .It Fl tls1 | tls1_1 | tls1_2 |
4040 | Permit only TLS1.0, 1.1, or 1.2, respectively. | 4045 | Permit only TLS1.0, 1.1, or 1.2, respectively. |
4041 | .It Fl WWW | 4046 | .It Fl WWW |
4042 | Emulates a simple web server. | 4047 | Emulate a simple web server. |
4043 | Pages will be resolved relative to the current directory; | 4048 | Pages are resolved relative to the current directory. |
4044 | for example if the URL | 4049 | For example if the URL |
4045 | .Pa https://myhost/page.html | 4050 | .Pa https://myhost/page.html |
4046 | is requested, the file | 4051 | is requested, the file |
4047 | .Pa ./page.html | 4052 | .Pa ./page.html |
4048 | will be loaded. | 4053 | will be loaded. |
4049 | .It Fl www | 4054 | .It Fl www |
4050 | Sends a status message back to the client when it connects. | 4055 | Send a status message to the client when it connects, |
4051 | This includes lots of information about the ciphers used and various | 4056 | including information about the ciphers used and various session parameters. |
4052 | session parameters. | ||
4053 | The output is in HTML format so this option will normally be used with a | 4057 | The output is in HTML format so this option will normally be used with a |
4054 | web browser. | 4058 | web browser. |
4055 | .It Fl Verify Ar depth , Fl verify Ar depth | 4059 | .It Fl Verify Ar depth , Fl verify Ar depth |
4056 | The verify | 4060 | Request a certificate chain from the client, |
4057 | .Ar depth | 4061 | with a maximum length of |
4058 | to use. | 4062 | .Ar depth . |
4059 | This specifies the maximum length of the client certificate chain | 4063 | With |
4060 | and makes the server request a certificate from the client. | 4064 | .Fl Verify , |
4061 | With the | 4065 | the client must supply a certificate or an error occurs; |
4062 | .Fl Verify | 4066 | with |
4063 | option, the client must supply a certificate or an error occurs. | 4067 | .Fl verify , |
4064 | With the | 4068 | a certificate is requested but the client does not have to send one. |
4065 | .Fl verify | ||
4066 | option, a certificate is requested but the client does not have to send one. | ||
4067 | .El | ||
4068 | .Sh S_SERVER CONNECTED COMMANDS | ||
4069 | If a connection request is established with an SSL client and neither the | ||
4070 | .Fl www | ||
4071 | nor the | ||
4072 | .Fl WWW | ||
4073 | option has been used, then normally any data received | ||
4074 | from the client is displayed and any key presses will be sent to the client. | ||
4075 | .Pp | ||
4076 | Certain single letter commands are also recognized which perform special | ||
4077 | operations: these are listed below. | ||
4078 | .Bl -tag -width "XXXX" | ||
4079 | .It Ar P | ||
4080 | Send some plain text down the underlying TCP connection: this should | ||
4081 | cause the client to disconnect due to a protocol violation. | ||
4082 | .It Ar Q | ||
4083 | End the current SSL connection and exit. | ||
4084 | .It Ar q | ||
4085 | End the current SSL connection, but still accept new connections. | ||
4086 | .It Ar R | ||
4087 | Renegotiate the SSL session and request a client certificate. | ||
4088 | .It Ar r | ||
4089 | Renegotiate the SSL session. | ||
4090 | .It Ar S | ||
4091 | Print out some session cache status information. | ||
4092 | .El | 4069 | .El |
4093 | .Sh S_SERVER NOTES | ||
4094 | .Nm s_server | ||
4095 | can be used to debug SSL clients. | ||
4096 | To accept connections from a web browser the command: | ||
4097 | .Pp | ||
4098 | .Dl $ openssl s_server -accept 443 -www | ||
4099 | .Pp | ||
4100 | can be used, for example. | ||
4101 | .Pp | ||
4102 | Most web browsers | ||
4103 | .Pq in particular Netscape and MSIE | ||
4104 | only support RSA cipher suites, so they cannot connect to servers | ||
4105 | which don't use a certificate carrying an RSA key or a version of | ||
4106 | .Nm OpenSSL | ||
4107 | with RSA disabled. | ||
4108 | .Pp | ||
4109 | Although specifying an empty list of CAs when requesting a client certificate | ||
4110 | is strictly speaking a protocol violation, some SSL | ||
4111 | clients interpret this to mean any CA is acceptable. | ||
4112 | This is useful for debugging purposes. | ||
4113 | .Pp | ||
4114 | The session parameters can printed out using the | ||
4115 | .Nm sess_id | ||
4116 | program. | ||
4117 | .Sh S_SERVER BUGS | ||
4118 | Because this program has a lot of options and also because some of | ||
4119 | the techniques used are rather old, the C source of | ||
4120 | .Nm s_server | ||
4121 | is rather hard to read and not a model of how things should be done. | ||
4122 | A typical SSL server program would be much simpler. | ||
4123 | .Pp | ||
4124 | The output of common ciphers is wrong: it just gives the list of ciphers that | ||
4125 | .Nm OpenSSL | ||
4126 | recognizes and the client supports. | ||
4127 | .Pp | ||
4128 | There should be a way for the | ||
4129 | .Nm s_server | ||
4130 | program to print out details of any | ||
4131 | unknown cipher suites a client says it supports. | ||
4132 | .\" | 4070 | .\" |
4133 | .\" S_TIME | 4071 | .\" S_TIME |
4134 | .\" | 4072 | .\" |