cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: problems with the ssl-example on mac os x 10.3.7

From: krystian <krystian_at_m2fh.net>
Date: Tue, 18 Jan 2005 20:38:45 +0100

Daniel Stenberg wrote:

> On Tue, 18 Jan 2005, krystian wrote:
>
> What ssl-example?

this one:

  #include <stdio.h>
  #include <curl/curl.h>
 
  int main(void)
  {
    CURL *curl;
    CURLcode res;
 
    curl = curl_easy_init();
    if(curl) {
      curl_easy_setopt(curl, CURLOPT_URL, "https://www.sourceforge.net/");
  #ifdef SKIP_PEER_VERIFICATION
      /*
       * If you want to connect to a site who isn't using a certificate
that is
       * signed by one of the certs in the CA bundle you have, you can
skip the
       * verification of the server's certificate. This makes the connection
       * A LOT LESS SECURE.
       *
       * If you have a CA cert for the server stored someplace else than
in the
       * default bundle, then the CURLOPT_CAPATH option might come handy for
       * you.
       */
      curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
  #endif
 
  #ifdef SKIP_HOSTNAME_VERFICATION
      /*
       * If the site you're connecting to uses a different host name
that what
       * they have mentioned in their server certificate's commonName (or
       * subjectAltName) fields, libcurl will refuse to connect. You can
skip
       * this check, but this will make the connection less secure.
      */
      curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
  #endif
 
      res = curl_easy_perform(curl);
      /* always cleanup */
      curl_easy_cleanup(curl);
    }
    return 0;
 }

> What "bus error" message? Can you show us details please?

when i compile and execute the sample, "bus error" is the only output!

> we always want the libcurl and OpenSSL versions you're using.

libcurl 7.11.1

i installed and built the following packages via fink:

flagged status name installed version binary
category summary
NO archiviert openssl097 0.9.7d-1 0.9.7d-1 crypto
Secure Sockets Layer and general crypto library
NO aktuell openssl097-dev 0.9.7d-1 0.9.7d-1 0.9.7d-1
crypto Secure Sockets Layer and general crypto library
NO aktuell openssl097-shlibs 0.9.7d-1 0.9.7d-1
0.9.7d-1 crypto Secure Sockets Layer and general crypto library

flagged status name installed version binary
category summary
NO archiviert curl 7.11.1-11 7.11.1-11 net Tool
for transferring files with URL syntax
NO archiviert curl-dev 7.11.1-11 7.11.1-11 net
Tool for transferring files with URL syntax
NO aktuell curl-shlibs 7.11.1-11 7.11.1-11 7.11.1-11
net Tool for transferring files with URL syntax
NO archiviert curl-ssl 7.11.1-11 7.11.1-11 crypto
Tool for transferring files with URL syntax
NO archiviert curl-ssl-dev 7.11.1-11 7.11.1-11
crypto Tool for transferring files with URL syntax
NO archiviert curl-ssl-shlibs 7.11.1-11 7.11.1-11
crypto Tool for transferring files with URL syntax

> curl should build out-of-the-box on Mac OS X, I can't see why you'd
> get any errors. But I have no idea how fink works or anything.

so would you suggest to try it manually, means without fink at all?

thank you!

kindly,
krystian
Received on 2005-01-18