We have a wild card certificate issued by digicert.
It was a pfx file.
openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]
I extracted the crt file
openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [vault.crt]
I extracted unencrypted key file
openssl rsa -in [keyfile-encrypted.key] -out [vault.key]
vault.crt and vault.key were copied to c:\opt\vault\data directory
vault.crt looks like this:
-----BEGIN CERTIFICATE-----
xxx
-----END CERTIFICATE-----
vault.key looks like this:
-----BEGIN RSA PRIVATE KEY-----
xxx
-----END RSA PRIVATE KEY-----
Here is how the vault.hcl looks like:
backend "consul" {
path = "vault"
}
cluster_name = "myclustername"
disable_mlock = true
listener "tcp" {
tls_cert_file = "C:\\opt\\vault\\data\\vault.crt"
tls_key_file = "C:\\opt\\vault\\data\\vault.key"
}
Here is the error I am seeing repeatedly.
Error initializing listener of type tcp: error loading TLS cert: tls: failed to find any PEM data in certificate input