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).
Before you attempt this configuration, you should have knowledge of these topics:
The information in this document is based on these software and hardware versions:
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.
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.
The controller allows for the device certificate to be downloaded as a chained certificate for web authentication.
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 and actually required for web authentication and web admin
Note: Wildcard certificates are fully supported for local EAP, management or webauthentication
Web authentication certificates can be any of these:
Note: In WLC Version 7.6 and later, only chained certificates are supported (and therefore required)
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.
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).
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.
Complete these steps in order to generate a CSR with OpenSSL:
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.
[req] req_extensions = v3_req [ v3_req ] # Extensions to add to a certificate request basicConstraints = CA:FALSE keyUsage = nonRepudiation, digitalSignature, keyEncipherment subjectAltName = @alt_names [alt_names] DNS.1 = server1.example.com DNS.2 = mail.example.com DNS.3 = www.example.com DNS.4 = www.sub.example.com DNS.5 = mx.example.com DNS.6 = support.example.comThe 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.
OpenSSL>req -new -newkey rsa:3072 -nodes -keyout mykey.pem -out myreq.pem -config openssl-san.cnf
Note: WLCs support a maximum key size of 4096 bits as of 8.5 software version
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.
OpenSSL>req -new -newkey rsa:3072 -nodes -keyout mykey.pem -out myreq.pem -config openssl-san.cnf
Loading 'screen' into random state - done
Generating 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 incorporated
into 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 blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:CA
Locality Name (eg, city) []:San Jose
Organization Name (eg, company) [Internet Widgits Pty Ltd]:ABC
Organizational Unit Name (eg, section) []:CDE
Common Name (eg, YOUR name) []:XYZ.ABC
Email Address []:Test@abc.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:Test123
An optional company name []:OpenSSL>
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:
(WLC) >config certificate generate csr-webauth BE BR Brussels Cisco TAC mywebauthportal.wireless.com tac@cisco.com
-----BEGIN CERTIFICATE REQUEST-----
MIICqjCCAZICAQAwZTELMAkGA1UECAwCQlIxETAPBgNVBAcMCEJydXNzZWxzMQ4w
DAYDVQQKDAVDaXNjbzEMMAoGA1UECwwDVEFDMSUwIwYDVQQDDBxteXdlYmF1dGhw
b3J0YWwud2lyZWxlc3MuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
AQEAnssc0BxlJ2ULa3xgJH5lAUtbd9CuQVqqf2nflh+V1tu82rzTvz38bjF3g+MX
JiaBbKMA27VJH1J2K2ycDMlhjyYpH9N59T4fXvZr3JNGVfmHIRuYDnCSdil0ookK
FU4sDwXyOxR6gfB6m+Uv5SCOuzfBsTz5bfQ1NlZqg1hNemnhqVgbXEd90sgJmaF2
0tsL0jUhbLosdwMLUbZ5LUa34mvufoI3VAKA0cmWZh2WzMJiaI2JpbO0afRO3kSg
x3XDkZiR7Z9a8rK6Xd8rwDlx0TcMFWdWVcKMDgh7Tw+Ba1cUjjIMzKT6OOjFGOGu
yNkgYefrrBN+WkDdc6c55bxErwIDAQABoAAwDQYJKoZIhvcNAQELBQADggEBAB0K
ZvEpAafoovphlcXIElL2DSwVzjlbd9u7T5JRGgqri1l9/0wzxFjTymQofga427mj
5dNqlCWxRFmKhAmO0fGQkUoP1YhJRxidu+0T8O46s/stbhj9nuInmoTgPaA0s3YH
tDdWgjmV2ASnroUV9oBNu3wR6RQtKDX/CnTSRG5YufTWOVf9IRnL9LkU6pzA69Xd
YHPLnD2ygR1Q+3Is4+5Jw6ZQAaqlPWyVQccvGyFacscA7L+nZK3SSITzGt9B2HAa
PQ8DQOaCwnqt2efYmaezGiHOR8XHOaWcNoJQCFOnb4KK6/1aF/7eOS4LMA+jSzt4
Wkc/wH4DyYdH7x5jzHc=
-----END CERTIFICATE REQUEST-----
In order to generate a CSR for the webadmin, the command barely changes:
(WLC) >config certificate generate csr-webadmin BE BR Brussels Cisco TAC mywebauthportal.wireless.com tac@cisco.com
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).
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.
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:
openssl>pkcs12 -export -in All-certs.pem -inkey mykey.pem
-out All-certs.p12 -clcerts -passin pass:check123
-passout pass:check123
openssl>pkcs12 -in All-certs.p12 -out final.pem
-passin pass:check123 -passout pass:check123
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.
Note: Make sure that the certificate is Apache-compatible with Secure Hash Algorithm 1 (SHA1) encryption.
------BEGIN CERTIFICATE------
*Device cert*
------END CERTIFICATE------
------BEGIN CERTIFICATE------
*Intermediate CA cert *
------END CERTIFICATE--------
------BEGIN CERTIFICATE------
*Root CA cert *
------END CERTIFICATE------
openssl>pkcs12 -export -in All-certs.pem -inkey mykey.pem
-out All-certs.p12 -clcerts -passin pass:check123
-passout pass:check123
openssl>pkcs12 -in All-certs.p12 -out final.pem
-passin pass:check123 -passout pass:check123
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.
Complete these steps in order to download the chained certificate to the WLC with the CLI:
>transfer download mode tftp
>transfer download datatype webauthcert
>transfer download serverip <TFTP server IP address>
>transfer download path <absolute TFTP server path to the update file>
>transfer download filename final.pem
>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.
(Cisco Controller) >transfer download start
Mode............................................. TFTP
Data Type........................................ Site Cert
TFTP Server IP................................... 10.77.244.196
TFTP Packet Timeout.............................. 6
TFTP Max Retries................................. 10
TFTP Path........................................./
TFTP Filename.................................... final.pem
This might take some time.
Are you sure you want to start? (y/N) y
TFTP EAP Dev cert transfer starting.
Certificate installed.
Reboot the switch to use new certificate.
Complete these steps in order to download the chained certificate to the WLC with the GUI:
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.
In some cases, the logs will only say that the certificate installation failed:
*TransferTask: Sep 09 08:37:17.415: RESULT_STRING: TFTP receive complete... Installing
Certificate.
*TransferTask: Sep 09 08:37:17.415: RESULT_CODE:13
TFTP receive complete... Installing Certificate.
*TransferTask: Sep 09 08:37:21.418: Adding cert (1935 bytes) with certificate key password.
*TransferTask: Sep 09 08:37:21.421: RESULT_STRING: Error installing certificate.
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.
Here is an example of debugs when the intermediate CA is incorrect :
*TransferTask: Jan 04 19:08:13.338: Add WebAuth Cert: Adding certificate & private key using password check123 *TransferTask: Jan 04 19:08:13.338: Add ID Cert: Adding certificate & private key using password check123 *TransferTask: Jan 04 19:08:13.338: Add Cert to ID Table: Adding certificate (name: bsnSslWebauthCert) to ID table using password check123 *TransferTask: Jan 04 19:08:13.338: Add Cert to ID Table: Decoding PEM-encoded Certificate (verify: YES) *TransferTask: Jan 04 19:08:13.338: Decode & Verify PEM Cert: Cert/Key Length was 0, so taking string length instead *TransferTask: Jan 04 19:08:13.338: Decode & Verify PEM Cert: Cert/Key Length 7148 & VERIFY *TransferTask: Jan 04 19:08:13.342: Decode & Verify PEM Cert: X509 Cert Verification return code: 0 *TransferTask: Jan 04 19:08:13.342: Decode & Verify PEM Cert: X509 Cert Verification result text: unable to get local issuer certificate *TransferTask: Jan 04 19:08:13.342: Decode & Verify PEM Cert: Error in X509 Cert Verification at 0 depth: unable to get local issuer certificate *TransferTask: Jan 04 19:08:13.343: Add Cert to ID Table: Error decoding (verify: YES) PEM certificate *TransferTask: Jan 04 19:08:13.343: Add ID Cert: Error decoding / adding cert to ID cert table (verifyChain: TRUE) *TransferTask: Jan 04 19:08:13.343: Add WebAuth Cert: Error adding ID cert
As explained in the WLC HA SSO deployment guide, certificates are not replicated from primary to secondary controller in a HA SSO scenario. This means that you have to import all the certificates to the secondary before forming the HA pair. Another caveat is that this won't work if you generated the CSR (and therefore created the key locally) on the primary WLC as that key cannot be exported. The only way is to generate the CSR for the primary WLC with OpenSSL (and therefore have the key attached to the certificate) and import that certificate/key combination on both WLCs.