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 with vCenter Server 8.0 U2 and above versions. Broadcom Engineering is actively working towards fixing this issue in a future patch release.
/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.# 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)= 1111#######################################################1111
openssl req -noout -modulus -in vmca_issued_csr.csr |openssl sha256
SHA2-256(stdin)= 1111#######################################################1111
Further references: