Hi Renato,

On Wed, Jul 2, 2008 at 6:27 PM, Renato Araújo Ferreira
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have a program that is installed in some desktops to listen for
> connections from a client that connect to this desktop to gathe some
> information about the system. The problem is that these desktops (server
> side) are not the trusted part of the communication because they, unlike
> the gather server (client side), could be used by anyone, then the
> certificates and keys used at server side could not permit be used in
> connections to anothers desktops.
>
> The system already works with OpenSSL using private keys and self signed
> certificates, but I'm encountering some difficulties to determine the
> combination of kind of certificates that can be used to solve my
> authentication problem. I think that this area does not appear to be widely
> documented for the system development yet.
>
> Someone could help me?

>From the look of it, I'd say this could potentially be solved by using
both server ~ and client certificates. I am a bit rusty on the OpenSSL
details in this regard, but I think it is possible to establish SSL
connections where the server does not have a certificate, yet the
client /has/. Basic thinking is this: take the usual web browser/web
server setup where server needs to be trusted and comes with a
certificate; then /reverse/ this setup as we now have a client which
has to be trusted as your story reads like a regular, anonymous web
browser=client vs. trusted web server setup which is reversed as the
initiative for the connection is reversed.

Alas, when the 'server without a certificate' does not work out (IIRC
it was done by providing custom callbacks for the server and client
certificate chain validations to OpenSSL on both client and server
side code), just use the servers with a self-signed cert like you
already do, then also make sure the server code only accepts client
connections which transmit the proper (trusted) client certificate.
Depending on your security needs, those client certs can be top nodes
in a cert chain with a self-signed cert as root and created by you, or
you could go the distance cert-wise and base that client cert on a
generally trusted public root certificate, e.g. by obtaining one
client cert (or more) from Verisign or another cert-selling company
out there.

Have a look at the s_server and s_client code provided with OpenSSL
for a peek at verify callbacks. Off the top of my head: look for
verify callbacks and how to register them (SSL_CTX_set_verify()). I'm
sure there's a SSL_set_verify() too to apply this globally.

Cipher-wise, correct me if I'm wrong, 'don't care too much about the
server/listener' means 'anonymous cipher' for that one is good enough.
And 'anonymous' means DH (Diffie Hellman) in SSL. Now the one who does
the validation of such is the /other/ side of the connect, so the
/client/ code should accept DH-based ciphers from the 'servers'
('listeners') to permit the existence of a 'server' (or better:
'listener' in your case) without any cert at all, while said 'server'
a.k.a. 'listener' would NOT permit DH or other anon ciphers from that
client of yours as /that/ one should always send a trustworthy cert
along. Sort of like a regular SSL server which doesn't accept client
connects when not accompanied by an okayed client cert.


Does this help, or did I answer the wrong question?


-- 
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web: http://www.hobbelt.com/
 http://www.hebbut.net/
mail: [EMAIL PROTECTED]
mobile: +31-6-11 120 978
--------------------------------------------------
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to