Re: apt https method v2
On Sat, 6 Apr 2002, Tomas Pospisek wrote:
> Ummm.. so which direction do you want me to try? Should I try moving the
> Connect/Read/Write/Close/Open stuff into Connection or not (which will
> make an even bigger diff!)
I think it will be smaller actually, compared with my code you need to add
two new classes (Connection and ConnectionSSL) and shuffle some routines
around slightly. The code you already wrote is still correct, just needs
some renamed function calls.
> And if - how do you think Connection should look like? Should I do a http
> version and subclass it into ConnectionSSL?
Well, one would have a standard POSIX version and an OpenSSL version that
creates streams with the various special semantics.
> > Comment at the top of https.cc should describe the interface to openssl.
> Something like:
No.. right now there is not much to say, just that it uses openssl to
provide encryption/authentication for https - but eventually you will have
lots to say about how the authentication mechanisms work. What you have
now is very much wrong for the file it describes.
> So what I need to know to proceed without reimplementing everything
> the next time over again in a different way:
Well, IHMO there are two options
- Suck everything into CircleBuf, rename it to 'ConnectionWithBuffering'
or some such and have the necessary magic for that - this was the
- Suck all the connection management stuff into a Connection class and
teach CircleBuf how to do IO on a Connection class - this is the new
The latter seems to be the nicer of the two, more accurately models
To UNSUBSCRIBE, email to firstname.lastname@example.org
with a subject of "unsubscribe". Trouble? Contact email@example.com