grpcurl icon indicating copy to clipboard operation
grpcurl copied to clipboard

Self Signed Certificate Issue using -cacert flag

Open sharooksubana opened this issue 3 years ago • 2 comments
trafficstars

I am passing the self signed certificate generated by my localhost(IIS Express) using the flag -cacert but its giving the error as says Failed to create TLS config: failed to append ca certs can anyone help me out what is the proper way of using the -cacert flag and which certificate need to be passed.

Thanks In advance

sharooksubana avatar Apr 12 '22 09:04 sharooksubana

anyone please could help?

cavator avatar Jan 11 '23 11:01 cavator

@sharooksubana, is the self-signed certificate being used by the server? Or were you using it as a client certificate? If you are using it as a client certificate, you need to use the -cert and -key(for the corresponding private key) flags. The-cacert` flag is for specifying a certificate authority that issued the server's cert, so the client will trust the server.

That particular error, "failed to append ca certs", indicates that no certificates were parsed from the given file. The certificates must be PEM-encoded. Perhaps IIS Express is generating certificates in a different format, which need to be converted to PEM. The openssl tool can often help converting certs and keys from one format to another.

jhump avatar Jan 11 '23 13:01 jhump