source: branches/ithildin-1.1/doc/ssl.txt @ 490

Revision 490, 4.4 KB checked in by wd, 8 years ago (diff)

Add Id/Rev? keywords.

  • Property svn:keywords set to Id Rev
Line 
1-------------------------------------------------------------------------------
2$Id$
3-------------------------------------------------------------------------------
4[Table of Contents]:
5...1: Implementation details
6...2: Getting SSL support working
7...3: Generating a self-signed certificate
8...4: FAQs
9-------------------------------------------------------------------------------
10[1: Implementation details]:
11
12Currently ithildin uses OpenSSL for its SSL library.  It supports both
13OpenSSL 0.9.6 and OpenSSL 0.9.7, and should support future versions as well.
14
15That said, it does not make completely full use of OpenSSL's capabilities.
16In particular it does have support for CRLs (Certificate Revocation Lists)
17and does not allow for end-user configuration of some specific parameters
18(such as the available cipher list).
19
20However, most basic SSL functionality is supported.  The socket API can
21function as both an SSL client and an SSL server with the caveat that as an
22SSL client it still requires a key, though the SSL specification makes no
23such demands.
24
25-------------------------------------------------------------------------------
26[2: Getting SSL support working]:
27
28Getting SSL supporting working can be relatively painless depending on your
29system of choice.  For most all free Unixes it is as simple as
30adding/uncommenting the 'ssl' section to your main configuration file
31(usually ithildin.conf) and setting up the necessary private/public key
32pair.  If, however, you use a system without a random number generating
33device (/dev/random) you will have to go through the extra steps of setting
34up EGD.  That is not covered here, and instead you should refer to OpenSSL's
35documentation on this.
36
37You can also, at your option, use your own specific CA (certificate
38authority) file with the public keys of CAs which you wish to trust.  This
39may be necessary for certain modules, because the SSL code requires that
40when a key is presented to it that it be signed by a recognized certificate
41authority.
42
43-------------------------------------------------------------------------------
44[3: Generating a self-signed certificate]:
45
46Sometimes it is desirable to create a self-signed SSL certificate.  If you
47are testing, or are using SSL in a closed environment, or otherwise do not
48need the security added by a trusted third-party signing your SSL
49certificate, this is the way to go.  Generating a self-signed SSL
50certificate with OpenSSL is actually fairly trivial, just follow the steps
51below:
52
53#1: Decide where you want to put your certificates.  I recommend placing
54them in the directory containing the main server config files under an 'ssl'
55subdirectory.  So, if you have installed ithildin in /usr/local, and
56/usr/local/etc/ithildin is where your config files live, you would do the
57following:
58$ cd /usr/local/etc/ithildin
59$ mkdir ssl
60
61#2: Generate your certificate and private key.  This is done via the
62'openssl' command line utility in the following manner:
63$ openssl req -x509 -newkey rsa:1024 -keyout ssl/key.pem -out ssl/cert.pem
64This will ask you various questions about your locality for the purposes of
65the key.  Most of these are straightforward, HOWEVER, the "Common name"
66field should not be filled with your personal name, but rather the hostname
67that your server will be calling itself.  You can, at your discretion,
68create your rsa key using more than 1024 bits (and this is recommended.
692048 is a good value, and even 4096 is not unreasonable on faster hardware).
70
71Also, don't forget to make sure your private key is made as private as
72possible.  At least remember to change the access modes on it so that it can
73only be accessed by the user the server will be running as.  Doing something
74like the following should achieve this:
75$ chmod u=rw,go= ssl/key.pem
76$ chown <whoever> ssl/key.pem
77
78#3: This step is optional, and is actually provided simply because a lot of
79people want to know.  By default, OpenSSL requires that you encrypt your
80private key with a passphrase.  It will then prompt you for that passphrase
81every time you start the server.  You can decrypt the RSA key (removing the
82need for passphrase entry on startup).  I don't recommend that you do this,
83but you may find it necessary/useful.  If so, do the following:
84$ openssl rsa -in ssl/key.pem -out ssl/key2.pem
85[enter passphrase]
86$ mv ssl/key2.pem ssl/key.pem
87And you'll be all set.
88
89-------------------------------------------------------------------------------
90[4: FAQs]:
91
92<left blank>
93
Note: See TracBrowser for help on using the repository browser.