W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2000

RE: multiple ssl requests

From: Kem Mason <kmason@trutek.com>
Date: Tue, 14 Mar 2000 12:31:17 -0700
To: "Peter Dilorenzo" <peter@aersoft.ie>
Cc: <www-lib@w3.org>
Message-ID: <NDBBJAHGKMFHEMLPPIBJMEBICAAA.kmason@trutek.com>


I don't know if this is the right solution, but I had the same problem, and
it doesn't happen anymore (although I've had other problems with SSL).

The change I made was in HTSSLReader.c and HTSSLWriter.c

I commented the line HTHost_setCloseNotification(me->host, YES);
there is a corresponding function in HTSSLWriter.c that calls this same
function.

This seemed to fix the problem, I'm not sure what the comment above the
function call meant though...

Kem


PRIVATE int HTSSLReader_free (HTInputStream * me)
{
    HTNet * net = HTHost_getReadNet(me->host);
//    //HTTRACE(PROT_TRACE, "HTSSLReader. Free %p\n" _ me);
    if (me->htssl) {
	HTSSL_free(me->htssl);
	me->htssl = NULL;

	/*
	** do it just because SSLeay doesn't want to create a new ssl structure
	** on a non-fresh socket
	*/
//	HTHost_setCloseNotification (me->host, YES);
    }

    if (net && net->readStream) {
	int status = (*net->readStream->isa->_free)(net->readStream);
        if (status == HT_OK) net->readStream = NULL;
	return status;
    }
    return HT_OK;
}



-----Original Message-----
From: www-lib-request@w3.org [mailto:www-lib-request@w3.org]On Behalf Of
Peter Dilorenzo
Sent: Tuesday, March 14, 2000 5:50 AM
To: www-lib@w3.org
Subject: multiple ssl requests


Hi,

I have a program that can operate in two ways: Firstly it can accept a
new request from a client, Initialise libwww (including the SSL part),
do some of the various libwww set-up function calls and then load the
https URL. After this is done it shuts down both libwww and SSL. This
scenario works.

Secondly, it can accept a new request like above but instead of
terminating, accept a second request, (thus avoiding the reinitialising
of  libwww and SSL), and request another https URL. This second call
does not work. Instead it times out.

This above second scenario does work for HTTP requests but not for HTTPS
requests. Is there something else I must do after each SSL transaction?
Or is it illegal to not completely reinitialise after a single SSL
transaction?

I looked at the 'multichunk' example that comes with libwww and tried
putting the libwww-ssl initialisation and termination calls in this and
found the same problem. It works on the first iteration, but not on
subsequent iterations.

Thanks,

Peter.
Received on Tuesday, 14 March 2000 14:33:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:35 GMT