• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMETER scripting issues HTTPS site

 
Prasenjit Maity
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  • 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.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic