Re: How should I edit my programm to provide successfull execution of my request to the private server

Daniel Stenberg via curl-library <[email protected]>
Newsgroups gmane.comp.web.curl.library
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.