Bug 57539

Summary: Secure Sockets (SSL) for TCP Sampler
Product: JMeter - Now in Github Reporter: Tomasz Skórka <t.skorka>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: NEEDINFO ---    
Severity: enhancement CC: p.mouawad, t.skorka
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: patch_57539
docs screenshoot update

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.
Comment 4 The ASF infrastructure team 2022-09-24 20:37:59 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3526