cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTPS POST problem - is a bug in curl configure

From: Jens Fiedler <jens.fiedler_at_fokus.fraunhofer.de>
Date: Tue, 28 Sep 2004 18:04:07 +0200

I found it:
The configure script of curl checks for ssl usability.
1) If it does not find the ssl header files, it disables the ssl feature in
   the lib, but not in the curl-config.
2) It does not look for the openssl headers in /usr/local/ssl as stated.
   I've set a link in /usr/include to /usr/local/ssl/include/openssl.
   That did the trick.

-JF

On Tuesday 28 September 2004 17:21, Jens Fiedler wrote:
> I switched from the multi interface to the easy interface and there i get
> the error: Failed to curl_easy_perform(): unsupported protocol
>
> Here is the code snipplet that produces the error, url is a https:// url:
> <code>
> c = curl_easy_setopt ( eh, CURLOPT_URL, url );
> if (c) { printf ("Could not set URL.\n"); return; }
>
> c=curl_easy_setopt( eh, CURLOPT_POSTFIELDS, body );
> if (c!=0) { printf ("Failed to CURLOP_POSTFIELDS\n"); }
>
> /* set the size of the postfields data */
> c=curl_easy_setopt( eh, CURLOPT_POSTFIELDSIZE, strlen(body) );
> if (c!=0) { printf ("Failed to CURLOP_POSTFIELDSIZE\n"); }
>
> /* pass our list of custom made headers */
> c=curl_easy_setopt( eh, CURLOPT_HTTPHEADER, headers );
> if (c!=0) { printf ("Failed to CURLOP_HTTPHEADER\n"); }
>
> /* set the call back function for reply data/headers */
> c=curl_easy_setopt( eh, CURLOPT_WRITEFUNCTION, cb_incoming_data );
> if (c!=0) { printf ("Failed to CURLOP_WRITEFUNCTION\n"); }
> c=curl_easy_setopt( eh, CURLOPT_WRITEDATA, (void *)4 );
> if (c!=0) { printf ("Failed to CURLOP_WRITEDATA\n"); }
> c=curl_easy_setopt( eh, CURLOPT_HEADERFUNCTION, cb_incoming_data );
> if (c!=0) { printf ("Failed to CURLOP_HEADERFUNCTION\n"); }
> c=curl_easy_setopt( eh, CURLOPT_WRITEHEADER, (void *)8 );
> if (c!=0) { printf ("Failed to CURLOP_WRITEHEADER\n"); }
>
> c=curl_easy_setopt( eh, CURLOPT_VERBOSE, (long) 1 );
> if (c!=0) { printf ("Failed to CURLOP_VERBOSE\n"); }
>
> c=curl_easy_setopt( eh, CURLOPT_SSL_VERIFYPEER, false);
> if (c!=0) { printf ("Failed to CURLOP_VERIFYPEER\n"); }
>
> c=curl_easy_setopt( eh, CURLOPT_SSL_VERIFYHOST, false);
> if (c!=0) { printf ("Failed to CURLOP_VERIFYHOST\n"); }
>
> c=curl_easy_perform( eh );
> if (c!=0) { printf ("Failed to curl_easy_perform(): %s\n",
> curl_easy_strerror(c) ); } </code>
>
> curl-config --feature says:
> SSL
> IPv6
> libz
>
> Did I do anything wrong when compiling curl ? Why could HTTPS be
> unsupported else ?
>
>
> Cheers, -JF
>
> > Hi,
> >
> > I try to send a file over https to a server.
> > Using a http:// url works fine. I can see the request going out.
> > and the lib says "connecting ... etc."
> > But when I replace it with an https:// url nothing goes,
> > even with CURLOPT_VERBOSE there is no output at all.
> > I'm a noob for ssl anf https, so probably I forgot something.
> >
> > There are also no error conditions in any curl functions.
> > I do not know how what to try next.
> >
> > Any help welcome.
> >
> > -JF
Received on 2004-09-28