tls.mdwn 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. The instructions below are written for the Rel4tion server. For more general
  2. purpose instructions for CAs, see [[SSL]].
  3. # Intro
  4. Rel4tion manages its own SSL certificates. Since they aren't signed by a
  5. centralized [[!wikipedia "Certificate Authority"]] (CA), your client
  6. applications (web browser, Jabber client, etc.) won't trust them unless you
  7. explicity mark them as trusted. Many applications will simply ask you whether
  8. you wish to trust the certificate. **This is probably the safest approach**.
  9. In addition to this, Rel4tion manages its own CA. Trusting the CA means your
  10. computer automatically trusts any certificate signed by it. However, since this
  11. CA is made by [[fr33domlover]], who just runs a small home server and isn't a
  12. security expert, **you should understand the implications before you install
  13. it. If you don't much about SSL and CAs, you probably shouldn't do that. Just
  14. follow to the next section below.**
  15. # (1) Trusting Specific Certificates
  16. This is the best path for using Rel4tion's server with SSL/TLS. Here are the
  17. options:
  18. 1. Tell your browser (or Jabber client etc.) to trust the specific
  19. certificate (not the whole CA)
  20. 2. Tell the browser/client to not verify the certificate. This is like the first
  21. option, but allows **fake certificates to work without being detected**,
  22. which is BAD. So the **previous** option is probably better.
  23. 3. Use plain HTTP. For web browsing, it's probably reasonable. For Jabber,
  24. Bitlbee, Mumble, etc. you'll probably prefer one of the other options.
  25. # (2) Trusting the CA
  26. If you took the first path in the previous section (trusting specific
  27. certificates), please ignore this section.
  28. **If you understand the implications**, this is an option too. Anyway, read
  29. [[here|http://www.inventati.org/en/ssl.html]] before you start. Specifically,
  30. this quote from that page is important:
  31. > As we said before, you put your trust in the hands of the CA when accepting
  32. > that the connection to a site is secure. We decided it would be illogical to
  33. > put the trust relationship between our users and us in the hands of
  34. > profit-oriented corporations. Corporations that are also keen to collaborate
  35. > with governments and intelligence agencies. For example, your government
  36. > could get a commercial CA to collaborate, and hand over a signed certificate
  37. > for our domains. Then the government will be able to set up a proxy between
  38. > you and us, letting your browser believe that the connection is secure, while
  39. > being able to decypher and intercept all your traffic. As recent news have
  40. > proved, we made the right decision not to trust corporations to stand up to
  41. > government wiretapping requests.
  42. So why does Rel4tion have a CA?
  43. 1. The text above
  44. 2. It's a workaround until the centralized broken CA system is replaced by a
  45. web-of-trust based protocol, such as [[!wikipedia Monkeysphere]].
  46. 3. It's an alternative to Monkeysphere, which isn't widely used yet.
  47. 4. Fighting for decentralization and freedom. Centralized commercial CAs want
  48. your personal information and trust you if you pay them. They trust even
  49. websites like g00gle known to spy and abuse. An independent CA only trusts
  50. friends etc., which is the way trust generally works between people.
  51. **WARNING**: If your computer trusts Rel4tion's CA, it means that the people
  52. who have access to the CA's private key ([[fr33domlover]], unless someone
  53. manages to make a copy of it) can authorize any certificate they like, and your
  54. computer will automatically trust them. This is true for *any* CA, but some CAs
  55. are approved by GNU/Linux distributions and web browsers, while Rel4tion's CA
  56. hasn't been tested by any "authority". So *make sure you understand the risk*
  57. before proceeding.
  58. The following instructions are for the Debian-based distributions. Information
  59. about other (fully free) distributions, such as Parabola, is welcome.
  60. ## Download
  61. If you still want to install the CA, here's how.
  62. Get the CA certificate and the signature from the website. You ca do it on the
  63. command like like this:
  64. $ wget --no-verbose http://rel4tion.org/rel4tion-ca.crt
  65. 2014-07-14 10:07:13 URL:http://rel4tion.org/rel4tion-ca.crt
  66. [2667/2667] -> "rel4tion-ca.crt" [1]
  67. $ wget --no-verbose http://rel4tion.org/rel4tion-ca.crt.sig
  68. 2014-07-14 10:07:13 URL:http://rel4tion.org/rel4tion-ca.crt.sig
  69. [287/287] -> "rel4tion-ca.crt.sig" [1]
  70. ## Verify
  71. If you happen to trust [[fr33domlover]]'s GPG key, you just need to verify the
  72. signature. GnuPG will inform you it is trusted (unless it isn't):
  73. $ gpg --verify rel4tion-ca.crt.sig rel4tion-ca.crt
  74. gpg: Signature made IST 20:54:50 2014 Nov 26 Wed using RSA key ID 63E5E57D
  75. gpg: Good signature from "fr33domlover <fr33domlover@rel4tion.org>"
  76. gpg: aka "fr33domlover <fr33domlover@riseup.net>"
  77. gpg: aka "fr33domlover <fr33domlover@inventati.org>"
  78. Notice the **Good signature** line. That is what tells you whether you
  79. GPG-trust the key.
  80. If you don't GPG-trust the key, make sure it's the right key by comparing its
  81. fingerprint. You'll know if the signature isn't trusted because GnuPG displays
  82. a warning:
  83. gpg: WARNING: This key is not certified with a trusted signature!
  84. gpg: There is no indication that the signature belongs to the
  85. owner.
  86. In this case, make sure the key fingerprint is:
  87. 6FEE C222 7323 EF85 A49D 5487 5252 C5C8 63E5 E57D
  88. In order to get the fingerprint of the key which made the signature you
  89. downloaded (so that you can compare to the one above), look at the "key ID" is
  90. the output you got from `gpg --verify`. It should be the same as in the example
  91. above. If not, **don't** proceed to the installation and contact me. If it's
  92. the same, get the fingerprint like this:
  93. gpg --recv-keys 63E5E57D
  94. gpg --fingerprint 63E5E57D
  95. Make sure the output matches the long fingerprint line above.
  96. If everything went well, you can delete the *.sig* file. The next step is to
  97. install the *.crt* file.
  98. ## Install
  99. Debian-based distributions, such as Trisquel, have a system list of trusted
  100. certificates, and you can add more manually. In order to add **Rel4tion**'s CA
  101. certificate do the following:
  102. $ su
  103. # cp /home/joe/rel4tion-ca.crt /usr/local/share/ca-certificates
  104. # update-ca-certificates
  105. You will see output like this:
  106. Updating certificates in /etc/ssl/certs... 1 added, 0 removed; done.
  107. Running hooks in /etc/ca-certificates/update.d....
  108. Adding debian:rel4tion-ca.pem
  109. done.
  110. The permissions look like this:
  111. # ls -l /usr/local/share/ca-certificates
  112. -rw-r--r-- 1 root staff 2667 Jul 14 11:43 rel4tion-ca.crt
  113. ## Specific Applications
  114. Some programs don't integrate well with the system, and maintain their own
  115. separate list of trusted CAs. For example, GNU IceCat and other Firefox
  116. derivatives are like this. If you use them, you'll need to go to their Options
  117. and add the certificate there.