wood burning stoves 2.0*
The moose likes Testing and the fly likes JMETER scripting issues HTTPS site Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "JMETER scripting issues HTTPS site" Watch "JMETER scripting issues HTTPS site" New topic
Author

JMETER scripting issues HTTPS site

Prasenjit Maity
Greenhorn

Joined: Aug 14, 2013
Posts: 1
Hi,

I am encountering an strange issue while recording a HTTPS site.
The error code is :-
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated at sun.security.ssl.SSLSessionImpl.getPeerCertificate s(Unknown Source) at org.apache.http.conn.ssl.AbstractVerifier.verify(A bstractVerifier.java:128) at org.apache.http.conn.ssl.SSLSocketFactory.connectS ocket(SSLSocketFactory.java:572) at org.apache.http.impl.conn.DefaultClientConnectionO perator.openConnection(DefaultClientConnectionOper ator.java:180) at org.apache.http.impl.conn.ManagedClientConnectionI mpl.open(ManagedClientConnectionImpl.java:294) at org.apache.http.impl.client.DefaultRequestDirector .tryConnect(DefaultRequestDirector.java:640) at org.apache.http.impl.client.DefaultRequestDirector .execute(DefaultRequestDirector.java:479) at org.apache.http.impl.client.AbstractHttpClient.exe cute(AbstractHttpClient.java:906) at org.apache.http.impl.client.AbstractHttpClient.exe cute(AbstractHttpClient.java:805) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Imp l.sample(HTTPHC4Impl.java:284) at org.apache.jmeter.protocol.http.sampler.HTTPSample rProxy.sample(HTTPSamplerProxy.java:62) at org.apache.jmeter.protocol.http.sampler.HTTPSample rBase.sample(HTTPSamplerBase.java:1075) at org.apache.jmeter.protocol.http.proxy.Proxy.run(Pr oxy.java:212)

I have tried the following after referring to different posts in google:-
1. Updated JDK to JDK7
2. Exported the Certficate of the Website in crt,der and p7c
3. Imported the certificate to cacerts of jre7/lib/security

I am selecting HTTP 4 client for recording.
If I use JAVA, the error code is :-
javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificates does not conform to algorithm constraints at sun.security.ssl.Alerts.getSSLException(Unknown Source) at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.ClientHandshaker.serverCertificat e(Unknown Source) at sun.security.ssl.ClientHandshaker.processMessage(U nknown Source) at sun.security.ssl.Handshaker.processLoop(Unknown Source) at sun.security.ssl.Handshaker.process_record(Unknown Source) at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHands hake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unkn own Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unkn own Source) at sun.net.http://www.protocol.https.HttpsClien...onnect(Unknown Source) at sun.net.http://www.protocol.https.AbstractDe...onnect(Unknown Source) at sun.net.http://www.protocol.https.HttpsURLCo...onnect(Unknown Source) at org.apache.jmeter.protocol.http.sampler.HTTPJavaIm pl.sample(HTTPJavaImpl.java:487) at org.apache.jmeter.protocol.http.sampler.HTTPSample rProxy.sample(HTTPSamplerProxy.java:62) at org.apache.jmeter.protocol.http.sampler.HTTPSample rBase.sample(HTTPSamplerBase.java:1075) at org.apache.jmeter.protocol.http.proxy.Proxy.run(Pr oxy.java:212) Caused by: java.security.cert.CertificateException: Certificates does not conform to algorithm constraints at sun.security.ssl.AbstractTrustManagerWrapper.check AlgorithmConstraints(Unknown Source) at sun.security.ssl.AbstractTrustManagerWrapper.check AdditionalTrust(Unknown Source) at sun.security.ssl.AbstractTrustManagerWrapper.check ServerTrusted(Unknown Source)

I reinstalled JDK7.
The error code has now changed to :-
Secure Connection Failed
Cannot communicate securely with peer: no common encryption algorithm(s).
(Error code: ssl_error_no_cypher_overlap)


http://www.sqaforums.com/forums/performance-load-testing/149630-jmeter-recording-https-site.html#post709753
Dmitri Tikhanski
Greenhorn

Joined: Oct 13, 2013
Posts: 14
  • Option 1: Importing certificates from your site only may not be enough as the site can contain references to another domains i.e. google analytics, banners, etc. Try to capture traffic in your browser via something like Firebug or HttpFox firefox plugins and make sure that there aren't any requests to external resources. If any, you can filter them out via "URLs patterns to exclude" input of Recording Controller.
  • Option 2: JMeter 2.10 (the latest for the moment) provides nice "HTTP(S) Test Script Recorder" available from Non-Test Elements menu in Workbench. It's smart enough to handle the majority of HTTPS related issues
  • Option 3: You can use JMeter Chrome Extension which allows recording of JMeter scripts directly from Google Chrome browser


  • Hope that above helps.
     
     
    subject: JMETER scripting issues HTTPS site
     
    Similar Threads
    java.net.ConnectException: Connection timed out in HttpClient
    JMeter Connection Problem
    jMeter with Axis 1.2
    using a crawler to invoke a google search & analyse google results
    Failed to access the WSDL