[Beepcore-java-users] Validate Certificate from Remote Peer
Status: Beta
Brought to you by:
huston
From: Lukas E. <eic...@do...> - 2006-06-02 15:07:45
|
Hello, I hope I can reanimate a bit this Mailing List. I am a newbie with BEEP and beepcore-java and have following Problem: I implement a connection to the Denic for the new Realtime Registry Interface which can be established over BEEP. It works fine, but now I want to check the remote certificate to ensure that I really speak with the denic server. (It is optional) I try it really simple like the following code show: --------------------------- // Create the BeepSession Instance beepSession = TCPSessionCreator.initiate (HOST, PORT); // Create the TLSProfile TLSProfile tls_profile = TLSProfileJSSE.getDefaultInstance (); // Some Tests, unfortunately without success /* ProfileConfiguration prConfig = new ProfileConfiguration(); prConfig.setProperty("Listener Anonymous", "true|false"); ... tls_profile.init(TLSProfile.URI, prConfig); */ // Adds the TLS support beepSession = tls_profile.startTLS ((TCPSession) beepSession); // Try to get the remote certificate SessionCredential sessCre = beepSession.getPeerCredential(); Object remoteCert = sessCre.getRemoteCertificate(); validateRemoteCert(remoteCert); --------------------------- Unfortunately the remote certificate is an empty Object (not null). Have anybody some ideas for me, what was going wrong here? Really Thanks for some comments and sorry for my English. Kind Regards, Lukas Eichhorn |