ERROR:: INVALID_KEY, the private key does not match the certificate. Please
provide a valid certificate and Key pair.
The issue only occurs when all of the following conditions are met:
/tmp
or /var/tmp
is selected as a the target location when exporting the CSR and the Key. Engineering is aware of this issue and working to resolve it in a future release.
Please subscribe to this article to be made aware once a fix has been made available.
Do not use /tmp
and /var/tmp as a directory location to export the CSR and the key, but instead use a different folder (such as /storage/core) as the target location for both the certificate request and key.
You can use the following commands to run an MD5 check:
# openssl req -in <path to the CSR file> -noout -modulus | openssl sha256
# openssl rsa -in <path to the Private Key file> -noout -modulus | openssl sha256
# openssl x509 -in <path to the Certificate file> -noout -modulus | openssl sha256
Example:
[ ~ ]# openssl rsa -noout -modulus -in vmca_issued_key.key |openssl sha256
SHA2-256(stdin)= 1111xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1111
[ ~ ]# openssl req -noout -modulus -in vmca_issued_csr.csr |openssl sha256
SHA2-256(stdin)= 1111xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1111
Further references:
Creating and managing Broadcom support cases
vCenter Certificate replacement using Custom Certificate fails because of a mismatch in the Certificate and the Private Key.