Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.lang.java.security > #195

Re: Secure Sopckets and M

From "Ronny Schuetz" <ronny.schuetz@THRWHITE.remove-dii-this>
Subject Re: Secure Sopckets and M
Message-ID <6lmc80Fd5u7tU1@mid.individual.net> (permalink)
Newsgroups comp.lang.java.security
References <cfc619a2-e502-4cf9-a053-1f7b511e012d@b2g2000prf.googlegroups.com>
Date 2011-04-27 16:08 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.security
dave.clarke@reflective.com wrote:

> Using JDK 6 (embedded JSSE) we need some code that can set up an SSL
> socket for an HTTPS connection where BOTH server and client
> certifricates can be exchanged.
> 
> We have tried all sorts of things, but I wonder if someone out there
> has a code fragment we can look at which is known to work.

For SSLServerSockets, you just need a flag to request the client
certificate during the handshake:

http://java.sun.com/javase/6/docs/api/javax/net/ssl/SSLSocket.html#setNeedClientAuth(boolean)

The client certificate can be retrieved from the SSLSession after the
handshake.

It is up to the server to request the client certificate, i.e. if you're
working on a client, I don't think that you can send your certificate to
the server by your own in a SSL compliant way if the server didn't
requested it.

Ronny

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.security | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Secure Sopckets and Mutua "dave.clarke" <dave.clarke@THRWHITE.remove-dii-this> - 2011-04-27 16:08 +0000
  Re: Secure Sopckets and M "Ronny Schuetz" <ronny.schuetz@THRWHITE.remove-dii-this> - 2011-04-27 16:08 +0000
    Re: Secure Sopckets and M "dave.clarke" <dave.clarke@THRWHITE.remove-dii-this> - 2011-04-27 16:08 +0000

csiph-web