Hello.
I'm writing a client-server application using C++ w. omniORB on the
server and JacORB on the client side.
Everything works fine as long as I don't use SSL, but I can't get the
latter to work.
Here's my code fragment:
System.setProperty("jacorb.security.support_ssl","on");
System.setProperty("jacorb.ssl.server_socket_factory","orb.jacorb.security.ssl.sun_jsse.SSLServerSocketFactory");
System.setProperty("jacorb.ssl.socket_factory","orb.jacorb.security.ssl.sun_jsse.SSLSocketFactory");
System.setProperty("jacorb.security.keystore","/fullpath/keystore.jks");
System.setProperty("jacorb.security.keystore_password","keystorepass");
System.setProperty("jacorb.security.jsse.trustees_from_ks","true");
System.setProperty("jacorb.security.jsse.log.verbosity","4"); // *a)
System.setProperty("jacorb.security.ssl.client.required_options","60");
// *b)
System.setProperty("jacorb.security.ssl.client.supported_options","60");
// *b)
String args[]={"-ORBInitialPort","2809","-ORBInitialHost","127.0.0.1"};
java.util.Properties props=new java.util.Properties();
props.put("ORBInitRef.NameService","corbaloc:iiop:server_hostname:2809/NameService");
props.put("org.omg.CORBA.ORBClass","org.jacorb.orb.ORB");
props.put("org.omg.CORBA.ORBSingletonClass","org.jacorb.orb.ORBSingleton");
props.put("org.omg.PortableInterceptor.ORBInitializerClass.bidir_init","org.jacorb.orb.giop.BiDirConnectionInitializer");
//*c)
Orb=org.omg.CORBA.ORB.init(args,props);
org.omg.CosNaming.NamingContextExt
ncRef=org.omg.CosNaming.NamingContextExtHelper.narrow(Orb.resolve_initial_references("NameService"));
ServeClass
Server=ServerClassHelper.narrow(ncRef.resolve_str("My.MyContext/ServerClass.Object"));
System.out.println("Obtained a handle on server object: "+Server); // *d)
System.out.println("Server version is "+Server.GetVersion()); // *e)
*a) with or without this line I get almost no output.
I tried with and without *b); nothing changes.
*c): Notice I'm using bidirectional IIOP.
*d) effectively prints an IOR (see below), so connecting to the
nameservice works.
*e) is what generates an exception:
ERROR: org.omg.CORBA.TRANSIENT: Retries exceeded, couldn't reconnect to
null
org.omg.CORBA.TRANSIENT: Retries exceeded, couldn't reconnect to null
dior on the above IOR displays:
------IOR components-----
TypeId : IDL:My/ServerClass:1.0
TAG_INTERNET_IOP Profiles:
Profile Id: 0
IIOP Version: 1.2
Host: localhost
Port: 0
Object key (URL): ...
Object key (hex): ...
-- Found 3 Tagged Components--
#0: TAG_ORB_TYPE
Type: 1096045568 (Foreign)
#1: TAG_CODE_SETS
ForChar native code set Id: ISO8859_1
Char Conversion Code Sets: UTF8
ForWChar native code set Id: UTF16
WChar Conversion Code Sets: UTF16
#2: TAG_SSL_SEC_TRANS
target_supports : Integrity, Confidentiality,
EstablishTrustInTarget, EstablishTrustInClient
target_requires : Integrity, Confidentiality,
EstablishTrustInTarget, EstablishTrustInClient
SSL Port : 60606
I'm using JDK 1.5 or 1.6 and I've tried everything I could think of, but
I can't seem to get through. Any hint?
Even getting some more debug output would help, since "reconnect to
null" is the only useful thing I see.
bye & Thanks
av.


|