Error initializing listener of type tcp: error loading TLS cert: tls: private key does not match public key

  1. The below config is giving the error,
  2. usatl03-haco01.uss.net-chain.pem is the Intermediate_CA and Root_CA concatenated in the same order.

listener “tcp” {
address = “0.0.0.0:8200”
cluster_address = “0.0.0.0:8201”
tls_disable = “false”
tls_cert_file = “/etc/temp/usatl03-haco01.uss.net-chain.pem”
tls_key_file = “/etc/temp/usatl03-haco01.uss.net.key.pem”
tls_disable_client_certs = “true”
}

usatl03-haco01.uss.net.key.pem is the private key

That’s the problem. Where is the actual server certificate for usatl03-haco01.uss.net ?

Do we have to specify the server certificate in tls_cert_file?
I tried it and the vault starts successfully.
Though “curl https://ip_addr:8200” is giving:

curl: (60) Peer’s Certificate issuer is not recognized.
More details here: curl - SSL CA Certificates

curl performs SSL certificate verification by default, using a “bundle”
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn’t adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you’d like to turn off curl’s verification of the certificate, use
the -k (or --insecure) option.

Yes.

Which CA is issuing your certificate?

We are using Internal “InComm CA”…
Do we have to use Entrust only for it to work? Thank you

If you use an internal CA, it is up to you or your sysadmins to configure it to be trusted where needed. It seems that has not happened for your installation of curl.

1 Like

Any quick fixes or suggestions to make the web browsers trust the certificate… Web browsers show “Certificate is not valid”.
If it is out of scope of the original issue reported, no worries. Thank you…

You would need to import the internal CA certificate into your browser (so all certs signed with it would be trusted)

1 Like