Replacing the TLS certificate through the vCenter Web UI Fails with "TLS Certificate replacement failed : 0"
search cancel

Replacing the TLS certificate through the vCenter Web UI Fails with "TLS Certificate replacement failed : 0"

book

Article ID: 374469

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

When replacing the MACHINE_SSL certificate with an external certificate with embedded key through the vCenter web UI, an error is displayed:  "TLS Certificate replacement failed : 0"

Cause

The cause of this error is that the leaf certificate or root chain certificate contains Windows line endings (CRLF) instead of Unix line endings (LF).  

Resolution

To resolve, ensure that the string value of the certificate is copied into a text editor with Unix line endings enforced.  Then, copy the text from there or save the file as a .crt or .cer file.  Provide the new value or file to the UI when replacing the certificate.

 

You can identify the line endings by reviewing the bottom toolbar in either Notepad ++ or Windows Notepad: