cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Problem with curl_global_init(CURL_GLOBAL_SSL)

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 21 May 2004 22:11:13 +0200 (CEST)

On Fri, 21 May 2004, Johan Antonsson wrote:

(I generally recommend using the curl-library list for libcurl talk)

> I'm using Curl 7.11.1 (libcurl) and OpenSSL 0.9.6l under Win32 together with
> Matlab. Using libcurl from a C-program (dll) that is loaded by Matlab. When
> initializing Curl with curl_global_init(CURL_GLOBAL_DEFAULT) (i.e
> CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32), Matlab:s memory becomes corrupted.
> After lots of debugging I finally discover that when using
> curl_global_init(CURL_GLOBAL_WIN32) the problem disappear and SSL is still
> working.

Very weird. It makes it sounds like an OpenSSL bug.

> Can anyone explain to me why SSL is still working

Nope, since the documented functions haven't been called then. But they might
have some way to do it automaticly nowadays.

> and what flags I should use with SSL?

To do what?

> The documentation doesn't say much about this. Has anyone else experienced
> similar problems when using the CURL_GLOBAL_SSL flag?

The docs might be a bit sparse in this ares, yes. But the SSL bit should be
set unless you have initialized the OpenSSL library already in some other way.

> What about LINUX and e.g. CURL_GLOBAL_WIN32? The same flags seem to be
> defined in curl.h on all platforms.

It is defined on all platforms, but the *WIN32 is ignored on all platforms
that don't care. The *SSL one is similarly ignored by all libcurls that are
built without SSL...

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-05-21