Setting up the CA
Follow the steps on setting up a Certificate Authority (CA) using OpenSSL.
Issuing the client certificate and private key
Once the CA has been configured, we will generate a private key and an unsigned public key digital certificate.
# openssl req -new -days 365 -newkey rsa:1024
-keyout sslkey.pem -out unsigned.pem
The unsigned public key digital certificate, stored in a PEM-encoded file named
unsigned.pem will be sent to the CA for signing:
# openssl ca -in unsigned.pem -out cert.pem
Installing the client certificate and private key
The next step consists in installing the private key, public key digital certificate and CA public key certificate.
The private key, public key digital certificate and CA certificate files should get installed into a location where only root and wpa_supplicant can access them, for example, /etc/wpa:
# mkdir /etc/wpa
# chown root.root /etc/wpa
# chmod 700 /etc/wpa
Mac OS X
Mac OS X can only import private keys in PKCS#12 so we need to export all the previous items to a suitable format:
# openssl pkcs12 -export -in cert.pem -inkey key.pem
-out client.p12 -name "host.domain"
"host.domain" denotes the FQDN of the host which this digital certificate and private key are intended for.
The output file client.p12 contains the private key and public key digital certificate. This bundle should get moved to the host using a secure distribution channel, like an SSH/SCP/SFTP session or a USB key. Also, the CA digital certificate, usually named cacert.pem, should also get copied to the host.
On Mac OS X, using the GUI, double click the cacert.pem file, and install the CA certificate into the X509Anchors keychain. This a system-wide keychain intended to store X.509 CA root digital certificates.
Next, using the GUI, double click on client.p12 file, supply the password that protects the private key stored in this file, and choose to install both the private key and public key into the login keychain. Next, make sure the private key has been installed:
Configuring the AirPort Express Wireless Access Point
Launch AirPort Admin Utility, select the desired base station and click the Configure icon from the toolbar:
Click the Change Wireless Security… button:
In this new window, fill in the information about the RADIUS server, like its IP address, shared secret and so on.
Configuring the Supplicant for WPA2 Enterprise
Create /etc/wpa_supplicant.conf using the following data:
The identity directive is required, or else the EAP-TLS negotiation will fail.
ap_scan=2 and scan_ssid=1 are needed when the Wireless Acccess Point is configured to not broadcast the ESSID.
Mac OS X
Launch Internet Connect from the Wireless menu:
If no 802.1X icon appears on the toolbar, choose File -> New 802.1X Conection…. Click the 802.1X icon. The window will look like this:
From the Configuration drop-down, select Edit Configurations…:
A window like this will open:
Fill in both the “Description” and “Wireless Network” fields with the ESSID of the Wireless network. Leave “User Name” and “Password” blanked, since we are not using password-based authentication.
From the “Authentication” listbox, clear the checkbox for all the protocols except for TLS. Select the TLS protocol and click the Configure button. A new window will open for you to select the private key that will be used for the EAP-TLS authentication mechanism:
From the drop-down listbox, select the name of the private key that matches the name of the private key installed in the previous section.
Click the Connect button. The Supplicant will authenticate against the Wireless Access Point. At this point, it is possible that Mac OS X asks confirmation for accessing the private key stored in your keychain. It is recommended to “Always Allow” the Supplicant access to the private key.
Launch System Preferences -> Network and Configure… the AirPort interface:
Click the “+” button to add a Preferred network:
Just enter the ESSID of the Wireless network and choose WPA2 Enterprise from the Wireless Security drop-down listbox. Also, make sure the Configuration field shows the name of the 802.1X configuration we created previously using Internet Connect.
Leave the rest of the fields blank, since we are not using password-based authentication.