Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-26-2007
sol79 sol79 is offline
Registered User
 
Name: Oleg Sukhoroslov
Organization: ISA RAS
Project: Distributed computing
 
Join Date: Nov 2006
Posts: 2
Exception in IceSSL.TrustManager

Hi,

I have an Ice server application with two object adapters - external for clients and internal for other servers. Both are listening over SSL, but external one can accept incoming calls from clients without certificate, while internal adapter requires a valid certificate. So I configured IceSSL plugin (Java) as follows:
IceSSL.VerifyPeer=1
IceSSL.TrustOnly.Server.InternalAdapter="CN="Trust ed Server""

Everything worked fine until I tried to check what will happen when a client without certificate connects to internal adapter. I expected the connection to be rejected, but instead the server crashed with this exception:

java.lang.NullPointerException
at IceSSL.TrustManager.verify(TrustManager.java:90)
at IceSSL.Instance.verifyPeer(Instance.java:704)
at IceSSL.TransceiverI.handshakeCompleted(Transceiver I.java:766)
at IceSSL.TransceiverI.handshake(TransceiverI.java:57 3)
at IceSSL.TransceiverI.write(TransceiverI.java:190)
at Ice.ConnectionI.validate(ConnectionI.java:120)
at IceInternal.IncomingConnectionFactory.message(Inco mingConnectionFactory.java:313)
at IceInternal.ThreadPool.run(ThreadPool.java:782)
at IceInternal.ThreadPool.access$100(ThreadPool.java: 12)
at IceInternal.ThreadPool$EventHandlerThread.run(Thre adPool.java:1242)

Looking inside the code I found that there's no safe check whether info.cert is null (just whether it is empty), which apparently caused the exception. With such behavior I can't make my server secure against attacks. Am I using a wrong approach for server configuration or this is sort of bug to be fixed?

Thanks

Last edited by sol79 : 06-26-2007 at 11:04 AM.
Reply With Quote
  #2 (permalink)  
Old 06-26-2007
mes's Avatar
mes mes is online now
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 976
Hi,

That's a bug in IceSSL. You can fix it by replacing line 90 of TrustManager.java with the following:
Code:
        if(info.certs != null && info.certs.length != 0)
Thanks for reporting this problem; it will be fixed in the next release.

Take care,
- Mark
Reply With Quote
  #3 (permalink)  
Old 06-26-2007
sol79 sol79 is offline
Registered User
 
Name: Oleg Sukhoroslov
Organization: ISA RAS
Project: Distributed computing
 
Join Date: Nov 2006
Posts: 2
Thanks for fast reply!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Have IceUtil::Exception inherit from std::exception? bpolivka Comments 2 12-13-2006 11:52 AM
icessl get unknow exception threadpool.server Jacky_Lee Help Center 5 09-26-2006 12:32 PM
IceSSL new features nsns Comments 1 02-15-2005 09:40 AM
about IceSSL sec_freebird Help Center 9 11-25-2004 04:39 AM
Initialization of IceSSL rhochmuth Help Center 1 05-13-2004 08:05 PM


All times are GMT -4. The time now is 12:08 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.