Updating certificates in vRNI Failed to find key file
search cancel

Updating certificates in vRNI Failed to find key file

book

Article ID: 383749

calendar_today

Updated On:

Products

VMware vRealize Network Insight 6.x

Issue/Introduction

Updating certificates in vRNI using custom-cert apply returns the error message: "Error: Failed to find key file."

Environment

6.10.x

Cause

There seems to be a bug in certain versions of OpenSSL where the file type of an RSA Private key shows to be "ASCII text” VRNI 6.10.0.1680883302. It still has this bug, and the headers must be fixed for the key to be valid.

Resolution

There is two potential solutions step to fix the headers in the key file by running the following commands:


1. The error occurred because vRNI cannot recognize normal key file and it has to convert the normal key file to RSA pem format using Openssl


openssl rsa -in file.key -out newfile.key

2. 

sed -i 's/-----BEGIN PRIVATE KEY-----/-----BEGIN RSA PRIVATE KEY-----/g' vrni_key.key

sed -i 's/-----END PRIVATE KEY-----/-----END RSA PRIVATE KEY-----/g' vrni_key.key

Before that fix, the key file with "file vrni_key.key" showed "ASCII text"; only after fixing the headers did it show "PEM RSA private key."