Hi @all,
for talking with an Web API I am trying to use TLS properly with cert validation checks. During testing I have ignored it before.
So I've enabled curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1) and added an .pem in curl_easy_setopt(curl, CURLOPT_SSLCERT, Cptr(zstring Ptr, StrPtr(CertPath))) and thought it should work, but I am getting errors: "Problem with the local SSL certificate". But the .pem is okay.
This is only in Windows, not in Linux. So my first rough guess was something with paths and tried all combinations od /// \\ and even with the .pem next to the .exe in same folder without luck. What I am missing?
The source is on Codeberg: https://codeberg.org/tomas-jakobs/get-d ... ms-doc.bas
Thank you
libcurl and TLS on Windows question
-
- Posts: 36
- Joined: Aug 11, 2024 8:06
libcurl and TLS on Windows question
Last edited by jakobssystems on Nov 02, 2024 15:12, edited 1 time in total.
-
- Posts: 36
- Joined: Aug 11, 2024 8:06
Re: libcurl and TLS on Windows question
Right now I've tried both:
1) Read the .pem and pass the cert as string to libcurl
2) just pass the location of the .pem
without success
with curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0) of course everything works..
1) Read the .pem and pass the cert as string to libcurl
2) just pass the location of the .pem
without success
with curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0) of course everything works..
-
- Posts: 36
- Joined: Aug 11, 2024 8:06
Re: libcurl and TLS on Windows question
Ahhh... sigh... these are the questions I am ashamed of...
I have used the wrong .pem
So problem solved...
I have used the wrong .pem
So problem solved...