On Tue, 11 Mar 2025, Владислав Коробов via curl-library wrote:

curl -k -X GET -H 'Authorization: Bearer nokey'   https://<IP-address>:<port>/api/ccu/online

Drop "-X GET" there and you get a better command line:

See https://daniel.haxx.se/blog/2015/09/11/unnecessary-use-of-curl-x/

Then, an easy way to convert that into a first libcurl program, add --libcurl code.c to the command line and you have an embryo to start with.

Note that you also have -k in that command line, which of course is not recommended.

CURLE_PEER_FAILED_VERIFICATION, /* 60 - peer's certificate or fingerprint  wasn't verified fine */

Because your libcurl program does not have the equivalent of -k so it tries to verify the server certificate but fails.

If it can't verify the certificate, it can't know if the server actually is who it claims to be and might instead be an imposter.

--

 / daniel.haxx.se || https://rock-solid.curl.dev
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
  • How should I edit my pr... Владислав Коробов via curl-library
    • Re: How should I e... Daniel Stenberg via curl-library

Reply via email to