Replacing Certificates From Secure Voice Gateways on CUCM

Paul Smith
Senior Engineer I

One of the complications of gateway certificates is replacing old certificates on CUCM, after a secure gateway dies.

Take it from someone who has been there, the easiest way to get the new certificates from a secure gateway onto CUCM is to change the name of the gateway. Remember that certificates are tied to the name of the device. If the device has a new name, the new certificate won’t conflict with what’s already in CUCM’s certificate store. It’s this conflict that can cause all of the headaches.

I realize there may be OCD engineers (like myself) who want to keep their certificate stores neat and tidy, but when the phones have gone out of service, the bottom has fallen out the company’s stocks, the CTO has been downing nitro pills like Tic-Tacs, and you’re under the gun to get the gateway installed as quickly as possible, you may want to take my advice. Using a new name will allow you to get your secure gateway connection running right away. Then, if you wish, you can go back and delete the old certificates at your leisure.

However, if you’re in some sort of organization that has a strict naming convention you may have no choice but to give the new gateway the same name as the old one, in which case you’ll discover the following:

  • You can’t have two of the same type of certificate on CUCM with the same name.
  • CUCM won’t overwrite an old certificate with a new one if it carries the same name as the existing certificate.
  • If you delete the old certificate the cluster will notice. The cluster will also notice that other servers have the certificate, and replication will cause the certificate to be replaced within about 10 seconds.

You can foil this replication issue by drafting 10 of your friends, getting them onto a conference call, assigning them a server, and instructing them to delete the certificate from their server when you say, “Now.” I did this the first time I confronted this problem, but I owed 10 people six-packs for doing it which was rather costly. A better way to handle the situation is to use a trick that I learned from Cisco.

  1. Follow the usual method for generating the new certificate on the gateway, which I detailed in this post, and copying it as a .pem file on your computer.
  2. Go to the servers and stop the Certificate Change Notification service on each one of them. This includes any servers that aren’t running the Call Manager service. This step will turn off the replication function.
  3. Go into the OS Administration page on each of the servers, navigate to Security > Certificate Management. Then find the certificate for the gateway and delete it. Again, this has to be done on every server containing the certificate (if you have a particularly large cluster this step can take quite a while).
  4. Make sure that at least 10 minutes have elapsed since you turned off the Certificate Change Notification service (I don’t know why; it’s one of those Cisco mysteries), and turn the service back on everywhere.
  5. Upload the new certificate to the Publisher. Replication will push the certificate to all of the Subscribers, but it’s still not a bad idea to make sure you didn’t mess up. Check all of the Subscribers to ensure the certificate is there and check the serial number of each certificate to make sure it’s really the new one.
  6. Restart the Call Manager service on all of the servers that are supposed to run it.

Remember the last step could affect service, so tread lightly and – if you have the luxury – schedule the CM service restart during a maintenance window.

Leave a Reply


Nick Kelly

Cybersecurity Engineer, Cisco

Nick has over 20 years of experience in Security Operations and Security Sales. He is an avid student of cybersecurity and regularly engages with the Infosec community at events like BSides, RVASec, Derbycon and more. The son of an FBI forensics director, Nick holds a B.S. in Criminal Justice and is one of Cisco’s Fire Jumper Elite members. When he’s not working, he writes cyberpunk and punches aliens on his Playstation.


Virgilio “BONG” dela Cruz Jr.

CCDP, CCNA V, CCNP, Cisco IPS Express Security for AM/EE
Field Solutions Architect, Tech Data

Virgilio “Bong” has sixteen years of professional experience in IT industry from academe, technical and customer support, pre-sales, post sales, project management, training and enablement. He has worked in Cisco Technical Assistance Center (TAC) as a member of the WAN and LAN Switching team. Bong now works for Tech Data as the Field Solutions Architect with a focus on Cisco Security and holds a few Cisco certifications including Fire Jumper Elite.


John Cavanaugh

CCIE #1066, CCDE #20070002, CCAr
Chief Technology Officer, Practice Lead Security Services, NetCraftsmen

John is our CTO and the practice lead for a talented team of consultants focused on designing and delivering scalable and secure infrastructure solutions to customers across multiple industry verticals and technologies. Previously he has held several positions including Executive Director/Chief Architect for Global Network Services at JPMorgan Chase. In that capacity, he led a team managing network architecture and services.  Prior to his role at JPMorgan Chase, John was a Distinguished Engineer at Cisco working across a number of verticals including Higher Education, Finance, Retail, Government, and Health Care.

He is an expert in working with groups to identify business needs, and align technology strategies to enable business strategies, building in agility and scalability to allow for future changes. John is experienced in the architecture and design of highly available, secure, network infrastructure and data centers, and has worked on projects worldwide. He has worked in both the business and regulatory environments for the design and deployment of complex IT infrastructures.