Introduction

This document describes how to generate a Certificate Signing Request (CSR) in order to obtain a third-party certificate and how to download a chained certificate to a Wireless LAN (WLAN) controller (WLC).

Prerequisites

Requirements

Before you attempt this configuration, you should have knowledge of these topics:

How to configure the WLC, the Lightweight Access Point (LAP), and the wireless client card for basic operation

How to use the OpenSSL application

Public key infrastructure and digital certificates

Components Used

The information in this document is based on these software and hardware versions:

Cisco 5508 WLC that runs firmware Version 8.3.102

OpenSSL application for Microsoft Windows

Enrollment tool that is specific to the third-party Certification Authority (CA)

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Chained Certificates

A certificate chain is a sequence of certificates, where each certificate in the chain is signed by the subsequent certificate. The purpose of a certificate chain is to establish a chain of trust from a peer certificate to a trusted CA certificate. The CA vouches for the identity in the peer certificate when it signs it. If the CA is one that you trust, which is indicated by the presence of a copy of the CA certificate in your root certificate directory, this implies you can trust the signed peer certificate as well.

Often, the clients do not accept the certificates because they were not created by a known CA. The client typically states that the validity of the certificate cannot be verified. This is the case when the certificate is signed by an intermediate CA, which is not known to the client browser. In such cases, it is necessary to use a chained SSL certificate or certificate group.

Support for Chained Certificate

The controller allows for the device certificate to be downloaded as a chained certificate for web authentication.

Certificate Levels

Level 0 - Use of only a server certificate on the WLC

Level 1 - Use of a server certificate on the WLC and a CA root certificate

Level 2 - Use of a server certificate on the WLC, one single CA intermediate certificate, and a CA root certificate

Level 3 - Use of a server certificate on the WLC, two CA intermediate certificates, and a CA root certificate

The WLC does not support chained certificates more than 10KB in size on the WLC. However, this restriction has been removed in WLC Version 7.0.230.0 and later.

Note: Chained certificates are supported for web authentication only; they are not supported for the management certificate.

Note: Wildcard certificates are fully supported for local EAP, management or webauthentication

Web authentication certificates can be any of these:

Chained

Unchained

Auto-generated

Note: In WLC Version 7.6 and later, only chained certificates are supported in the WLC for web authentication.

If you are looking to generate an unchained certificate for management purpose, you can follow this document and ignore the parts where the certificate is combined with the CA certificate.

This document discusses how to properly install a chained Secure Socket Layer (SSL) certificate to a WLC.

Step 1. Generate a CSR

There are two ways to generate a CSR. Either manually with OpenSSL (the only way possible in pre-8.3 WLC software) or using the WLC itself to generate the CSR (Available after 8.3.102).

Option A. CSR with OpenSSL

Note: Chrome version 58 and later does not trust the Common Name of the certificate alone and requires Subject Alternate Name to also be present. The following section will explain how to add SAN fields to the OpenSSL CSR which is a new requirement for this browser.

In Microsoft Windows, by default, openssl.exe is located at C:\ > openssl > bin.

Note: OpenSSL Version 0.9.8 is the recommended version for old WLC releases; however, as of Version 7.5, support for OpenSSL Version 1.0 was also added (refer to Cisco bug ID CSCti65315 - Need Support for certificates generated using OpenSSL v1.0) and is the recommended version to use. OpenSSL 1.1 works was also tested and works great on 8.x and later WLC releases.

Locate your OpenSSL config file and make a copy of it in order to edit it for this CSR. Edit the copy to add the following sections :

The lines starting with "DNS.1", "DNS.2" and so on should contain all the alternate names your certificates will have. You can then write any possible URL you will be using for the WLC. The lines in bold above were not present or were commented in our lab openSSL version, it may vary greatly depending on operating system and openssl version. We save this modified version of the config as openssl-san.cnf for this example.

After you issue the command, there is a prompt for some information: country name, state, city, and so forth. Provide the required information.

Note: It is important that you provide the correct Common Name. Ensure that the host name that is used to create the certificate (Common Name) matches the Domain Name System (DNS) host name entry for the virtual interface IP address on the WLC and that the name exists in the DNS as well. Also, after you make the change to the Virtual IP (VIP) interface, you must reboot the system in order for this change to take effect.

Here is an example:

OpenSSL>req -new -newkey rsa:1024 -nodes -keyout mykey.pem -out myreq.pem -config openssl-san.cnfLoading 'screen' into random state - doneGenerating a 1024 bit RSA private key................................................................++++++...................................................++++++writing new private key to 'mykey.pem'-----You are about to be asked to enter information that will be incorporatedinto your certificate request.What you are about to enter is what is called a Distinguished Name or a DN.There are quite a few fields but you can leave some blankFor some fields there will be a default value,If you enter '.', the field will be left blank.-----Country Name (2 letter code) [AU]:USState or Province Name (full name) [Some-State]:CALocality Name (eg, city) []:San JoseOrganization Name (eg, company) [Internet Widgits Pty Ltd]:ABCOrganizational Unit Name (eg, section) []:CDECommon Name (eg, YOUR name) []:XYZ.ABCEmail Address []:Test@abc.com

Please enter the following 'extra' attributesto be sent with your certificate requestA challenge password []:Test123An optional company name []:OpenSSL>

You can verify the CSR (especially for SAN attributes presencE) with openssl req -text -noout -in csrfilename

After you provide all of the required details, two files are generated:

a new private key that includes the name mykey.pem

a CSR that includes the name myreq.pem

Option B. CSR Generated by the WLC

If your WLC runs Software Version 8.3.102 or later, the more secure option (and easiest too) is to use the WLC to generate the CSR. The advantage is that the key is generated on the WLC and never leaves the WLC; thus is never exposed in the outside world.

As of now, this method does not allow to configure SAN in the CSR which might lead to issues with certain browsers which requires the presence of a SAN attribute. Some CA allow to insert SAN fields at signing time, so it's a good idea to check with your CA.

Generating the CSR by the WLC itself will use a 2048 bits key size and ecdsa key size will be 256 bits.

Note: If you run the csr generation command and do not install the resulting certificate yet, your WLC will be completely unreachable on HTTPS at the next reboot, as the WLC will use the newly generated CSR key after reboot but does not have the certificate that goes with it.

In order to generate a CSR for web authentication, enter this command:

Note: The CSR is printed on the terminal after you enter the command. There are no other ways to retrieve it; it is not possible to upload it from the WLC nor is it possible to save it. You must copy/paste it to a file on your computer after you enter the command. The generated key stays on the WLC until the next CSR is generated (the key is thus overwritten). If you ever have to change the WLC hardware later on (RMA), you will not be able to reinstall the same certificate as a new key and CSR will have to be generated on the new WLC.

You then have to hand over this CSR to your third-party signing authority or your enterprise public key infrastructure (PKI).

Step 2. Get the Certificate Signed

Option A: Obtain the Final.pem File from your Enterprise CA

This example only showcases an existing enterprise CA (Windows Server 2012 in this example) and does not cover the steps to set up a Windows Server CA from scratch.

Go to your enteprrise CA page in the browser (usually https://<CA-ip>/certsrv) and click Request a certificate.

Click advanced certificate request.

Enter the CSR you obtained from the WLC or OpenSSL. In the Certificate Template drop-down list, choose Web Server.

Click the Base 64 encoded radio button.

If the downloaded certificate is of type PKCS7 (.p7b), then you need to convert it to PEM (in the below example we downloaded the certificate chain as filename "All-certs.p7b") :

openssl pkcs7 -print_certs -in All-certs.p7b -out All-certs.pem

6. Combine the certificate chain (in this example, it is named "All-certs.pem") certificates with the private key that you generated along with the CSR (the private key of the device certificate, which is mykey.pem in this example) if you went with option A (that is, you used OpenSSL to generate the CSR), and save the file as final.pem. If you generated the CSR directly from the WLC (option B) you can skip this step.

Issue these commands in the OpenSSL application in order to create the All-certs.pem and final.pem files:

Note: In this command, you must enter a password for the parameters -passin and -passout. The password that is configured for the -passout parameter must match the certpassword parameter that is configured on the WLC. In this example, the password that is configured for both the -passin and -passout parameters is check123.

Final.pem is the file that you must download to the WLC if you followed “Option A. CSR with OpenSSL”. If you followed “Option B. CSR generated by the WLC itself”, then All-certs.pem is the file that you must download to the WLC. The next step is to download this file to the WLC.

Note: If the upload of the certificate to the WLC fails, it may be that you do not have the whole chain in the pem file. Refer to the step 2 of option B (obtain the final.pem from a 3rd party CA) below to see how it should look like. If you only see one certificate in the file, then you need to manually download all the intermediate and root CA certificate files and append them (by simple copy paste) to the file to create the chain.

Option B: Obtain the Final.pem File from a Third-Party CA

Copy and paste the CSR information into any CA enrollment tool.

After you submit the CSR to the third-party CA, the third-party CA digitally signs the certificate and sends back the signed certificate chain through email. In the case of chained certificates, you receive the entire chain of certificates from the CA. If you only have one intermediate certificate as in this example, you receive these three certificates from the CA:

Root certificate.pem

Intermediate certificate.pem

Device certificate.pem

Note: Make sure that the certificate is Apache-compatible with Secure Hash Algorithm 1 (SHA1) encryption.

Once you have all three certificates, copy and paste the contents of each .pem file into another file in this order:

Combine the All-certs.pem certificate with the private key that you generated along with the CSR (the private key of the device certificate, which is mykey.pem in this example) if you went with option A (that is, you used OpenSSL to generate the CSR), and save the file as final.pem. If you generated the CSR directly from the WLC (option B) you can skip this step.

Issue these commands in the OpenSSL application in order to create the All-certs.pem and final.pem files:

Note: In this command, you must enter a password for the parameters -passin and -passout. The password that is configured for the -passout parameter must match the certpassword parameter that is configured on the WLC. In this example, the password that is configured for both the -passin and -passout parameters is check123.

Final.pem is the file that you must download to the WLC if you followed “Option A. CSR with OpenSSL”. If you followed “Option B. CSR generated by the WLC itself”, then All-certs.pem is the file that you must download to the WLC. The next step is to download this file to the WLC.

Note: SHA2 is also supported. Cisco bug ID CSCuf20725 is a request for SHA512 support.

Step 3 CLI. Download the Third-Party Certificate to the WLC with the CLI

Complete these steps in order to download the chained certificate to the WLC with the CLI:

Move the final.pem file to the default directory on your TFTP server.

In the CLI, issue these commands in order to change the download settings:

Enter the password for the .pem file so that the operating system can decrypt the SSL key and certificate.

>transfer download certpassword password

Note: Be sure that the value for certpassword is the same as the -passout parameter password that was set in Step 4 (or 5) of the Generate a CSR section. In this example, the certpassword must be check123. If you had chosen option B (that is, use the WLC itself to generate the CSR) you can leave the certpassword field blank.

Issue the transfer download start command in order to view the updated settings. Then enter y at the prompt in order to confirm the current download settings and start the certificate and key download. Here is an example:

Step 3 GUI. Download the Third-Party Certificate to the WLC with the GUI

Complete these steps in order to download the chained certificate to the WLC with the GUI:

Copy the device certificate final.pem to the default directory on your TFTP server.

Choose Security > Web Auth > Cert in order to open the Web Authentication Certificate page.

Check the Download SSL Certificate check box in order to view the Download SSL Certificate From TFTP Server parameters.

In the IP Address field, enter the IP address of the TFTP server.

In the File Path field, enter the directory path of the certificate.

In the File Name field, enter the name of the certificate.

In the Certificate Password field, enter the password that was used to protect the certificate.

Click Apply.

After the download is complete, choose Commands > Reboot > Reboot.

If prompted to save your changes, click Save and Reboot.

Click OK in order to confirm your decision to reboot the controller.

Troubleshoot

What will most likely pose a problem is the installation of the certificate on the WLC. In order to troubleshoot, open a command line on the WLC and enter debug transfer all enable and debug pm pki enable then complete the download certificate procedure.

You need to verify the certificate format and chaining then. Remember that WLCs later than version 7.6 require the whole chain to be present, so you cannot only upload your WLC certificate alone. The chain up to the root CA must be present in the file.