Rev 4 | Blame | Compare with Previous | Last modification | View Log | RSS feed
This directory contains scripts to create the server certificates.To make a set of default (i.e. test) certificates, simply type:$ ./bootstrapThe "openssl" command will be run against the sample configurationfiles included here, and will make a self-signed certificate authority(i.e. root CA), and a server certificate. This "root CA" should beinstalled on any client machine needing to do EAP-TLS, PEAP, orEAP-TTLS.The Microsoft "XP Extensions" will be automatically included in theserver certificate. Without those extensions Windows clients willrefuse to authenticate to FreeRADIUS.The root CA and the "XP Extensions" file also contain a crlDistributionPointsattribute. The latest release of Windows Phone needs this to be presentfor the handset to validate the RADIUS server certificate. The RADIUSserver must have the URI defined but the CA need not have...however itis best practice for a CA to have a recovation URI. Note that whilstthe Windows Mobile client cannot actually use the CRL when doing 802.1Xit is recommended that the URI be an actual working URL and contain arecovation format file as there may be other OS behaviour at play andfuture OSes that may do something with that URI.In general, you should use self-signed certificates for 802.1x (EAP)authentication. When you list root CAs from other organizations inthe "CA_file", you permit them to masquerade as you, to authenticateyour users, and to issue client certificates for EAP-TLS.If FreeRADIUS was configured to use OpenSSL, then simply startingthe server in root in debugging mode should also create testcertificates, i.e.:$ radiusd -XThat will cause the EAP-TLS module to run the "bootstrap" script inthis directory. The script will be executed only once, the first timethe server has been installed on a particular machine. This bootstrapscript SHOULD be run on installation of any pre-built binary packagefor your OS. In any case, the script will ensure that it is not runtwice, and that it does not over-write any existing certificates.If you already have CA and server certificates, rename (or delete)this directory, and create a new "certs" directory containing yourcertificates. Note that the "make install" command will NOTover-write your existing "raddb/certs" directory, which means that the"bootstrap" command will not be run.NEW INSTALLATIONS OF FREERADIUSWe suggest that new installations use the test certificates forinitial tests, and then create real certificates to use for normaluser authentication. See the instructions below for how to create thevarious certificates. The old test certificates can be deleted byrunning the following command:$ rm -f *.pem *.der *.csr *.crt *.key *.p12 serial* index.txt*Then, follow the instructions below for creating real certificates.Once the final certificates have been created, you can delete the"bootstrap" command from this directory, and delete the"make_cert_command" configuration from the "tls" sub-section ofeap.conf.If you do not want to enable EAP-TLS, PEAP, or EAP-TTLS, then deletethe relevant sub-sections from the "eap.conf" file.MAKING A ROOT CERTIFICATE$ vi ca.cnfEdit the "input_password" and "output_password" fields to be thepassword for the CA certificate.Edit the [certificate_authority] section to have the correct valuesfor your country, state, etc.$ make ca.pemThis step creates the CA certificate.$ make ca.derThis step creates the DER format of the self-signed certificate,which is can be imported into Windows.MAKING A SERVER CERTIFICATE$ vi server.cnfEdit the "input_password" and "output_password" fields to be thepassword for the server certificate.Edit the [server] section to have the correct values for yourcountry, state, etc. Be sure that the commonName field here isdifferent from the commonName for the CA certificate.$ make server.pemThis step creates the server certificate.If you have an existing certificate authority, and wish to create acertificate signing request for the server certificate, editserver.cnf as above, and type the following command.$ make server.csrYou will have to ensure that the certificate contains the XPextensions needed by Microsoft clients.MAKING A CLIENT CERTIFICATEClient certificates are used by EAP-TLS, and optionally by EAP-TTLSand PEAP. The following steps outline how to create a clientcertificate that is signed by the server certificate created above.You will have to have the password for the server certificate in the"input_password" and "output_password" fields of the server.cnf file.$ vi client.cnfEdit the "input_password" and "output_password" fields to be thepassword for the client certificate. You will have to give thesepasswords to the end user who will be using the certificates.Edit the [client] section to have the correct values for yourcountry, state, etc. Be sure that the commonName field here isthe User-Name that will be used for logins!$ make client.pemThe users certificate will be in "emailAddress.pem",i.e. "user@example.com.pem".To create another client certificate, just repeat the steps formaking a client certificate, being sure to enter a different loginname for "commonName", and a different password.PERFORMANCEEAP performance for EAP-TLS, TTLS, and PEAP is dominated by SSLcalculations. That is, a normal system can handle PAPauthentication at a rate of 10k packets/s. However, SSL involvesRSA calculations, which are very expensive. To benchmark your system,do:$ openssl speed rsaor$ openssl speed rsa2048to test 2048 bit keys.A 1GHz system will likely do 30 calculations/s. A 2Ghz system maydo 50 calculations/s, or more. That number is also the number ofauthentications/s that can be done for EAP-TLS (or TTLS, or PEAP).COMPATIBILITYThe certificates created using this method are known to be compatiblewith ALL operating systems. Some common issues are:- Windows requires certain OID's in the certificates. If it doesn'tsee them, it will stop doing EAP. The most visibile effect isthat the client starts EAP, gets a few Access-Challenge packets,and then a little while later re-starts EAP. If this happens, seethe FAQ, and the comments in raddb/eap.conf for how to fix it.- Windows requires the root certificates to be on the client PC.If it doesn't have them, you will see the same issue as above.- Windows XP post SP2 has a bug where it has problems withcertificate chains. i.e. if the server certificate is anintermediate one, and not a root one, then authentication willsilently fail, as above.- Some versions of Windows CE cannot handle 4K RSA certificates.They will (again) silently fail, as above.- In none of these cases will Windows give the end user anyreasonable error message describing what went wrong. This leadspeople to blame the RADIUS server. That blame is misplaced.- Certificate chains of more than 64K bytes are known to not work.This is a problem in FreeRADIUS. However, most clients cannothandle 64K certificate chains. Most Access Points will shut downthe EAP session after about 50 round trips, while 64K certificatechains will take about 60 round trips. So don't use largecertificate chains. They will only work after everyone upgradeeverything in the network.- All other operating systems are known to work with EAP andFreeRADIUS. This includes Linux, *BSD, Mac OS X, Solaris,Symbian, along with all known embedded systems, phones, WiFidevices, etc.- Someone needs to ask Microsoft to please stop making life hard fortheir customers.SECURITY CONSIDERATIONSThe default certificate configuration files used to use MD5 formessage digests, to maintain compatibility with network equipment thatsupports only this algorithm. They now use SHA1.MD5 has known weaknesses and is discouraged in favor of SHA1 (seehttp://www.kb.cert.org/vuls/id/836068 for details). If your networkequipment requires the MD5 signature algorithm, we recommend that youchange the "ca.cnf", "server.cnf", and "client.cnf" files to specifythe use of SHA1 for the certificates. To do this, change the'default_md' entry in those files from 'sha1' to 'md5'.