Failed to import .pem file to VCD trusted certificates : pem file certificate cannot be verified
search cancel

Failed to import .pem file to VCD trusted certificates : pem file certificate cannot be verified

book

Article ID: 422324

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Tried to import a .pem file to VCD trusted certificates, it failed with error:

        ###.pem file certificate cannot be verified

Environment

VCD 10.6.x

Cause

The .pem file is invalid.  When we open it with notepad, it show:

 

------BEGIN CERTIFICATE------

LS0t#################################

####################################

#############################LS0tCg==

------END CERTIFICATE------

 

Usually, the real certificate should begin with MII, not LS0t.

 

Resolution

When it begins with LS0t , this is a decode certificate,  we can remove the ------BEGIN CERTIFICATE------ and  ------END CERTIFICATE------,  then simply decode it with command:  

     echo LS0t############LS0tCg==     |  base64 -di

The output should be something like:

 

------BEGIN CERTIFICATE------

MII#################################

####################################

#############################

------END CERTIFICATE------

 

This is the real certificate.