Question

I developed a function which listen to a given port for http packets.

When I get a http request, my function return a 401 packet and then I get a again a new pckaet with the digest authentication information.

I m wondering if it's possible to check the validity of the digest information with LibCurl

Because I m using libcurl in my program and I know that libcurl is able to create digest information and then send it.

Is it possible to call libcur api functions inorder to calculate digest information based on the username and the password I had and then compare it to the received digest information?

Was it helpful?

Solution

I'm not sure I understand the question.

If you tell libcurl to use digest (with CURLOPT_HTTPAUTH) and you give it your username and password, it will parse the 401 response and send the second request correctly and thus request the resource as RFC2617 dictates digest should be done!

It is however not possible to just somehow call libcurl's internal digest-functions to do the work "on your own" with the help of libcurl's digest logic.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top