curl-library
Re: Re: Debugging problem
Date: Thu, 6 Dec 2007 16:15:18 -0800
if you didn't get what i was talking about,
> I found several examples for CURLOPT_DEBUGFUNCTION but all wrote the
> data directly on the screen via fprintf.
replace fprintf in one of those examples with sprintf to print to a
string instead of a file and then you can process the debug output
however you want to.
On 12/6/07, Michael Hecker <Hecker.Michael_at_gmx.de> wrote:
> Hello,
> since I'm not getting any closer to the solution, I'm trying to get the
> data I wanted to parse directly from curl.
>
> * SSL connection using DHE-RSA-AES256-SHA
> * Server certificate:
> * subject: /C=DE/ST=Berlin/L=Berlin/O=DB Systems GmbH/OU=DB
> AG/OU=Terms o
> f use at www.verisign.com/rpa (c)00/CN=www.bahn.de
> * start date: 2006-12-20 00:00:00 GMT
> * expire date: 2008-01-12 23:59:59 GMT
> * common name: www.bahn.de (matched)
> * issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign
> Interna
> tional Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref.
> LIABILITY LTD.
> (c)97 VeriSign
> * SSL certificate verify ok.
> > GET / HTTP/1.1
>
> Is it possible to get the title (subject) of the certificate? I'm using
> a cert-bundle so I would like to know which certificate fit.
>
> 2nd I tried the following:
> long temp = -1;
> curl_easy_getinfo(curl_handle, CURLINFO_SSL_VERIFYRESULT, &temp);
> printf("\nCURLINFO_SSL_VERIFYRESULT: %d\n",temp);
>
> But the result is always 0. What are the possible values and what's my
> mistake?
>
> Thank you.
> Michael
>
>
>
>
>
> Michael Hecker schrieb:
> > Hey,
> > sorry! I forgot to change the topic.
> >
> > To the problem:
> > I found several examples for CURLOPT_DEBUGFUNCTION but all wrote the
> > data directly on the screen via fprintf.
> > I want to write the data to a string or CString to parse the data. How
> > can I do that?
> >
> > Thanks,
> > Michael
> >
> >
> >
> > Daniel Stenberg schrieb:
> >> On Wed, 5 Dec 2007, Michael Hecker wrote:
> >>
> >> (Please don't hijack threads by replying to something else and change
> >> subject, start a new thread with a new mail.)
> >>
> >>> I want to write all the data curl normally prints into the console
> >>> in a variable to parse it later on.
> >>> I need all the data like (Connecting ... leaving Connection intact.
> >>> Reusing Connection and so on)
> >>>
> >>> How can I do that?
> >>
> >> CURLOPT_DEBUGFUNCTION is your friend.
> >>
> >
>
>
Received on 2007-12-07