cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: No return for SSL enabled libcurl C program

From: <charlie_at_kotan.com>
Date: Fri, 15 Apr 2005 10:19:13 -0500 (CDT)

Yes, curl command works fine on this machine.
1) I tried to build a libcurl with most recent code, but couldn't get SSL
"turned on". It always returned:
  checking for CRYPTO_lock in -lcrypto... no
  checking for CRYPTO_add_lock in -lcrypto... no
  configure: WARNING: crypto lib was not found; SSL will be disabled
and I couldn't decide what needed to be done. I used CYGWIN and:
  ./configure --with-ssl=/usr/src/openssl-0.9.7g-1
(I'm new at this part - perhaps missing something)

2) Code that doesn't work is https.c sample modified as I mentioned:

/*****************************************************************************
  * _ _ ____ _
  * Project ___| | | | _ \| |
  * / __| | | | |_) | |
  * | (__| |_| | _ <| |___
  * \___|\___/|_| \_\_____|
  *
  * $Id: https.c,v 1.2 2004/11/24 16:11:35 bagder Exp $
  */
#define SKIP_PEER_VERIFICATION
#define FALSE 0

 #include <stdio.h>
 #include "curl.h"

 int main(void)
 {
   CURL *curl;
   CURLcode res;

   curl = curl_easy_init();
   if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, "https://sourceforge.net/");
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
     printf("cURL version %s\n", curl_version());
     curl_easy_setopt(curl, CURLOPT_CAINFO,
"c:\\curl\\curltest\\curl-ca-bundle.crt");

 #ifdef SKIP_PEER_VERIFICATION
     curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
 #endif

 #ifdef SKIP_HOSTNAME_VERFICATION
     curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
 #endif

     res = curl_easy_perform(curl);
     printf("perform: %d\n", res);

     /* always cleanup */
     curl_easy_cleanup(curl);
   }
   return 0;
 }

> On Fri, 15 Apr 2005 charlie_at_kotan.com wrote:
>
>> curl_easy_perform returned 35. OS is WindowsXP Professional, built with
>> gcc.
>
> But the curl command line tool works fine, right?
>
> Can you then please
>
> 1) try the most recent libcurl release
>
> 2) show us a full source code example that has this problem
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>
Received on 2005-04-15