[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#139710: first version of https support available



On Fri, 5 Apr 2002, Tomas Pospisek wrote:

> Which means that finally the ifdefs will be transformed in ifs and ww'll
> have f.ex. in HttpMethod::Loop:
> 
> 	// Connect to the host
> 	if(Server->Open() == false)
> 	{
> 		[...]
> 	}
> 	if (https && ConnectSSL(ServerFd,&ctx) == false) {
> 		[...]
> 	}

Well, you'd probably want to just absorbe the connectssl stuff into the
circlebuf constructor, and replace the tail end of the ::Open method with
creating the right circlebuf for later use. 

Actually, the overall scheme ensures that a single process will never
change methods, seperate processes will be used for http and https always.
So you just need to create the right circlebuf at the start of time and
change Reset to reload the fd and do the SSL negotiations.
 
> 	clog("Https method unavailable - APT was not linked against openssl");

Since the https method will be a seperate binary it is sufficient to just
ignore this. The only ifdef should be in the creation of the right
circlebuf.

Heck, because of that you could just use a -DCIRCLEBUF=CircleBufSSL to do
the switching <shrug>.

Jason


-- 
To UNSUBSCRIBE, email to deity-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: