Bug#77055: Bug#139710: first version of https support available
On Wed, 3 Apr 2002, Tomas Pospisek wrote:
> > +ah_WITH_SSL
> >
> > You are not 'ah', use to_ or something..
>
> Ack, thanks (autotools newbie here)
ah == Adam Heath, btw. :)
> > The macro does not seem to actually test if SSL is available and working
> > to build against, it probably should.
>
> Ack. Fixed. As of now I'm testing for -lssl and for openssl/ssl.h. And
> just failing and telling the user to install it somewhere where configure
> can find it. If that's not traditional, expected behaveour I'd appreciate
> a hint.
--with-ssl
--without-ssl
If --with-ssl is given, and -lssl fails, abort configure.
If --without-ssl is given, do nothing special.
If neither are given, autodetect. If ssl is available, enable it.
> I can see that I can subclass "class CircleBufSSL : CircleBuf". Should I
> put that into a separate file or leave that in http.*?
I would make it a separate file. Then, there is no ifdef, and you can do
makefile tricks.
> But what about the other classes? SSL-enabling f.ex. ServerState means
> just minimal changements to ServerState. If I subclass it I will have to
> override some methods and copy-paste 95% of their code over to the new
> method (f.ex. in ServerState::Open), which will result in two nearly
> identical code sets that need to be maintained. Is this what you want me
> to do? (IMHO not a good idea). See further below for more about the issue.
Modify ServerState so that extending it to enable ssl will be easy.
> > ConnectSSL really needs to use the normal connect function and then just
> > bind the SSL library to that FD (there are functions in openssl to do
> > this). The normal connect function does much more than what openssl
> > provides.
>
> I'm not sure I understand you correctly - this is exactly what's happening
> right now - except that it's in ServerState::Open where this is happening
> (ifdefs and logging removed):
>
> if (ServerName.Access == "https") {
> if (Connect(Host,Port,"https",443,ServerFd,TimeOut,Owner) == false)
> return false;
> else if (ConnectSSL(ServerFd,&Ssl))
> return false;
> return false;
> }
> else if (Connect(Host,Port,"http",80,ServerFd,TimeOut,Owner) == false)
> return false;
The Connect() for the ssl class can call the super connect(), then bind the
port to ssl.
--
To UNSUBSCRIBE, email to deity-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: