cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SSL Problems

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 12 Nov 2001 23:42:05 +0100 (MET)

On Mon, 12 Nov 2001, Samuel Listopad wrote:

> I am trying to write a OLE component to be used on Win32 with IIS and
> ASPs. When I try to use SSL twice in a row (without restarting the IIS
> server) it returns an error of
>
> SSL: couldn't create a context!

You mean it works the first time and the second time it doesn't work? Exactly
what function call fails the second time? Have you tried single-stepping into
the libcurl to see what happens internally?

> I was wondering if there is known issue with this? Is it related to the
> caching of SSL contexts?

This is not a known issue, and we actually don't cache contexts, only session
IDs (those are not the same).

> Things I have tried:
> global init and cleanup in con/destructor, new curl everytime
> global init and cleanup everytime, new curl everytime
> global init and cleanup in con/destructor, new curl in
> constructor, delete curl in destructor.

When you say "new curl", does that mean curl_easy_init()?

Can you make a small example source code that we can try that makes this
happen?

> options being set:
> curl_easy_setopt(curlHandle, CURLOPT_URL, host);
> curl_easy_setopt(curlHandle, CURLOPT_FOLLOWLOCATION, 1);
> curl_easy_setopt(curlHandle, CURLOPT_NOPROGRESS, 1);
> curl_easy_setopt(curlHandle, CURLOPT_SSL_VERIFYHOST, 1);
> curl_easy_setopt(curlHandle, CURLOPT_MUTE, 1);
> curl_easy_setopt(curlHandle, CURLOPT_ERRORBUFFER, lastError);
>
> /*Shamelessly stolen from inmemory example*/
> curl_easy_setopt(curlHandle, CURLOPT_HEADERFUNCTION,
> WriteMemoryCallback);
> curl_easy_setopt(curlHandle, CURLOPT_WRITEFUNCTION,
> WriteMemoryCallback);
> curl_easy_setopt(curlHandle, CURLOPT_FILE, (void *)&body);
> curl_easy_setopt(curlHandle, CURLOPT_WRITEHEADER, (void
> *)&header);
>
> Any ideas?

No. It looks ok...

> Sorry if this is off topic, I am new to the list.

It is certainly very much on topic!

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-11-12