We've had some sort of command-line error. Print out the server options.
(int build_mode, String option)
| 618 | * We've had some sort of command-line error. Print out the server options. |
| 619 | */ |
| 620 | private void print_server_options(int build_mode, String option) |
| 621 | { |
| 622 | int cert_size = SSLUtil.maxCerts(); |
| 623 | int ca_cert_size = SSLUtil.maxCACerts(); |
| 624 | |
| 625 | System.out.println("unknown option " + option); |
| 626 | System.out.println("usage: s_server [args ...]"); |
| 627 | System.out.println(" -accept arg\t- port to accept on (default " + |
| 628 | "is 4433)"); |
| 629 | System.out.println(" -quiet\t\t- No server output"); |
| 630 | |
| 631 | if (build_mode >= axtlsj.SSL_BUILD_SERVER_ONLY) |
| 632 | { |
| 633 | System.out.println(" -cert arg\t- certificate file to add (in " + |
| 634 | "addition to default) to chain -"); |
| 635 | System.out.println("\t\t Can repeat up to " + cert_size + " times"); |
| 636 | System.out.println(" -key arg\t- Private key file to use"); |
| 637 | System.out.println(" -pass\t\t- private key file pass phrase source"); |
| 638 | } |
| 639 | |
| 640 | if (build_mode >= axtlsj.SSL_BUILD_ENABLE_VERIFICATION) |
| 641 | { |
| 642 | System.out.println(" -verify\t- turn on peer certificate " + |
| 643 | "verification"); |
| 644 | System.out.println(" -CAfile arg\t- Certificate authority. "); |
| 645 | System.out.println("\t\t Can repeat up to " + |
| 646 | ca_cert_size + " times"); |
| 647 | } |
| 648 | |
| 649 | if (build_mode == axtlsj.SSL_BUILD_FULL_MODE) |
| 650 | { |
| 651 | System.out.println(" -debug\t\t- Print more output"); |
| 652 | System.out.println(" -state\t\t- Show state messages"); |
| 653 | System.out.println(" -show-rsa\t- Show RSA state"); |
| 654 | } |
| 655 | |
| 656 | System.exit(1); |
| 657 | } |
| 658 | |
| 659 | /** |
| 660 | * We've had some sort of command-line error. Print out the client options. |
no test coverage detected