Bug 57539 - Secure Sockets (SSL) for TCP Sampler
Summary: Secure Sockets (SSL) for TCP Sampler
Status: NEEDINFO
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement with 1 vote (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-05 09:16 UTC by Tomasz Skórka
Modified: 2021-03-30 12:53 UTC (History)
2 users (show)



Attachments
patch_57539 (7.22 KB, patch)
2015-02-05 11:21 UTC, Tomasz Skórka
Details | Diff
docs screenshoot update (38.35 KB, image/png)
2015-02-05 11:22 UTC, Tomasz Skórka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Skórka 2015-02-05 09:16:01 UTC
TCP sampler should also support secure sockets, as systems that use this connectivity method still exist.
From UI perspective a simple checkbox labeled "SSL" would do. JKS can be provided by cmd line parameters (javax.net.ssl.*).
Comment 1 Tomasz Skórka 2015-02-05 11:21:03 UTC
Created attachment 32433 [details]
patch_57539

Adding patch for java and docs.
Comment 2 Tomasz Skórka 2015-02-05 11:22:48 UTC
Created attachment 32434 [details]
docs screenshoot update
Comment 3 Milamber 2015-02-08 16:36:42 UTC
Thanks for your patch.

Some comments:

* The TCP sampler fails with a self-signed SSL certificat
Error is:
Response code: 500
Response message: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

To solve this issue on JMeter, HTTP Sampler or Mail Sampler accepts all SSL certificate (See class like TrustAllSSLSocketFactory) 

* The documentation must be inserted in component_reference.xml (<-- XML) not .html. The HTML file is automatically generated by the build script (ant tasks: docs, printable_docs)

* I think that the key in messages.properties for the checkbox label SSL must be "tcp_usessl" (not just only "usessl"). The value can be "Use SSL" too (seems better)

* In the GUI, I think that the "Use SSL" checkbox can be at the first position (before Re-use connection)

* In TCPConfigGui.java, remove the 'new' comment's lines ("//        useSsl.addItemListener(new ItemListener() {....). not need I think.

* In TCPSampler.java, in the method " public SampleResult sample(Entry e)", add to the StringBuilder sb, the key/value for Use SSL (before the reuse value)


Thanks.