ERROR:: INVALID_KEY, the private key does not match the certificate. Please provide a valid certificate and Key pair.
/tmp.Despite being the super user, the root user is unable to access the files in /tmp which are owned by "vmcad-user" and "lwis" group due to security restrictions, this results in a mismatch in the private and csr pair.
This is a known issue affecting vCenter Server version from 8.0 Update 2 until including 8.0 Update 3j.
A fix has been released with vCenter Server 8.0 Update 3i (build 25205845), available via the Broadcom download portal.
If you currently unable to update to this or a later version, work around this by using different export location than /tmp for the CSR and the key. For example you can use /storage/core as the target location for both the certificate request and key.
# 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 sha256Example:
openssl rsa -noout -modulus -in vmca_issued_key.key |openssl sha256
SHA2-256(stdin)= 1111#######################################################1111
openssl req -noout -modulus -in vmca_issued_csr.csr |openssl sha256
SHA2-256(stdin)= 1111#######################################################1111
Further references: