summaryrefslogtreecommitdiff
path: root/doc/Certificates.txt
blob: 04bf3d780b7fb6de130a9ef44e6706187d701946 (plain)
  1. Public Key Infrastructure (PKI)
  2. ===============================
  3. General
  4. -------
  5. Certificates are not (yet) widely used in Debian, so a typical packaging
  6. error is to purge certificates on package removal (without checking if
  7. the certificate was actially created by that package).
  8. A workaround is generous use of symlinks, so that buggy packages only
  9. remove the symlink.
  10. (Please send a bugreport to the Debian Bug Tracking System if you come
  11. across such a buggy package!)
  12. Hosts
  13. -----
  14. Host certificates can be either self-signed or signed by a CA. The key
  15. can be either embedded into the same file as the certificate or in a
  16. separate file. The simplest form is a self-signed certificate with
  17. null-password embedded key.
  18. Some services (like SMTP TLS in server mode) requires certificate and
  19. key in separate files.
  20. Beware that adding password to host certificates may require you to
  21. manually start the services. Depending on the startup scripts it might
  22. even HANG THE STARTUP PROCESS OF THE SYSTEM!
  23. Self-signed host certificates contain both certificate and key in same
  24. file. CA signed host certificates have separate public (certificate) and
  25. private (key) files.
  26. The CN field of the certificate must be the hostname as accessed from
  27. clients. This means virtual hosting requires separate certificates for
  28. each hostname. Most daemons cannot handle multiple certificates, and
  29. thus do not support SSL/TLS virtual hosting.
  30. The certificate is placed in /etc/ssl/certs/ named by the hostname
  31. appended ".pem". If several certificates are used for same host then
  32. secondary certificates are additionally appended their (primary) service
  33. like this: "<hostname_<service>.pem".
  34. The key (if separate) is placed in /etc/ssl/private/ named similarly.
  35. Host certificate is symlinked from "/etc/ssl/certs/<service>.pem" for
  36. each service depending on the key, and the key (if separate) symlinked
  37. likewise from "/etc/ssl/private/<service>.pem".
  38. Example:
  39. /etc/ssl/certs/mail.jones.dk.pem
  40. /etc/ssl/certs/ldap.jones.dk.pem
  41. /etc/ssl/certs/imapd.pem -> mail.jones.dk.pem
  42. /etc/ssl/certs/ipop3d.pem -> mail.jones.dk.pem
  43. /etc/ssl/certs/postfix.pem -> mail.jones.dk.pem
  44. /etc/ssl/certs/slapd.pem -> ldap.jones.dk.pem
  45. /etc/ssl/private/mail.jones.dk.pem
  46. /etc/ssl/private/ldap.jones.dk.pem
  47. /etc/ssl/private/imapd.pem -> mail.jones.dk.pem
  48. /etc/ssl/private/ipop3d.pem -> mail.jones.dk.pem
  49. /etc/ssl/private/postfix.pem -> mail.jones.dk.pem
  50. /etc/ssl/private/slapd.pem -> ldap.jones.dk.pem
  51. The script /usr/share/local/localmksslcerts can be used to make
  52. self-signed certificates with embedded keys.
  53. Certificates should be chmod'ed 0444 and keys 0400.
  54. Certificate Authority
  55. ---------------------
  56. CA Certificates are divided in a public certificate and a private key.
  57. The CA certificate is placed in /etc/ssl/certs/ and named loosely by the
  58. CN of the organisation using digits [a-zA-Z0-9_-], appended "_CA.pem".
  59. CA key is located in /etc/ssl/private/ equally named.
  60. CA certificate is symlinked from "/etc/ssl/certs/cacert.pem" and the key
  61. symlinked from "/etc/ssl/private/cakey.pem" to ease locating by scripts.
  62. Example:
  63. /etc/ssl/certs/IT_guide_dr_Jones_CA.pem and
  64. /etc/ssl/certs/cacert.pem -> IT_guide_dr_Jones_CA.pem
  65. /etc/ssl/private/IT_guide_dr_Jones_CA.pem
  66. /etc/ssl/private/cakey.pem -> IT_guide_dr_Jones_CA.pem
  67. More info here: http://tirian.magd.ox.ac.uk/~nick/openssl-certs/ca.shtml
  68. Read here about confusion between commercial CAs and actual security:
  69. http://www.counterpane.com/pki-risks.html
  70. Like with hosts, certificates should be chmod'ed 0444 and keys 0400.
  71. Users
  72. -----
  73. Have a look at this web page:
  74. http://www.cise.ufl.edu/help/secure-access/ssl-mail-setup.shtml
  75. The script is at /usr/share/local/mycert, adapted to Debian GNU/Linux.
  76. TODO
  77. ----
  78. Check if possible to use CN=*.my.domain
  79. --
  80. $Id: Certificates.txt,v 1.5 2003-01-14 18:42:01 jonas Exp $