Hi All, When using a connection pool on the client side to manage outgoing connections one needs to ensure that the connection factory used by the pool to create new connection objects is SSL capable.
Thanks & Regards, On Sat, Dec 13, 2014 at 9:12 AM, Ravindra Ranwala <[email protected]> wrote: > > Hi All, > > The issue was solved by injecting the SSL Connection Factory through the > ProxyConnPool constructor as follows. > > > > > > > > > * clientSSLContext = > SSLUtil.createClientSSLContext(TRUST_STORE_LOCATION, > TRUST_STORE_PASSWORD); > BasicNIOConnFactory sslClientConnectionFactory = > new > BasicNIOConnFactory(clientSSLContext, null, > > ConnectionConfig.DEFAULT); ProxyConnPool connPool = new > ProxyConnPool(connectingIOReactor, sslClientConnectionFactory, 5000);* > > > > > Thanks &Regards, > > On Sat, Dec 6, 2014 at 12:34 PM, Ravindra Ranwala <[email protected]> > wrote: >> >> Hi All, >> >> I am developing a reverse proxy using http core and need to connect to a >> Secure/HTTPS endpoint via the proxy. I took the reverse proxy[1] and added >> SSL support as shown below. >> >> clientSSLContext = >> >> SSLUtil.createClientSSLContext(TRUST_STORE_LOCATION, >> >> TRUST_STORE_PASSWORD); >> >> final IOEventDispatch connectingEventDispatch = >> new >> DefaultHttpClientIODispatch( >> >> >> clientHandler, >> >> >> clientSSLContext, >> >> >> ConnectionConfig.DEFAULT); >> ... >> connectingIOReactor.execute(connectingEventDispatch); >> >> >> I am trying to connect to HTTPS endpoint of SimpleStockQuoteService which >> is deployed in axis2 server. But when I send the request(getQuote), I am >> getting this error in the server console. >> >> 14/12/06 11:16:54 ERROR nhttp.ServerHandler: I/O error: Received >> close_notify during handshake >> javax.net.ssl.SSLException: Received close_notify during handshake >> at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) >> at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1446) >> at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1414) >> at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1552) >> at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1018) >> at >> sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:853) >> at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:727) >> at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624) >> >> >> I enabled SSL debug logs as well, but still could not figure out the >> issue. >> >> Any help would be appreciated. >> >> >> [1] https://hc.apache.org/httpcomponents-core-ga/examples.html >> >> >> >> Thanks & Regards, >> >> -- >> Ravindra Ranwala >> Software Engineer >> WSO2, Inc: http://wso2.com >> <http://www.google.com/url?q=http%3A%2F%2Fwso2.com&sa=D&sntz=1&usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg> >> Mobile: +94714198770 >> >> > > -- > Ravindra Ranwala > Software Engineer > WSO2, Inc: http://wso2.com > <http://www.google.com/url?q=http%3A%2F%2Fwso2.com&sa=D&sntz=1&usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg> > Mobile: +94714198770 > > -- Ravindra Ranwala Software Engineer WSO2, Inc: http://wso2.com <http://www.google.com/url?q=http%3A%2F%2Fwso2.com&sa=D&sntz=1&usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg> Mobile: +94714198770
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
