Added notes on self-signed certificates
[freeradius.git] / raddb / certs / README
1   This directory contains scripts to create the server certificates.
2 To make a set of default (i.e. test) certificates, simply type:
3
4 $ ./bootstrap
5
6   The "openssl" command will be run against the sample configuration
7 files included here, and will make a self-signed certificate authority
8 (i.e. root CA), and a server certificate.  This "root CA" should be
9 installed on any client machine needing to do EAP-TLS, PEAP, or
10 EAP-TTLS.
11
12   The Microsoft "XP Extensions" will be automatically included in the
13 server certificate.  Without those extensions Windows clients will
14 refuse to authenticate to FreeRADIUS.
15
16   In general, you should use self-signed certificates for 802.1x (EAP)
17 authentication.  When you list root CAs from other organizations in
18 the "CA_file", you permit them to masquerade as you, to authenticate
19 your users, and to issue client certificates for EAP-TLS.
20
21   If FreeRADIUS was configured to use OpenSSL, then simply starting
22 the server in root in debugging mode should also create test
23 certificates, i.e.:
24
25 $ radiusd -X
26
27   That will cause the EAP-TLS module to run the "bootstrap" script in
28 this directory.  The script will be executed only once, the first time
29 the server has been installed on a particular machine.  This bootstrap
30 script SHOULD be run on installation of any pre-built binary package
31 for your OS.  In any case, the script will ensure that it is not run
32 twice, and that it does not over-write any existing certificates.
33
34   If you already have CA and server certificates, rename (or delete)
35 this directory, and create a new "certs" directory containing your
36 certificates.  Note that the "make install" command will NOT
37 over-write your existing "raddb/certs" directory, which means that the
38 "bootstrap" command will not be run.
39
40
41                 NEW INSTALLATIONS OF FREERADIUS
42
43
44   We suggest that new installations use the test certificates for
45 initial tests, and then create real certificates to use for normal
46 user authentication.  See the instructions below for how to create the
47 various certificates.  The old test certificates can be deleted by
48 running the following command:
49
50 $ rm -f *.pem *.der *.csr *.crt *.key *.p12 serial* index.txt*
51
52   Then, follow the instructions below for creating real certificates.
53
54   Once the final certificates have been created, you can delete the
55 "bootstrap" command from this directory, and delete the
56 "make_cert_command" configuration from the "tls" sub-section of
57 eap.conf.
58
59   If you do not want to enable EAP-TLS, PEAP, or EAP-TTLS, then delete
60 the relevant sub-sections from the "eap.conf" file.
61
62
63                 MAKING A ROOT CERTIFICATE
64
65
66 $ vi ca.cnf
67
68   Edit the "input_password" and "output_password" fields to be the
69   password for the CA certificate.
70
71   Edit the [certificate_authority] section to have the correct values
72   for your country, state, etc.
73
74 $ make ca.pem
75
76   This step creates the CA certificate.
77
78
79
80                 MAKING A SERVER CERTIFICATE
81
82
83 $ vi server.cnf
84
85   Edit the "input_password" and "output_password" fields to be the
86   password for the server certificate.
87
88   Edit the [server] section to have the correct values for your
89   country, state, etc.  Be sure that the commonName field here is
90   different from the commonName for the CA certificate.
91
92 $ make server.pem
93
94   This step creates the server certificate.
95
96   If you have an existing certificate authority, and wish to create a
97   certificate signing request for the server certificate, edit
98   server.cnf as above, and type the following command.
99
100 $ make server.csr
101
102   You will have to ensure that the certificate contains the XP
103   extensions needed by Microsoft clients.
104
105
106                 MAKING A CLIENT CERTIFICATE
107
108
109   Client certificates are used by EAP-TLS, and optionally by EAP-TTLS
110 and PEAP.  The following steps outline how to create a client
111 certificate that is signed by the server certificate created above.
112 You will have to have the password for the server certificate in the
113 "input_password" and "output_password" fields of the server.cnf file.
114
115
116 $ vi client.cnf
117
118   Edit the "input_password" and "output_password" fields to be the
119   password for the client certificate.  You will have to give these
120   passwords to the end user who will be using the certificates.
121
122   Edit the [client] section to have the correct values for your
123   country, state, etc.  Be sure that the commonName field here is
124   the User-Name that will be used for logins!
125
126 $ make client.pem
127
128   The users certificate will be in "commonName.pem",
129   i.e. "user@example.com.pem".
130
131   To create another client certificate, just repeat the steps for
132   making a client certificate, being sure to enter a different login
133   name for "commonName", and a different password.