Magic World game server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.7 KiB

5 years ago
  1. # Demo Certificates
  2. This directory contains certificates used by the clients and servers in our
  3. sample programs. These certificates are for testing purposes only and should
  4. **never** be used in a production environment.
  5. As provided, the server certificates use `127.0.0.1` for the Common Name, the
  6. IP address and DNS name. This works fine when you run the client and server on
  7. the same host. However, if you want to run them on separate hosts, you may need
  8. to regenerate the certificates. (This is especially true for the JavaScript
  9. examples.)
  10. We've included the Python script `makedemocerts.py` to simplify this task.
  11. ## Prerequisites
  12. You'll need Python to run the script. The script also depends on a utility
  13. package from a separate [ZeroC repository][1]. You can install this package as
  14. follows:
  15. ```
  16. pip install zeroc-icecertutils
  17. ```
  18. ## Usage
  19. Running the script with `-h` displays the following usage information:
  20. ```
  21. Usage: certs/makedemocerts.py [options]
  22. Options:
  23. -h Show this message.
  24. -d | --debug Debugging output.
  25. --ip <ip> The IP address for the server certificate.
  26. --dns <dns> The DNS name for the server certificate.
  27. --use-dns Use the DNS name for the server certificate common
  28. name (default is to use the IP address).
  29. ```
  30. The `--ip`, `--dns`, and `--use-dns` options affect the generation of the server
  31. certificate. Without any arguments, the script prompts for the value of the IP
  32. address and DNS name.
  33. You can specify an alternate IP address using `--ip` and an alternate DNS name
  34. using `--dns`. The `--use-dns` flag forces the script to use the DNS name as
  35. the server's Common Name instead of the IP address.
  36. [1]: https://github.com/zeroc-ice/icecertutils