diff options
author | Mark Spruiell <mes@zeroc.com> | 2006-04-19 13:57:26 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2006-04-19 13:57:26 +0000 |
commit | 9e516d6a3051e2b164042cbfe650f42ee184d1f5 (patch) | |
tree | 65d6508d7112625ee7d95af48007f2f73d49f3fd /java/src/IceSSL/Instance.java | |
parent | separating client/server configuration; removing client/server properties (diff) | |
download | ice-9e516d6a3051e2b164042cbfe650f42ee184d1f5.tar.bz2 ice-9e516d6a3051e2b164042cbfe650f42ee184d1f5.tar.xz ice-9e516d6a3051e2b164042cbfe650f42ee184d1f5.zip |
removing client/server properties for IceSSL
Diffstat (limited to 'java/src/IceSSL/Instance.java')
-rw-r--r-- | java/src/IceSSL/Instance.java | 48 |
1 files changed, 11 insertions, 37 deletions
diff --git a/java/src/IceSSL/Instance.java b/java/src/IceSSL/Instance.java index b6494d69099..4b6fa6baf66 100644 --- a/java/src/IceSSL/Instance.java +++ b/java/src/IceSSL/Instance.java @@ -22,7 +22,7 @@ class Instance // if(communicator.getProperties().getPropertyAsInt("IceSSL.DelayInit") == 0) { - initialize(null, null); + initialize(null); } // @@ -32,9 +32,9 @@ class Instance } void - initialize(javax.net.ssl.SSLContext clientContext, javax.net.ssl.SSLContext serverContext) + initialize(javax.net.ssl.SSLContext context) { - if(_clientContext != null) + if(_context != null) { Ice.PluginInitializationException e = new Ice.PluginInitializationException(); e.reason = "plugin is already initialized"; @@ -45,7 +45,7 @@ class Instance // If we have to initialize an SSLContext, we'll need a SecureRandom object. // java.security.SecureRandom rand = null; - if(clientContext == null || serverContext == null) + if(context == null) { try { @@ -67,29 +67,16 @@ class Instance } // - // Create the client and server contexts. We always create both, even - // if only one is used. + // Create the context. // try { - _clientContext = new Context(this, true, clientContext, rand); + _context = new Context(this, context, rand); } catch(java.security.GeneralSecurityException ex) { Ice.PluginInitializationException e = new Ice.PluginInitializationException(); - e.reason = "IceSSL: unable to initialize client context"; - e.initCause(ex); - throw e; - } - - try - { - _serverContext = new Context(this, false, serverContext, rand); - } - catch(java.security.GeneralSecurityException ex) - { - Ice.PluginInitializationException e = new Ice.PluginInitializationException(); - e.reason = "IceSSL: unable to initialize server context"; + e.reason = "IceSSL: unable to initialize context"; e.initCause(ex); throw e; } @@ -138,27 +125,15 @@ class Instance } Context - clientContext() - { - if(_clientContext == null) - { - Ice.PluginInitializationException e = new Ice.PluginInitializationException(); - e.reason = "IceSSL: plugin is not fully initialized"; - throw e; - } - return _clientContext; - } - - Context - serverContext() + context() { - if(_serverContext == null) + if(_context == null) { Ice.PluginInitializationException e = new Ice.PluginInitializationException(); e.reason = "IceSSL: plugin is not fully initialized"; throw e; } - return _serverContext; + return _context; } CertificateVerifier @@ -170,7 +145,6 @@ class Instance private IceInternal.ProtocolPluginFacade _facade; private int _securityTraceLevel; private String _securityTraceCategory; - private Context _clientContext; - private Context _serverContext; + private Context _context; private CertificateVerifier _verifier; } |