Mailing List Archive

ssl for conserver client/server communications
well folks, i've been reading the new o'reilly openssl book and trying to get
my head around what it would take to incorporate openssl into the client/server
code. looks relatively easy on the surface, but then i started to look at the
details. because the code is using non-blocking sockets and ssl connections
can be renegotiated (i'm not 100% sure if the app *has* to initiate it or if
it really can happen after a certain amount of data transfer, so that keys
change) many things need to change inside the main select() loop.

why am i saying this? well, two reasons. first, i wanted folks to know that
i'm actively working on encrypting the data between the client and server. i
have a need to learn something new - openssl is it (and by no means am i going
to call myself an expert once this is over, just more knowlegable than before).
second, i'm looking for pointers or help regarding openssl from any experts
that might be out there. maybe it could be a code review or maybe just a list
of dos and don'ts. basically, if you're familiar with the openssl api and have
time, i'd love to know you exist (like the whole renegotiation thing - since
we're in control of the client and server, can i just ignore it since i'm not
asking for one and not have to rewrite major chunks of code?).

with that, i'll leave you all. i'm going to go dig more into that whole
renegotiation thing, maybe the answer is in a man page. either way i'll
probably just ignore it for now and cause the code to die a horrible death
if it's happening. at least i'll be making progress and i can redo the
ugly stuff later. again, i'd love to hear from anyone with more knowledge
than the o'reilly book. ;-)

Bryan
Re: ssl for conserver client/server communications [ In reply to ]
>well folks, i've been reading the new o'reilly openssl book and trying to get
>my head around what it would take to incorporate openssl into the client/server
>code. ...

When we went through a major console server upgrade a few months ago I
was interested in doing this as well. However the work involved exceeded
my time, so I came up with an alternative that uses normal ssh to access
our server.

I threatened to write this all up several months ago :-), but your
letter prompted me to actually do it. See:

ftp://gandalf.cc.purdue.edu/pub/conserver/README.ssh

Note: I am by no stretch of the imagination a security person. If anyone
sees anything wrong with what I've done, please sing out.

Also, I've haven't done a lot of review of the README, and haven't even
looked at the code in a while. Comments are welcome, but please be
kind :-).

>Bryan

John R. Jackson, Technical Software Specialist, jrj@purdue.edu
Re: ssl for conserver client/server communications [ In reply to ]
On Fri, Sep 27, 2002 at 01:48:46PM -0500, John R. Jackson wrote:
> I threatened to write this all up several months ago :-), but your
> letter prompted me to actually do it. See:
>
> ftp://gandalf.cc.purdue.edu/pub/conserver/README.ssh
>
> Note: I am by no stretch of the imagination a security person. If anyone
> sees anything wrong with what I've done, please sing out.

this is so very cool! i hope others out there can benefit from it. i
didn't look at it closely, but what i saw was very helpful.

i figured i'd also take this opportunity to tell folks that i am making
progress in the ssl realm. the server code is in and a
"proof-of-concept" of sorts of the client code is working -
unfortunately, the client code has to be adjusted more than i realized
so it too can take advantage of encryption.

i also want to warn folks that i'm not putting in any certificate
exchange/validation (which would require folks to build certs for the
server) into the code (yet). this exposes (according to the book) the
app to man-in-the-middle attacks (and maybe other types of attacks that
i don't remember, but i don't think so). i'm planning on adding certs
as an optional step, but the first round of code (call it alpha or beta
or whatever) will leave it out. i'd just like to see an encrypted
(however nonauthenticated) session - and figured that would make a lot
of other folks happy as well.

i'll make patches available as soon as i get to a stable point and find
an internet cafe that lets me attach my laptop so i can upload them.
;-)

Bryan