Skip to content
Loc Nguyen | Network & Security
Go back

Let's Encrypt certificates on Cisco ASA, with or without ACME

Public TLS certificate lifetimes are shrinking fast. Since March 15, 2026 the maximum is 200 days, it drops to about 100 days in March 2027, and to 47 days by 2029. Renewing a firewall certificate by hand twice a year is annoying; doing it every month is not realistic. This is how I moved an ASA’s AnyConnect/ASDM certificate to Let’s Encrypt.

Table of contents

Option 1: ASA 9.23 and later, native ACME

Starting with ASA 9.23.1 (ASDM 7.23.1) the ASA can enroll with an ACME CA such as Let’s Encrypt by itself and renew automatically. A few limits:

  • Single context only, not multiple-context mode.
  • HTTP-01 validation only, so the ASA must be reachable from the internet on TCP/80 at the name in the certificate.
  • No wildcard certificates. Every request needs an exact name.
crypto ca trustpoint LE_VPN
 enrollment protocol acme url LetsEncrypt
 acme authentication http interface outside
 subject-name CN=vpn.example.com
 keypair LE_VPN_KEY
 auto-enroll
crypto ca enroll LE_VPN
ssl trust-point LE_VPN outside

The LetsEncrypt keyword fills in the Let’s Encrypt server URL, and the Let’s Encrypt root is already in the ASA trustpool, so there’s no crypto ca authenticate step.

Downgrade warning: if you go back to 9.22 or older, the ACME trustpoint configuration is lost.

Option 2: Older ASAs, Certbot + PKCS12 import

Many ASAs in the field (5506, 5508, 5516, 5525…) can never run 9.23. For those I get the certificate with Certbot on a Linux box and import it.

1. Request the certificate

DNS-01 validation means you don’t have to open port 80 on the firewall:

sudo certbot certonly --manual --preferred-challenges dns \
  --key-type rsa --rsa-key-size 2048 \
  -d vpn.example.com

Use --key-type rsa. Recent Certbot versions default to ECDSA keys, and RSA is the safe choice for older ASA code and AnyConnect clients.

2. Package it as PKCS12

cd /etc/letsencrypt/live/vpn.example.com
sudo openssl pkcs12 -export -legacy -inkey privkey.pem -in cert.pem \
  -certfile chain.pem -name LE_VPN -out ~/le_vpn.pfx
openssl base64 -in ~/le_vpn.pfx

-legacy (OpenSSL 3.x) uses the older 3DES/SHA1 encryption that ASA and FTD accept. Include chain.pem so the intermediate goes along with the certificate.

3. Import into a new trustpoint

Use a new, date-stamped trustpoint so the old certificate stays as an instant rollback:

conf t
crypto ca import LE_VPN_20261120 pkcs12 <pfx-password>
<paste base64>
quit

Look for Import PKCS12 operation completed successfully, then check it:

show crypto ca certificates LE_VPN_20261120

4. Switch the interface

ssl trust-point LE_VPN_20261120 outside
write memory

Existing AnyConnect sessions stay up; new connections get the new certificate. To roll back, point ssl trust-point at the old trustpoint again.

5. Test

openssl s_client -connect vpn.example.com:443 -servername vpn.example.com -showcerts

You should see your leaf certificate followed by the Let’s Encrypt intermediate.

Automating renewals

With the manual DNS method you repeat steps 1 to 4 every renewal. To automate it:

  1. Use a Certbot DNS plugin for your DNS provider so validation needs no manual TXT record.
  2. Add a --deploy-hook script that builds the PKCS12 and pushes it to each ASA over SSH (I use Python and Netmiko), imports it into a new trustpoint, moves ssl trust-point, verifies, removes the previous one and saves.

I’ll cover that script in a separate post.

Things to watch

  • Site-to-site tunnels using pre-shared keys aren’t affected. The certificate only matters for AnyConnect, the ASDM/web portal, and any tunnels that use certificate authentication.
  • Failover pairs: import on the active unit; the trustpoint and certificate replicate to the standby.
  • Change control: if you use HTTP-01, opening TCP/80 on a perimeter firewall usually needs a security review first.


Previous Post
"Not secure" with a valid GoDaddy certificate: the R1 cross-sign