diff options
| author | jmc <> | 2004-04-06 13:47:34 +0000 |
|---|---|---|
| committer | jmc <> | 2004-04-06 13:47:34 +0000 |
| commit | 17857517b8365550715ae6e3a903db79159baab7 (patch) | |
| tree | 5b8922ac824e1c27aad89b6a14ae1ea9c85d3a4e /src | |
| parent | 99251205c9dba09220b3b2086341141ec8f7f577 (diff) | |
| download | openbsd-17857517b8365550715ae6e3a903db79159baab7.tar.gz openbsd-17857517b8365550715ae6e3a903db79159baab7.tar.bz2 openbsd-17857517b8365550715ae6e3a903db79159baab7.zip | |
sort SYNOPSIS and options, and various other fixes,
for s_client and s_server;
Diffstat (limited to 'src')
| -rw-r--r-- | src/usr.sbin/openssl/openssl.1 | 530 |
1 files changed, 265 insertions, 265 deletions
diff --git a/src/usr.sbin/openssl/openssl.1 b/src/usr.sbin/openssl/openssl.1 index 0763306219..d6114b68e6 100644 --- a/src/usr.sbin/openssl/openssl.1 +++ b/src/usr.sbin/openssl/openssl.1 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: openssl.1,v 1.38 2004/04/01 10:34:13 djm Exp $ | 1 | .\" $OpenBSD: openssl.1,v 1.39 2004/04/06 13:47:34 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 | .\" |
| @@ -4303,7 +4303,7 @@ Multiple files can be specified separated by a | |||
| 4303 | .Op Fl extensions Ar section | 4303 | .Op Fl extensions Ar section |
| 4304 | .Op Fl in Ar file | 4304 | .Op Fl in Ar file |
| 4305 | .Op Fl inform Ar DER | PEM | 4305 | .Op Fl inform Ar DER | PEM |
| 4306 | .Op Fl key Ar file | 4306 | .Op Fl key Ar keyfile |
| 4307 | .Op Fl keyform Ar DER | PEM | 4307 | .Op Fl keyform Ar DER | PEM |
| 4308 | .Op Fl keyout Ar file | 4308 | .Op Fl keyout Ar file |
| 4309 | .Op Fl nameopt Ar option | 4309 | .Op Fl nameopt Ar option |
| @@ -4407,7 +4407,7 @@ The | |||
| 4407 | form is the default format: | 4407 | form is the default format: |
| 4408 | it consists of the DER format base64-encoded with additional header and | 4408 | it consists of the DER format base64-encoded with additional header and |
| 4409 | footer lines. | 4409 | footer lines. |
| 4410 | .It Fl key Ar file | 4410 | .It Fl key Ar keyfile |
| 4411 | This specifies the file to read the private key from. | 4411 | This specifies the file to read the private key from. |
| 4412 | It also accepts PKCS#8 format private keys for PEM format files. | 4412 | It also accepts PKCS#8 format private keys for PEM format files. |
| 4413 | .It Fl keyform Ar DER | PEM | 4413 | .It Fl keyform Ar DER | PEM |
| @@ -5381,40 +5381,40 @@ which it can be seen agrees with the recovered value above. | |||
| 5381 | .Sh S_CLIENT | 5381 | .Sh S_CLIENT |
| 5382 | .Nm openssl s_client | 5382 | .Nm openssl s_client |
| 5383 | .Bk -words | 5383 | .Bk -words |
| 5384 | .Oo | 5384 | .Op Fl 4 | 6 |
| 5385 | .Fl connect Ar host : Ns Ar port | | 5385 | .Op Fl bugs |
| 5386 | .Ar host Ns / Ns Ar port | 5386 | .Op Fl crlf |
| 5387 | .Oc | ||
| 5388 | .Op Fl verify Ar depth | ||
| 5389 | .Op Fl cert Ar file | ||
| 5390 | .Op Fl key Ar file | ||
| 5391 | .Op Fl CApath Ar directory | ||
| 5392 | .Op Fl CAfile Ar file | ||
| 5393 | .Op Fl reconnect | ||
| 5394 | .Op Fl pause | ||
| 5395 | .Op Fl showcerts | ||
| 5396 | .Op Fl prexit | ||
| 5397 | .Op Fl debug | 5387 | .Op Fl debug |
| 5388 | .Op Fl ign_eof | ||
| 5398 | .Op Fl msg | 5389 | .Op Fl msg |
| 5399 | .Op Fl nbio_test | ||
| 5400 | .Op Fl state | ||
| 5401 | .Op Fl nbio | 5390 | .Op Fl nbio |
| 5402 | .Op Fl crlf | 5391 | .Op Fl nbio_test |
| 5403 | .Op Fl ign_eof | ||
| 5404 | .Op Fl quiet | ||
| 5405 | .Op Fl ssl2 | ||
| 5406 | .Op Fl ssl3 | ||
| 5407 | .Op Fl tls1 | ||
| 5408 | .Op Fl no_ssl2 | 5392 | .Op Fl no_ssl2 |
| 5409 | .Op Fl no_ssl3 | 5393 | .Op Fl no_ssl3 |
| 5410 | .Op Fl no_tls1 | 5394 | .Op Fl no_tls1 |
| 5411 | .Op Fl bugs | 5395 | .Op Fl pause |
| 5396 | .Op Fl prexit | ||
| 5397 | .Op Fl quiet | ||
| 5398 | .Op Fl reconnect | ||
| 5412 | .Op Fl serverpref | 5399 | .Op Fl serverpref |
| 5400 | .Op Fl showcerts | ||
| 5401 | .Op Fl ssl2 | ||
| 5402 | .Op Fl ssl3 | ||
| 5403 | .Op Fl state | ||
| 5404 | .Op Fl tls1 | ||
| 5405 | .Op Fl CAfile Ar file | ||
| 5406 | .Op Fl CApath Ar directory | ||
| 5407 | .Op Fl cert Ar file | ||
| 5413 | .Op Fl cipher Ar cipherlist | 5408 | .Op Fl cipher Ar cipherlist |
| 5414 | .Op Fl starttls Ar protocol | 5409 | .Oo |
| 5410 | .Fl connect Ar host : Ns Ar port | | ||
| 5411 | .Ar host Ns / Ns Ar port | ||
| 5412 | .Oc | ||
| 5415 | .Op Fl engine Ar id | 5413 | .Op Fl engine Ar id |
| 5414 | .Op Fl key Ar keyfile | ||
| 5416 | .Op Fl rand Ar file ... | 5415 | .Op Fl rand Ar file ... |
| 5417 | .Op Fl 4 | 6 | 5416 | .Op Fl starttls Ar protocol |
| 5417 | .Op Fl verify Ar depth | ||
| 5418 | .Ek | 5418 | .Ek |
| 5419 | .Pp | 5419 | .Pp |
| 5420 | The | 5420 | The |
| @@ -5427,6 +5427,42 @@ useful diagnostic tool for SSL servers. | |||
| 5427 | .Pp | 5427 | .Pp |
| 5428 | The options are as follows: | 5428 | The options are as follows: |
| 5429 | .Bl -tag -width "XXXX" | 5429 | .Bl -tag -width "XXXX" |
| 5430 | .It Fl 4 | ||
| 5431 | Specify that | ||
| 5432 | .Nm s_client | ||
| 5433 | should attempt connections using IPv4 only. | ||
| 5434 | .It Fl 6 | ||
| 5435 | Specify that | ||
| 5436 | .Nm s_client | ||
| 5437 | should attempt connections using IPv6 only. | ||
| 5438 | .It Fl bugs | ||
| 5439 | There are several known bugs in SSL and TLS implementations. | ||
| 5440 | Adding this option enables various workarounds. | ||
| 5441 | .It Fl CAfile Ar file | ||
| 5442 | A | ||
| 5443 | .Ar file | ||
| 5444 | containing trusted certificates to use during server authentication | ||
| 5445 | and to use when attempting to build the client certificate chain. | ||
| 5446 | .It Fl CApath Ar directory | ||
| 5447 | The | ||
| 5448 | .Ar directory | ||
| 5449 | to use for server certificate verification. | ||
| 5450 | This directory must be in | ||
| 5451 | .Qq hash format ; | ||
| 5452 | see | ||
| 5453 | .Fl verify | ||
| 5454 | for more information. | ||
| 5455 | These are also used when building the client certificate chain. | ||
| 5456 | .It Fl cert Ar file | ||
| 5457 | The certificate to use, if one is requested by the server. | ||
| 5458 | The default is not to use a certificate. | ||
| 5459 | .It Fl cipher Ar cipherlist | ||
| 5460 | This allows the cipher list sent by the client to be modified. | ||
| 5461 | Although the server determines which cipher suite is used, it should take | ||
| 5462 | the first supported cipher in the list sent by the client. | ||
| 5463 | See the | ||
| 5464 | .Sx CIPHERS | ||
| 5465 | section above for more information. | ||
| 5430 | .It Xo | 5466 | .It Xo |
| 5431 | .Fl connect Ar host : Ns Ar port | | 5467 | .Fl connect Ar host : Ns Ar port | |
| 5432 | .Ar host Ns / Ns Ar port | 5468 | .Ar host Ns / Ns Ar port |
| @@ -5441,45 +5477,48 @@ on port 4433. | |||
| 5441 | Alternatively, the host and port pair may be separated using a forward-slash | 5477 | Alternatively, the host and port pair may be separated using a forward-slash |
| 5442 | character. | 5478 | character. |
| 5443 | This form is useful for numeric IPv6 addresses. | 5479 | This form is useful for numeric IPv6 addresses. |
| 5444 | .It Fl cert Ar certname | 5480 | .It Fl crlf |
| 5445 | The certificate to use, if one is requested by the server. | 5481 | This option translates a line feed from the terminal into CR+LF as required |
| 5446 | The default is not to use a certificate. | 5482 | by some servers. |
| 5483 | .It Fl debug | ||
| 5484 | Print extensive debugging information including a hex dump of all traffic. | ||
| 5485 | .It Fl engine Ar id | ||
| 5486 | Specifying an engine (by it's unique | ||
| 5487 | .Ar id | ||
| 5488 | string) will cause | ||
| 5489 | .Nm s_client | ||
| 5490 | to attempt to obtain a functional reference to the specified engine, | ||
| 5491 | thus initialising it if needed. | ||
| 5492 | The engine will then be set as the default for all available algorithms. | ||
| 5493 | .It Fl ign_eof | ||
| 5494 | Inhibit shutting down the connection when end of file is reached in the | ||
| 5495 | input. | ||
| 5447 | .It Fl key Ar keyfile | 5496 | .It Fl key Ar keyfile |
| 5448 | The private key to use. | 5497 | The private key to use. |
| 5449 | If not specified, then the certificate file will be used. | 5498 | If not specified, then the certificate file will be used. |
| 5450 | .It Fl verify Ar depth | 5499 | .It Fl msg |
| 5451 | The verify | 5500 | Show all protocol messages with hex dump. |
| 5452 | .Ar depth | 5501 | .It Fl nbio |
| 5453 | to use. | 5502 | Turns on non-blocking I/O. |
| 5454 | This specifies the maximum length of the | 5503 | .It Fl nbio_test |
| 5455 | server certificate chain and turns on server certificate verification. | 5504 | Tests non-blocking I/O. |
| 5456 | Currently the verify operation continues after errors so all the problems | 5505 | .It Xo |
| 5457 | with a certificate chain can be seen. | 5506 | .Fl no_ssl2 | no_ssl3 | no_tls1 | |
| 5458 | As a side effect the connection will never fail due to a server | 5507 | .Fl ssl2 | ssl3 | tls1 |
| 5459 | certificate verify failure. | 5508 | .Xc |
| 5460 | .It Fl CApath Ar directory | 5509 | These options disable the use of certain SSL or TLS protocols. |
| 5461 | The | 5510 | By default, the initial handshake uses a method which should be compatible |
| 5462 | .Ar directory | 5511 | with all servers and permit them to use SSL v3, SSL v2, or TLS as appropriate. |
| 5463 | to use for server certificate verification. | 5512 | .Pp |
| 5464 | This directory must be in | 5513 | Unfortunately there are a lot of ancient and broken servers in use which |
| 5465 | .Qq hash format ; | 5514 | cannot handle this technique and will fail to connect. |
| 5466 | see | 5515 | Some servers only work if TLS is turned off with the |
| 5467 | .Fl verify | 5516 | .Fl no_tls |
| 5468 | for more information. | 5517 | option, others will only support SSL v2 and may need the |
| 5469 | These are also used when building the client certificate chain. | 5518 | .Fl ssl2 |
| 5470 | .It Fl CAfile Ar file | 5519 | option. |
| 5471 | A | ||
| 5472 | .Ar file | ||
| 5473 | containing trusted certificates to use during server authentication | ||
| 5474 | and to use when attempting to build the client certificate chain. | ||
| 5475 | .It Fl reconnect | ||
| 5476 | Reconnects to the same server 5 times using the same session ID; this can | ||
| 5477 | be used as a test that session caching is working. | ||
| 5478 | .It Fl pause | 5520 | .It Fl pause |
| 5479 | Pauses 1 second between each read and write call. | 5521 | Pauses 1 second between each read and write call. |
| 5480 | .It Fl showcerts | ||
| 5481 | Display the whole server certificate chain: normally only the server | ||
| 5482 | certificate itself is displayed. | ||
| 5483 | .It Fl prexit | 5522 | .It Fl prexit |
| 5484 | Print session information when the program exits. | 5523 | Print session information when the program exits. |
| 5485 | This will always attempt | 5524 | This will always attempt |
| @@ -5491,55 +5530,26 @@ requested only after an attempt is made to access a certain URL. | |||
| 5491 | .Sy Note : | 5530 | .Sy Note : |
| 5492 | the output produced by this option is not always accurate because a | 5531 | the output produced by this option is not always accurate because a |
| 5493 | connection might never have been established. | 5532 | connection might never have been established. |
| 5494 | .It Fl state | ||
| 5495 | Prints out the SSL session states. | ||
| 5496 | .It Fl debug | ||
| 5497 | Print extensive debugging information including a hex dump of all traffic. | ||
| 5498 | .It Fl msg | ||
| 5499 | Show all protocol messages with hex dump. | ||
| 5500 | .It Fl nbio_test | ||
| 5501 | Tests non-blocking I/O. | ||
| 5502 | .It Fl nbio | ||
| 5503 | Turns on non-blocking I/O. | ||
| 5504 | .It Fl crlf | ||
| 5505 | This option translates a line feed from the terminal into CR+LF as required | ||
| 5506 | by some servers. | ||
| 5507 | .It Fl ign_eof | ||
| 5508 | Inhibit shutting down the connection when end of file is reached in the | ||
| 5509 | input. | ||
| 5510 | .It Fl quiet | 5533 | .It Fl quiet |
| 5511 | Inhibit printing of session and certificate information. | 5534 | Inhibit printing of session and certificate information. |
| 5512 | This implicitly turns on | 5535 | This implicitly turns on |
| 5513 | .Fl ign_eof | 5536 | .Fl ign_eof |
| 5514 | as well. | 5537 | as well. |
| 5515 | .It Xo | 5538 | .It Fl rand Ar file ... |
| 5516 | .Fl ssl2 | ssl3 | tls1 | | 5539 | A file or files containing random data used to seed the random number generator, |
| 5517 | .Fl no_ssl2 | no_ssl3 | no_tls1 | 5540 | or an EGD socket (see |
| 5518 | .Xc | 5541 | .Xr RAND_egd 3 ) . |
| 5519 | These options disable the use of certain SSL or TLS protocols. | 5542 | Multiple files can be specified separated by a |
| 5520 | By default, the initial handshake uses a method which should be compatible | 5543 | .Sq \&: . |
| 5521 | with all servers and permit them to use SSL v3, SSL v2 or TLS as appropriate. | 5544 | .It Fl reconnect |
| 5522 | .Pp | 5545 | Reconnects to the same server 5 times using the same session ID; this can |
| 5523 | Unfortunately there are a lot of ancient and broken servers in use which | 5546 | be used as a test that session caching is working. |
| 5524 | cannot handle this technique and will fail to connect. | ||
| 5525 | Some servers only work if TLS is turned off with the | ||
| 5526 | .Fl no_tls | ||
| 5527 | option, others will only support SSL v2 and may need the | ||
| 5528 | .Fl ssl2 | ||
| 5529 | option. | ||
| 5530 | .It Fl bugs | ||
| 5531 | There are several known bugs in SSL and TLS implementations. | ||
| 5532 | Adding this option enables various workarounds. | ||
| 5533 | .It Fl serverpref | 5547 | .It Fl serverpref |
| 5534 | Use server's cipher preferences | 5548 | Use server's cipher preferences |
| 5535 | .Pq SSLv2 only . | 5549 | .Pq SSLv2 only . |
| 5536 | .It Fl cipher Ar cipherlist | 5550 | .It Fl showcerts |
| 5537 | This allows the cipher list sent by the client to be modified. | 5551 | Display the whole server certificate chain: normally only the server |
| 5538 | Although the server determines which cipher suite is used, it should take | 5552 | certificate itself is displayed. |
| 5539 | the first supported cipher in the list sent by the client. | ||
| 5540 | See the | ||
| 5541 | .Sx CIPHERS | ||
| 5542 | section above for more information. | ||
| 5543 | .It Fl starttls Ar protocol | 5553 | .It Fl starttls Ar protocol |
| 5544 | Send the protocol-specific message(s) to switch to TLS for communication. | 5554 | Send the protocol-specific message(s) to switch to TLS for communication. |
| 5545 | .Ar protocol | 5555 | .Ar protocol |
| @@ -5548,28 +5558,18 @@ Currently, the only supported keywords are | |||
| 5548 | .Qq smtp | 5558 | .Qq smtp |
| 5549 | and | 5559 | and |
| 5550 | .Qq pop3 . | 5560 | .Qq pop3 . |
| 5551 | .It Fl engine Ar id | 5561 | .It Fl state |
| 5552 | Specifying an engine (by it's unique | 5562 | Prints out the SSL session states. |
| 5553 | .Ar id | 5563 | .It Fl verify Ar depth |
| 5554 | string) will cause | 5564 | The verify |
| 5555 | .Nm s_client | 5565 | .Ar depth |
| 5556 | to attempt to obtain a functional reference to the specified engine, | 5566 | to use. |
| 5557 | thus initialising it if needed. | 5567 | This specifies the maximum length of the |
| 5558 | The engine will then be set as the default for all available algorithms. | 5568 | server certificate chain and turns on server certificate verification. |
| 5559 | .It Fl rand Ar file ... | 5569 | Currently the verify operation continues after errors so all the problems |
| 5560 | A file or files containing random data used to seed the random number generator, | 5570 | with a certificate chain can be seen. |
| 5561 | or an EGD socket (see | 5571 | As a side effect the connection will never fail due to a server |
| 5562 | .Xr RAND_egd 3 ) . | 5572 | certificate verify failure. |
| 5563 | Multiple files can be specified separated by a | ||
| 5564 | .Sq \&: . | ||
| 5565 | .It Fl 4 | ||
| 5566 | Specify that | ||
| 5567 | .Nm s_client | ||
| 5568 | should attempt connections using IPv4 only. | ||
| 5569 | .It Fl 6 | ||
| 5570 | Specify that | ||
| 5571 | .Nm s_client | ||
| 5572 | should attempt connections using IPv6 only. | ||
| 5573 | .El | 5573 | .El |
| 5574 | .Sh S_CLIENT CONNECTED COMMANDS | 5574 | .Sh S_CLIENT CONNECTED COMMANDS |
| 5575 | If a connection is established with an SSL server, then any data received | 5575 | If a connection is established with an SSL server, then any data received |
| @@ -5600,7 +5600,7 @@ to retrieve a web page. | |||
| 5600 | If the handshake fails, then there are several possible causes; if it is | 5600 | If the handshake fails, then there are several possible causes; if it is |
| 5601 | nothing obvious like no client certificate, then the | 5601 | nothing obvious like no client certificate, then the |
| 5602 | .Fl bugs , ssl2 , ssl3 , tls1 , | 5602 | .Fl bugs , ssl2 , ssl3 , tls1 , |
| 5603 | .Fl no_ssl2 , no_ssl3 | 5603 | .Fl no_ssl2 , no_ssl3 , |
| 5604 | and | 5604 | and |
| 5605 | .Fl no_tls1 | 5605 | .Fl no_tls1 |
| 5606 | options can be tried in case it is a buggy server. | 5606 | options can be tried in case it is a buggy server. |
| @@ -5657,43 +5657,43 @@ We should really report information whenever a session is renegotiated. | |||
| 5657 | .Sh S_SERVER | 5657 | .Sh S_SERVER |
| 5658 | .Nm openssl s_server | 5658 | .Nm openssl s_server |
| 5659 | .Bk -words | 5659 | .Bk -words |
| 5660 | .Op Fl accept Ar port | 5660 | .Op Fl bugs |
| 5661 | .Op Fl context Ar id | ||
| 5662 | .Op Fl verify Ar depth | ||
| 5663 | .Op Fl Verify Ar depth | ||
| 5664 | .Op Fl cert Ar file | ||
| 5665 | .Op Fl key Ar keyfile | ||
| 5666 | .Op Fl dcert Ar file | ||
| 5667 | .Op Fl dkey Ar keyfile | ||
| 5668 | .Op Fl dhparam Ar file | ||
| 5669 | .Op Fl nbio | ||
| 5670 | .Op Fl nbio_test | ||
| 5671 | .Op Fl crlf | 5661 | .Op Fl crlf |
| 5672 | .Op Fl debug | 5662 | .Op Fl debug |
| 5663 | .Op Fl hack | ||
| 5664 | .Op Fl HTTP | ||
| 5673 | .Op Fl msg | 5665 | .Op Fl msg |
| 5674 | .Op Fl state | 5666 | .Op Fl nbio |
| 5675 | .Op Fl CApath Ar directory | 5667 | .Op Fl nbio_test |
| 5676 | .Op Fl CAfile Ar file | 5668 | .Op Fl no_dhe |
| 5669 | .Op Fl no_ssl2 | ||
| 5670 | .Op Fl no_ssl3 | ||
| 5671 | .Op Fl no_tls1 | ||
| 5672 | .Op Fl no_tmp_rsa | ||
| 5677 | .Op Fl nocert | 5673 | .Op Fl nocert |
| 5678 | .Op Fl cipher Ar cipherlist | ||
| 5679 | .Op Fl serverpref | ||
| 5680 | .Op Fl quiet | 5674 | .Op Fl quiet |
| 5681 | .Op Fl no_tmp_rsa | 5675 | .Op Fl serverpref |
| 5682 | .Op Fl ssl2 | 5676 | .Op Fl ssl2 |
| 5683 | .Op Fl ssl3 | 5677 | .Op Fl ssl3 |
| 5678 | .Op Fl state | ||
| 5684 | .Op Fl tls1 | 5679 | .Op Fl tls1 |
| 5685 | .Op Fl no_ssl2 | ||
| 5686 | .Op Fl no_ssl3 | ||
| 5687 | .Op Fl no_tls1 | ||
| 5688 | .Op Fl no_dhe | ||
| 5689 | .Op Fl bugs | ||
| 5690 | .Op Fl hack | ||
| 5691 | .Op Fl www | ||
| 5692 | .Op Fl WWW | 5680 | .Op Fl WWW |
| 5693 | .Op Fl HTTP | 5681 | .Op Fl www |
| 5682 | .Op Fl accept Ar port | ||
| 5683 | .Op Fl CAfile Ar file | ||
| 5684 | .Op Fl CApath Ar directory | ||
| 5685 | .Op Fl cert Ar file | ||
| 5686 | .Op Fl cipher Ar cipherlist | ||
| 5687 | .Op Fl context Ar id | ||
| 5688 | .Op Fl dcert Ar file | ||
| 5689 | .Op Fl dhparam Ar file | ||
| 5690 | .Op Fl dkey Ar file | ||
| 5694 | .Op Fl engine Ar id | 5691 | .Op Fl engine Ar id |
| 5695 | .Op Fl id_prefix Ar arg | 5692 | .Op Fl id_prefix Ar arg |
| 5693 | .Op Fl key Ar keyfile | ||
| 5696 | .Op Fl rand Ar file ... | 5694 | .Op Fl rand Ar file ... |
| 5695 | .Op Fl Verify Ar depth | ||
| 5696 | .Op Fl verify Ar depth | ||
| 5697 | .Ek | 5697 | .Ek |
| 5698 | .Pp | 5698 | .Pp |
| 5699 | The | 5699 | The |
| @@ -5708,11 +5708,25 @@ The TCP | |||
| 5708 | .Ar port | 5708 | .Ar port |
| 5709 | to listen on for connections. | 5709 | to listen on for connections. |
| 5710 | If not specified, 4433 is used. | 5710 | If not specified, 4433 is used. |
| 5711 | .It Fl context Ar id | 5711 | .It Fl bugs |
| 5712 | Sets the SSL context id. | 5712 | There are several known bugs in SSL and TLS implementations. |
| 5713 | It can be given any string value. | 5713 | Adding this option enables various workarounds. |
| 5714 | If this option is not present, a default value will be used. | 5714 | .It Fl CAfile Ar file |
| 5715 | .It Fl cert Ar certname | 5715 | A file containing trusted certificates to use during client authentication |
| 5716 | and to use when attempting to build the server certificate chain. | ||
| 5717 | The list is also used in the list of acceptable client CAs passed to the | ||
| 5718 | client when a certificate is requested. | ||
| 5719 | .It Fl CApath Ar directory | ||
| 5720 | The | ||
| 5721 | .Ar directory | ||
| 5722 | to use for client certificate verification. | ||
| 5723 | This directory must be in | ||
| 5724 | .Qq hash format ; | ||
| 5725 | see | ||
| 5726 | .Fl verify | ||
| 5727 | for more information. | ||
| 5728 | These are also used when building the server certificate chain. | ||
| 5729 | .It Fl cert Ar file | ||
| 5716 | The certificate to use; most server's cipher suites require the use of a | 5730 | The certificate to use; most server's cipher suites require the use of a |
| 5717 | certificate and some require a certificate with a certain public key type: | 5731 | certificate and some require a certificate with a certain public key type: |
| 5718 | for example the DSS cipher suites require a certificate containing a DSS | 5732 | for example the DSS cipher suites require a certificate containing a DSS |
| @@ -5721,144 +5735,72 @@ key. | |||
| 5721 | If not specified, then the file | 5735 | If not specified, then the file |
| 5722 | .Pa server.pem | 5736 | .Pa server.pem |
| 5723 | will be used. | 5737 | will be used. |
| 5724 | .It Fl key Ar keyfile | 5738 | .It Fl cipher Ar cipherlist |
| 5725 | The private key to use. | 5739 | This allows the cipher list used by the server to be modified. |
| 5726 | If not specified, then the certificate file will be used. | 5740 | When the client sends a list of supported ciphers, the first client cipher |
| 5727 | .It Fl dcert Ar file , Fl dkey Ar keyname | 5741 | also included in the server list is used. |
| 5742 | Because the client specifies the preference order, the order of the server | ||
| 5743 | cipherlist is irrelevant. | ||
| 5744 | See the | ||
| 5745 | .Sx CIPHERS | ||
| 5746 | section for more information. | ||
| 5747 | .It Fl context Ar id | ||
| 5748 | Sets the SSL context ID. | ||
| 5749 | It can be given any string value. | ||
| 5750 | If this option is not present, a default value will be used. | ||
| 5751 | .It Fl crlf | ||
| 5752 | This option translates a line feed from the terminal into CR+LF. | ||
| 5753 | .It Fl dcert Ar file , Fl dkey Ar file | ||
| 5728 | Specify an additional certificate and private key; these behave in the | 5754 | Specify an additional certificate and private key; these behave in the |
| 5729 | same manner as the | 5755 | same manner as the |
| 5730 | .Fl cert | 5756 | .Fl cert |
| 5731 | and | 5757 | and |
| 5732 | .Fl key | 5758 | .Fl key |
| 5733 | options except there is no default if they are not specified | 5759 | options except there is no default if they are not specified |
| 5734 | .Pq no additional certificate and key is used . | 5760 | .Pq no additional certificate or key is used . |
| 5735 | As noted above some cipher suites require a certificate containing a key of | 5761 | As noted above some cipher suites require a certificate containing a key of |
| 5736 | a certain type. | 5762 | a certain type. |
| 5737 | Some cipher suites need a certificate carrying an RSA key | 5763 | Some cipher suites need a certificate carrying an RSA key |
| 5738 | and some a DSS | 5764 | and some a DSS |
| 5739 | .Pq DSA | 5765 | .Pq DSA |
| 5740 | key. | 5766 | key. |
| 5741 | By using RSA and DSS certificates and keys | 5767 | By using RSA and DSS certificates and keys, |
| 5742 | a server can support clients which only support RSA or DSS cipher suites | 5768 | a server can support clients which only support RSA or DSS cipher suites |
| 5743 | by using an appropriate certificate. | 5769 | by using an appropriate certificate. |
| 5744 | .It Fl nocert | 5770 | .It Fl debug |
| 5745 | If this option is set, then no certificate is used. | 5771 | Print extensive debugging information including a hex dump of all traffic. |
| 5746 | This restricts the cipher suites available to the anonymous ones | ||
| 5747 | .Pq currently just anonymous DH . | ||
| 5748 | .It Fl dhparam Ar file | 5772 | .It Fl dhparam Ar file |
| 5749 | The DH parameter file to use. | 5773 | The DH parameter file to use. |
| 5750 | The ephemeral DH cipher suites generate keys | 5774 | The ephemeral DH cipher suites generate keys |
| 5751 | using a set of DH parameters. | 5775 | using a set of DH parameters. |
| 5752 | If not specified, then an attempt is made to | 5776 | If not specified, then an attempt is made to |
| 5753 | load the parameters from the server certificate file. | 5777 | load the parameters from the server certificate file. |
| 5754 | If this fails then a static set of parameters hard coded into the | 5778 | If this fails, then a static set of parameters hard coded into the |
| 5755 | .Nm s_server | 5779 | .Nm s_server |
| 5756 | program will be used. | 5780 | program will be used. |
| 5757 | .It Fl no_dhe | 5781 | .It Fl engine Ar id |
| 5758 | If this option is set, then no DH parameters will be loaded, effectively | 5782 | Specifying an engine (by it's unique |
| 5759 | disabling the ephemeral DH cipher suites. | 5783 | .Ar id |
| 5760 | .It Fl no_tmp_rsa | 5784 | string) will cause |
| 5761 | Certain export cipher suites sometimes use a temporary RSA key; this option | 5785 | .Nm s_server |
| 5762 | disables temporary RSA key generation. | 5786 | to attempt to obtain a functional reference to the specified engine, |
| 5763 | .It Fl verify Ar depth , Fl Verify Ar depth | 5787 | thus initialising it if needed. |
| 5764 | The verify | 5788 | The engine will then be set as the default for all available algorithms. |
| 5765 | .Ar depth | ||
| 5766 | to use. | ||
| 5767 | This specifies the maximum length of the client certificate chain | ||
| 5768 | and makes the server request a certificate from the client. | ||
| 5769 | With the | ||
| 5770 | .Fl verify | ||
| 5771 | option, a certificate is requested but the client does not have to send one. | ||
| 5772 | With the | ||
| 5773 | .Fl Verify | ||
| 5774 | option, the client must supply a certificate or an error occurs. | ||
| 5775 | .It Fl CApath Ar directory | ||
| 5776 | The | ||
| 5777 | .Ar directory | ||
| 5778 | to use for client certificate verification. | ||
| 5779 | This directory must be in | ||
| 5780 | .Qq hash format ; | ||
| 5781 | see | ||
| 5782 | .Fl verify | ||
| 5783 | for more information. | ||
| 5784 | These are also used when building the server certificate chain. | ||
| 5785 | .It Fl CAfile Ar file | ||
| 5786 | A file containing trusted certificates to use during client authentication | ||
| 5787 | and to use when attempting to build the server certificate chain. | ||
| 5788 | The list is also used in the list of acceptable client CAs passed to the | ||
| 5789 | client when a certificate is requested. | ||
| 5790 | .It Fl state | ||
| 5791 | Prints out the SSL session states. | ||
| 5792 | .It Fl debug | ||
| 5793 | Print extensive debugging information including a hex dump of all traffic. | ||
| 5794 | .It Fl msg | ||
| 5795 | Show all protocol messages with hex dump. | ||
| 5796 | .It Fl nbio_test | ||
| 5797 | Tests non-blocking I/O. | ||
| 5798 | .It Fl nbio | ||
| 5799 | Turns on non-blocking I/O. | ||
| 5800 | .It Fl crlf | ||
| 5801 | This option translates a line feed from the terminal into CR+LF. | ||
| 5802 | .It Fl quiet | ||
| 5803 | Inhibit printing of session and certificate information. | ||
| 5804 | .It Xo | ||
| 5805 | .Fl ssl2 | ssl3 | tls1 | | ||
| 5806 | .Fl no_ssl2 | no_ssl3 | no_tls1 | ||
| 5807 | .Xc | ||
| 5808 | These options disable the use of certain SSL or TLS protocols. | ||
| 5809 | By default, the initial handshake uses a method which should be compatible | ||
| 5810 | with all servers and permit them to use SSL v3, SSL v2 or TLS as appropriate. | ||
| 5811 | .It Fl bugs | ||
| 5812 | There are several known bugs in SSL and TLS implementations. | ||
| 5813 | Adding this option enables various workarounds. | ||
| 5814 | .It Fl hack | 5789 | .It Fl hack |
| 5815 | This option enables a further workaround for some early Netscape | 5790 | This option enables a further workaround for some early Netscape |
| 5816 | SSL code | 5791 | SSL code |
| 5817 | .Pq \&? . | 5792 | .Pq \&? . |
| 5818 | .It Fl cipher Ar cipherlist | ||
| 5819 | This allows the cipher list used by the server to be modified. | ||
| 5820 | When the client sends a list of supported ciphers, the first client cipher | ||
| 5821 | also included in the server list is used. | ||
| 5822 | Because the client specifies the preference order, the order of the server | ||
| 5823 | cipherlist is irrelevant. | ||
| 5824 | See the | ||
| 5825 | .Sx CIPHERS | ||
| 5826 | section for more information. | ||
| 5827 | .It Fl serverpref | ||
| 5828 | Use server's cipher preferences. | ||
| 5829 | .It Fl www | ||
| 5830 | Sends a status message back to the client when it connects. | ||
| 5831 | This includes lots of information about the ciphers used and various | ||
| 5832 | session parameters. | ||
| 5833 | The output is in HTML format so this option will normally be used with a | ||
| 5834 | web browser. | ||
| 5835 | .It Fl WWW | ||
| 5836 | Emulates a simple web server. | ||
| 5837 | Pages will be resolved relative to the current directory; | ||
| 5838 | for example if the URL | ||
| 5839 | .Pa https://myhost/page.html | ||
| 5840 | is requested, the file | ||
| 5841 | .Pa ./page.html | ||
| 5842 | will be loaded. | ||
| 5843 | .It Fl HTTP | 5793 | .It Fl HTTP |
| 5844 | Emulates a simple web server. | 5794 | Emulates a simple web server. |
| 5845 | Pages will be resolved relative to the current directory; | 5795 | Pages will be resolved relative to the current directory; |
| 5846 | for example if the URL | 5796 | for example if the URL |
| 5847 | .Pa https://myhost/page.html | 5797 | .Pa https://myhost/page.html |
| 5848 | is requested the file | 5798 | is requested, the file |
| 5849 | .Pa ./page.html | 5799 | .Pa ./page.html |
| 5850 | will be loaded. | 5800 | will be loaded. |
| 5851 | The files loaded are assumed to contain a complete and correct HTTP | 5801 | The files loaded are assumed to contain a complete and correct HTTP |
| 5852 | response (lines that are part of the HTTP response line and headers | 5802 | response (lines that are part of the HTTP response line and headers |
| 5853 | must end with CRLF). | 5803 | must end with CRLF). |
| 5854 | .It Fl engine Ar id | ||
| 5855 | Specifying an engine (by it's unique | ||
| 5856 | .Ar id | ||
| 5857 | string) will cause | ||
| 5858 | .Nm s_server | ||
| 5859 | to attempt to obtain a functional reference to the specified engine, | ||
| 5860 | thus initialising it if needed. | ||
| 5861 | The engine will then be set as the default for all available algorithms. | ||
| 5862 | .It Fl id_prefix Ar arg | 5804 | .It Fl id_prefix Ar arg |
| 5863 | Generate SSL/TLS session IDs prefixed by | 5805 | Generate SSL/TLS session IDs prefixed by |
| 5864 | .Ar arg . | 5806 | .Ar arg . |
| @@ -5867,12 +5809,70 @@ This is mostly useful for testing any SSL/TLS code | |||
| 5867 | that wish to deal with multiple servers, when each of which might be | 5809 | that wish to deal with multiple servers, when each of which might be |
| 5868 | generating a unique range of session IDs | 5810 | generating a unique range of session IDs |
| 5869 | .Pq e.g. with a certain prefix . | 5811 | .Pq e.g. with a certain prefix . |
| 5812 | .It Fl key Ar keyfile | ||
| 5813 | The private key to use. | ||
| 5814 | If not specified, then the certificate file will be used. | ||
| 5815 | .It Fl msg | ||
| 5816 | Show all protocol messages with hex dump. | ||
| 5817 | .It Fl nbio | ||
| 5818 | Turns on non-blocking I/O. | ||
| 5819 | .It Fl nbio_test | ||
| 5820 | Tests non-blocking I/O. | ||
| 5821 | .It Fl no_dhe | ||
| 5822 | If this option is set, then no DH parameters will be loaded, effectively | ||
| 5823 | disabling the ephemeral DH cipher suites. | ||
| 5824 | .It Xo | ||
| 5825 | .Fl no_ssl2 | no_ssl3 | no_tls1 | | ||
| 5826 | .Fl ssl2 | ssl3 | tls1 | ||
| 5827 | .Xc | ||
| 5828 | These options disable the use of certain SSL or TLS protocols. | ||
| 5829 | By default, the initial handshake uses a method which should be compatible | ||
| 5830 | with all servers and permit them to use SSL v3, SSL v2, or TLS as appropriate. | ||
| 5831 | .It Fl no_tmp_rsa | ||
| 5832 | Certain export cipher suites sometimes use a temporary RSA key; this option | ||
| 5833 | disables temporary RSA key generation. | ||
| 5834 | .It Fl nocert | ||
| 5835 | If this option is set, then no certificate is used. | ||
| 5836 | This restricts the cipher suites available to the anonymous ones | ||
| 5837 | .Pq currently just anonymous DH . | ||
| 5838 | .It Fl quiet | ||
| 5839 | Inhibit printing of session and certificate information. | ||
| 5870 | .It Fl rand Ar file ... | 5840 | .It Fl rand Ar file ... |
| 5871 | A file or files containing random data used to seed the random number generator, | 5841 | A file or files containing random data used to seed the random number generator, |
| 5872 | or an EGD socket (see | 5842 | or an EGD socket (see |
| 5873 | .Xr RAND_egd 3 ) . | 5843 | .Xr RAND_egd 3 ) . |
| 5874 | Multiple files can be specified separated by a | 5844 | Multiple files can be specified separated by a |
| 5875 | .Sq \&: . | 5845 | .Sq \&: . |
| 5846 | .It Fl serverpref | ||
| 5847 | Use server's cipher preferences. | ||
| 5848 | .It Fl state | ||
| 5849 | Prints out the SSL session states. | ||
| 5850 | .It Fl WWW | ||
| 5851 | Emulates a simple web server. | ||
| 5852 | Pages will be resolved relative to the current directory; | ||
| 5853 | for example if the URL | ||
| 5854 | .Pa https://myhost/page.html | ||
| 5855 | is requested, the file | ||
| 5856 | .Pa ./page.html | ||
| 5857 | will be loaded. | ||
| 5858 | .It Fl www | ||
| 5859 | Sends a status message back to the client when it connects. | ||
| 5860 | This includes lots of information about the ciphers used and various | ||
| 5861 | session parameters. | ||
| 5862 | The output is in HTML format so this option will normally be used with a | ||
| 5863 | web browser. | ||
| 5864 | .It Fl Verify Ar depth , Fl verify Ar depth | ||
| 5865 | The verify | ||
| 5866 | .Ar depth | ||
| 5867 | to use. | ||
| 5868 | This specifies the maximum length of the client certificate chain | ||
| 5869 | and makes the server request a certificate from the client. | ||
| 5870 | With the | ||
| 5871 | .Fl Verify | ||
| 5872 | option, the client must supply a certificate or an error occurs. | ||
| 5873 | With the | ||
| 5874 | .Fl verify | ||
| 5875 | option, a certificate is requested but the client does not have to send one. | ||
| 5876 | .El | 5876 | .El |
| 5877 | .Sh S_SERVER CONNECTED COMMANDS | 5877 | .Sh S_SERVER CONNECTED COMMANDS |
| 5878 | If a connection request is established with an SSL client and neither the | 5878 | If a connection request is established with an SSL client and neither the |
| @@ -5885,17 +5885,17 @@ from the client is displayed and any key presses will be sent to the client. | |||
| 5885 | Certain single letter commands are also recognized which perform special | 5885 | Certain single letter commands are also recognized which perform special |
| 5886 | operations: these are listed below. | 5886 | operations: these are listed below. |
| 5887 | .Bl -tag -width "XXXX" | 5887 | .Bl -tag -width "XXXX" |
| 5888 | .It Ar q | 5888 | .It Ar P |
| 5889 | End the current SSL connection, but still accept new connections. | 5889 | Send some plain text down the underlying TCP connection: this should |
| 5890 | cause the client to disconnect due to a protocol violation. | ||
| 5890 | .It Ar Q | 5891 | .It Ar Q |
| 5891 | End the current SSL connection and exit. | 5892 | End the current SSL connection and exit. |
| 5892 | .It Ar r | 5893 | .It Ar q |
| 5893 | Renegotiate the SSL session. | 5894 | End the current SSL connection, but still accept new connections. |
| 5894 | .It Ar R | 5895 | .It Ar R |
| 5895 | Renegotiate the SSL session and request a client certificate. | 5896 | Renegotiate the SSL session and request a client certificate. |
| 5896 | .It Ar P | 5897 | .It Ar r |
| 5897 | Send some plain text down the underlying TCP connection: this should | 5898 | Renegotiate the SSL session. |
| 5898 | cause the client to disconnect due to a protocol violation. | ||
| 5899 | .It Ar S | 5899 | .It Ar S |
| 5900 | Print out some session cache status information. | 5900 | Print out some session cache status information. |
| 5901 | .El | 5901 | .El |
| @@ -5906,7 +5906,7 @@ To accept connections from a web browser the command: | |||
| 5906 | .Pp | 5906 | .Pp |
| 5907 | .Dl $ openssl s_server -accept 443 -www | 5907 | .Dl $ openssl s_server -accept 443 -www |
| 5908 | .Pp | 5908 | .Pp |
| 5909 | can be used for example. | 5909 | can be used, for example. |
| 5910 | .Pp | 5910 | .Pp |
| 5911 | Most web browsers | 5911 | Most web browsers |
| 5912 | .Pq in particular Netscape and MSIE | 5912 | .Pq in particular Netscape and MSIE |
