Hi Guys,
I have scenario where I need to test servlet access remote session bean using certificate chain or distinguished name identity token without SSL.
Here the Refernce Implementation(RI) is Glassfish v3 and Vendor Implementation(VI) is WebSphere.
WebClient (RI) ===> RemoteSessionBean (VI)
1)
a)Components deployed in RI:
1) EJBs SessionBean(SB) and EntityBean(EB)
2) EJBs LogBean(LB) and ControlBean(CB)
3) ApplicationClient(AC) and WebClient(WC)
b)Components deployed in VI(Vendor Implementation)
1) EJBs SessionBean(SB) and EntityBean(EB)
c) Transport protection : no SSL
2) Add the following to invocation chain
a) WebClient
b) RemoteSessionBean
3) Call invoke on WebClient
Call invoke on RemoteSessionBean
4) Verify the following
a) SAS identity token =certificate chain or distinguished name
b) port !=0
c) IOR.4
Here at step 3 when I call invoke on WebClient am seeing this exception
02-10-2010 11:32:01: WebClient (RI) ====> RemoteSessionBean (VI).
02-10-2010 11:32:01: Send http request to WebClient
02-10-2010 11:32:01: Openning https url connection to:
https://localhost:1045/interop_csiv2_ew_ssln_ssln_upn_ccid_r_web/CSIv2ServletTest
02-10-2010 11:32:01: Encoded String=CHAIN=java%3Acomp%2Fenv%2Fejb%2FRemoteSession&harness.log.delayseconds=1&testName=ew_ssln_ssln_upn_ccid_wb_sb_testid4a&harness.log.traceflag=true&deployManageruri.2=deployer%3AWebSphere%3Alocalhost%3A8880%3FconnectorType%3DSOAP&deployManageruri.1=deployer%3ASun%3AAppServer%3A%3Aloalhost%3A4848&bin.dir=%2Fcts%2Fjavaeetck%2Fbin%2Fxml%2F..%2F..%2Fbin&deployManageruname.2=j2ee&deployManageruname.1=admin&porting.ts.login.class.2=com.ibm.cts.porting.CTSLoginContext&porting.ts.login.class.1=com.sun.ts.lib.implementation.sun.javaee.SunRILoginContext&porting.ts.HttpsURLConnection.class.2=com.ibm.cts.porting.CTSHttpsURLConnection&porting.ts.HttpsURLConnection.class.1=com.sun.ts.lib.implementation.sun.javaee.SunRIHttpsURLConnection&porting.ts.deploy2.class.2=com.sun.ts.lib.implementation.sun.javaee.SunRIDeployment2&wsdlRepository2=%2Fcts%2Fjavaeetck%2Fbin%2Fxml%2F..%2F..%2Ftmp%2FwsdlRepository1&porting.ts.deploy2.class.1=com.ibm.cts.porting.CTSDeployment88&wsdlRepository1=%2Fcts%2Fjavaeetck%2Fbin%2Fxml%2F..%2F..%2Ftmp%2FwsdlRepository2&line.separator=&finder=cts&all.props=false&javaee.level=full&harness.temp.directory=%2Fcts%2Fjavaeetck%2Fbin%2Fxml%2F..%2F..%2Ftmp&org.omg.CORBA.ORBClass=foo&namingServicePort2=2809&namingServicePort1=3700&namingServiceHost2=localhost&porting.ts.url.class.2=com.ibm.cts.porting.CTSurl&namingServiceHost1=localhost&porting.ts.url.class.1=com.sun.ts.lib.implementation.sun.common.SunRIURL&harness.socket.retry.count=10&harness.log.port=2000&deployManagerJarFile.2=%2Fcts%2FWAS%2Fplugins%2Fcom.ibm.ws.admin.services.jar&deployManagerJarFile.1=%2Fcts%2Fglassfish%2Fglassfish%2Flib%2Fdeployment%2Fsun-as-jsr88-dm.jar&java.naming.factory.initial=foo&variable.mapper=com.sun.el.lang.VariableMapperImpl&certLoginUserAlias=cts&porting.ts.jms.class.2=com.sun.ts.lib.implementation.sun.javaee.SunRIJMSAdmin&porting.ts.jms.class.1=com.sun.ts.lib.implementation.sun.javaee.SunRIJMSAdmin&porting.ts.deploy.class.2=com.sun.ts.lib.deliverable.cts.deploy.StandardDeployment14&test_classname=com.sun.ts.tests.interop.csiv2.ew_ssln_ssln_upn_ccid.reverse.Client&porting.ts.deploy.class.1=com.sun.ts.lib.implementation.sun.javaee.glassfish.AutoDeployment&deployManagerpasswd.2=j2ee&deployManagerpasswd.1=adminadmin&securedWebServicePort=1045¤t.keywords=all&generateSQL=true&webServerHost=localhost&harness.host=9.5.129.13
02-10-2010 11:32:01: ERROR: Caught exception: RSA premaster secret error
02-10-2010 11:32:01: ERROR: javax.net.ssl.SSLKeyException: RSA premaster secret error
at com.sun.net.ssl.internal.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:97)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:634)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:226)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:516)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:454)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:884)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1107)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:415)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:881)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
at com.sun.ts.lib.implementation.sun.javaee.SunRIHttpsURLConnection.getOutputStream(SunRIHttpsURLConnection.java:146)
at com.sun.ts.lib.porting.TSHttpsURLConnection.getOutputStream(TSHttpsURLConnection.java:164)
at com.sun.ts.tests.interop.csiv2.common.CSIv2Util.sendPostDataHttps(CSIv2Util.java:54)
at com.sun.ts.tests.interop.csiv2.ew_ssln_ssln_upn_ccid.reverse.Client.ew_ssln_ssln_upn_ccid_wb_sb_testid4a(Client.java:732)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.ts.lib.harness.EETest.run(EETest.java:495)
at com.sun.ts.lib.harness.EETest.getPropsReady(EETest.java:392)
at com.sun.ts.lib.harness.EETest.run(EETest.java:252)
at com.sun.ts.lib.harness.EETest.run(EETest.java:204)
at com.sun.ts.tests.interop.csiv2.ew_ssln_ssln_upn_ccid.reverse.Client.main(Client.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.appclient.client.acc.AppClientContainer.launch(AppClientContainer.java:424)
at org.glassfish.appclient.client.AppClientFacade.launch(AppClientFacade.java:151)
at org.glassfish.appclient.client.AppClientGroupFacade.main(AppClientGroupFacade.java:64)
Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available
at javax.crypto.KeyGenerator.<init>(DashoA13*..)
at javax.crypto.KeyGenerator.getInstance(DashoA13*..)
at com.sun.net.ssl.internal.ssl.JsseJce.getKeyGenerator(JsseJce.java:223)
at com.sun.net.ssl.internal.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:89)
... 32 more
I have placed the security jar and gf-client.jar in the classpath . Any help or trails suggested will be appreciated. Thanks
[Message sent by forum member 'akidi' (ravikiranreddyakidi_at_gmail.com)]
http://forums.java.net/jive/thread.jspa?messageID=387102