Fix bugs, make der
[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 $ make ca.der
79
80   This step creates the DER format of the self-signed certificate,
81   which is can be imported into Windows.
82
83
84                 MAKING A SERVER CERTIFICATE
85
86
87 $ vi server.cnf
88
89   Edit the "input_password" and "output_password" fields to be the
90   password for the server certificate.
91
92   Edit the [server] section to have the correct values for your
93   country, state, etc.  Be sure that the commonName field here is
94   different from the commonName for the CA certificate.
95
96 $ make server.pem
97
98   This step creates the server certificate.
99
100   If you have an existing certificate authority, and wish to create a
101   certificate signing request for the server certificate, edit
102   server.cnf as above, and type the following command.
103
104 $ make server.csr
105
106   You will have to ensure that the certificate contains the XP
107   extensions needed by Microsoft clients.
108
109
110                 MAKING A CLIENT CERTIFICATE
111
112
113   Client certificates are used by EAP-TLS, and optionally by EAP-TTLS
114 and PEAP.  The following steps outline how to create a client
115 certificate that is signed by the server certificate created above.
116 You will have to have the password for the server certificate in the
117 "input_password" and "output_password" fields of the server.cnf file.
118
119
120 $ vi client.cnf
121
122   Edit the "input_password" and "output_password" fields to be the
123   password for the client certificate.  You will have to give these
124   passwords to the end user who will be using the certificates.
125
126   Edit the [client] section to have the correct values for your
127   country, state, etc.  Be sure that the commonName field here is
128   the User-Name that will be used for logins!
129
130 $ make client.pem
131
132   The users certificate will be in "commonName.pem",
133   i.e. "user@example.com.pem".
134
135   To create another client certificate, just repeat the steps for
136   making a client certificate, being sure to enter a different login
137   name for "commonName", and a different password.