Bug 62114 - HTTP(S) Test Script Recorder : Client certificate authentication uses the first SSLManager created
Summary: HTTP(S) Test Script Recorder : Client certificate authentication uses the fir...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.13
Hardware: All All
: P2 normal (vote)
Target Milestone: JMETER_5.0
Assignee: JMeter issues mailing list
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2018-02-18 11:02 UTC by Philippe Mouawad
Modified: 2018-03-31 11:50 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Mouawad 2018-02-18 11:02:50 UTC
Reproducing:

- Clone https://github.com/hokein/electron-sample-apps/tree/master/client-certificate
- Run ssl/setup.sh
- Run node server.js
- Input the client.p12 into firefox "Your certificate"
- Hit https://localhost:5000 , you are asked for a certificate and then have approved page

Now to test with JMeter:
- Setup -Djavax.net.ssl.keyStore=<path to client.p12> -Djavax.net.ssl.keyStorePassword=password
- Clear your FF  history
- Use Recording Template
- Start it
- Add JMeter ROOT CA in FF
- Hit https://localhost:5000, you immediately get "denied"

Switch implementation for Java and restart: 
- Clear your FF  history
- You get approved
Comment 1 Philippe Mouawad 2018-02-18 20:45:14 UTC
After further investigation it appears that issue was due to an old SSLManager that was an instance variable of HttpSSLProtocolSocketFactory which was used.
As an effect first certificate loaded was incorrect, updating it with SSLManager menu had no effect.
Comment 2 Philippe Mouawad 2018-02-18 20:48:45 UTC
Author: pmouawad
Date: Sun Feb 18 20:48:21 2018
New Revision: 1824707

URL: http://svn.apache.org/viewvc?rev=1824707&view=rev
Log:
Bug 62114 - HTTP(S) Test Script Recorder : Client certificate authentication uses the first SSLManager created
Contributed by UbikLoadPack
Bugzilla Id: 62114

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/util/HttpSSLProtocolSocketFactory.java
    jmeter/trunk/src/core/org/apache/jmeter/util/JsseSSLManager.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HC4TrustAllSSLSocketFactory.java
    jmeter/trunk/xdocs/changes.xml