cpp-httplib: Error::SSLServerVerification Linux only

i have seen: https://github.com/yhirose/cpp-httplib/issues/673

I don’t want to use cli.enable_server_certificate_verification(false); this will bring new errors

status 422
reason "Unprocessable Entity"

This error also occurs for requests that were originally successful on windows. In linux I have done the following steps

apt install ca-certificates -y

But nothing works, any suggestions? Thanks

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 29 (13 by maintainers)

Most upvoted comments

All the credit goes to @jimmy-park and @JoSoReal. 😃

@yhirose @jimmy-park Thank you very much for all the support!

Hi I got the same issue on Debian and solved it by manually passing the certificate directory to the client like:

cli.set_ca_cert_path("", "/etc/ssl/certs");

After that the certificate verification is working.

For my distribution the path was /etc/ssl/certs. The path might differ depending on the Linux distribution you are using, but Google gives very good answers to where the default cert path is located.

Hope this solves your issue as well.