Exporting_the_Files.mdwn 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. In order to use the certificate to authenticate a web service, it needs to be
  2. exported from TinyCA and copied to a location where your server can find it. To
  3. be more precise, the files we'll export are:
  4. - __CA certificate__: This file can (and should) be made public safely. Clients
  5. will need to have it installed in order for their software to trust the
  6. certificates signed by your CA.
  7. - __Revocation list__: This file should be made available at the address you
  8. specified while configuring the CA. It will allow you later to revoke
  9. signatures, e.g. if a certificate was misused.
  10. - __Server certificate__: This file can be safely made public, but you don't
  11. need to send it to clients. It is one of the files you'll need to make
  12. available to the servers you run, in order for them to work with SSL.
  13. - __Server key__: This file __IS PRIVATE__. Protect it with proper permissions!
  14. Make it read-only, and preferrably owned by root. Some servers (such as
  15. lighttpd) access it while being root, so `chmod 400` and `chown root:root` is
  16. the best thing to do, when possible. It depends on the implementation of each
  17. server. The server key needs to be available to the server together with the
  18. server certificate.
  19. Another commonly used file is the __CA chain file__, but it is only required
  20. when you use sub-CAs. Since in our setup there aren't any, and the root CA signs
  21. the server certificates directly, no chain file is needed.
  22. Let's export the CA certificate. In the main window of TinyCA, click the "Export
  23. CA Certificate" toolbar button, which is the second from the right (or left, if
  24. you use an RTL locale). Choose a location to export to. Example:
  25. [[!img 6-export-ca-cert.png class="center"]]
  26. In order to export the revocation list, click the right most button (or left
  27. most, if you use an RTL locale) on the toolbar. Choose a location, enter the CA
  28. password and validity time. You can probably use the default for now, but I'm
  29. not an expert. If you need advice on expiration times, I hope other resources
  30. can help. If you do know, please share it here if you can, to make this guide
  31. more complete.
  32. [[!img 7-export-crl.png class="center"]]
  33. In order to export the server certificate, go to the Certificates tab and
  34. right-click on the certificate line. Choose "Export Certificate" from the popup
  35. menu.
  36. [[!img 8.1-export-cert-menu.png class="center"]]
  37. Choose a storage location and click "Save".
  38. [[!img 8.2-export-cert-filled-nokey.png class="center"]]
  39. Finally, in order to export the server key, go to the Keys tab. Right-click on
  40. the key line and select "Export Key".
  41. [[!img 9.1-export-key-menu.png class="center"]]
  42. Choose a storage location. Set "Without Passphrase" to yes, otherwise you'll
  43. need to supply the key passphrase every time you start the web server. Click
  44. "Save". You will be asked for the certificate passphrase.
  45. [[!img 9.2-export-key-filled-nocert.png class="center"]]