Is there a TimedSSLSocket?

53 views
Skip to first unread message

Doug Tollefson

unread,
Feb 6, 2015, 2:21:37 PM2/6/15
to faban...@googlegroups.com
Hi,
Is there an equivalent to  com.sun.faban.driver.transport.util.TimedSocket for a secured connection?
I don't see a TimedSSLSocket, is there a different class that would enable the same functionality?

Thanks!

-Doug


Message has been deleted
Message has been deleted

Jeremy Whiting

unread,
Feb 17, 2015, 5:42:32 AM2/17/15
to faban...@googlegroups.com
Hi Doug,
 Does com.sun.faban.driver.transport.hc3.TimedSSLFactories provide what is needed. The com.sun.faban.driver.transport.hc3.ApacheHC3Transport uses the factory to create a timed SSL socket.

 In fact could you not use ApacheHC3Transport to handle the SSL requests. Or does that not meet your requirements ?

Regards,
Jeremy

Doug Tollefson

unread,
Feb 18, 2015, 3:19:11 PM2/18/15
to faban...@googlegroups.com
Hi Jeremy,

From looking at the java documentation for TimedSSLFactories, I do not see how it will create the timed SSL socket.  Is there an example?

I am updating an existing faban workload that is right now creating a TimedSocket directly.  Would like to have the workload use SSL, and would like to keep the behavior as similar as possible as what it currently does for not secured communication.

Regards,
Doug

Jeremy Whiting

unread,
Feb 26, 2015, 5:01:02 AM2/26/15
to faban...@googlegroups.com
 Second guessing your driver implementation you will either be handling http requests a) relying on a library or b) manually. In for each case you will need to:

a)
 when relying on the HC3 library then using "https" as the protocol. The library will automatically configure and use a TimedSocket.

b)
 when getting dirty and working with a j.n.Socket then Faban doesn't expose TimedSSLFactories. This is a problem that can be resolved either by submitting a PR to the Faban project or do the following.
 Add the attached java file to your project. In this package "com.sun.faban.driver.transport.hc3". It breaks encapsulation but it will get you over the hump. This one line in your driver/transport code will create a j.n.Socket reference

Socket secureSocket = new TimedSSLFactoriesJailBreakConvict().getSecureSocketFactoryInstance().createSocket("host", 443);


 Obviously the ideal situation is Faban is patched to expose the interface org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory. Let's see if that PR is accepted.

Jeremy
TimedSSLFactoriesJailBreakConvict.java

Jeremy Whiting

unread,
Feb 26, 2015, 7:06:40 AM2/26/15
to faban...@googlegroups.com
Issue #81 created.

Doug Tollefson

unread,
Mar 12, 2015, 12:53:34 PM3/12/15
to faban...@googlegroups.com

Thank you Jeremy! This had helped me make some progress.
After further investigation, I am looking back to why the original workload was using the TimedSocket directly instead of using Faban's HttpTransport.
Going forward it looks like it will be easier to use the HttpTransport to generate a workload over SSL, and I am evaluating that path instead now. 

Thank you again for your assistance.

Regards,
Doug

Shanti Subramanyam (gmail)

unread,
Mar 25, 2015, 7:20:07 PM3/25/15
to faban...@googlegroups.com
Hi Doug,
Please let us know if the faban HttpTransport worked for you.

Shanti

--
You received this message because you are subscribed to the Google Groups "faban-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to faban-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages