我需要能夠將JMeter指向具有SSL證書過期的測試服務器(我們需要一段時間才能更新它)。將過期的SSL證書導入到Java密鑰庫中
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at sun.security.ssl.SSLSessionImpl.getPeerCertificates(Unknown Source)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.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.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:284)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1075)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1064)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:426)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255)
at java.lang.Thread.run(Unknown Source)
有誰知道的任何方式,我可以導入說證書導入密鑰庫,並在此過程中更改過期日期(將由這甚至幫助或:當它試圖連接JMeter是非常正確地拋出異常服務器證書是否過期這一事實仍然會導致此異常被拋出)?
我試圖設置的有效性作爲導入的一部分,但這個被忽略:
keytool -import ... -validity 100
PS - 我知道我可以實現我自己的TrustManager這忽略了這些檢查,但我的手指贏得」允許我編寫這樣的惡意代碼,而且我寧願選擇一種解決方案,而不必修改JMeter即可在服務器上安裝該解決方案!
謝謝你的時間。
您不能更改證書到期日進口,如THI s是「簽名」內容的一部分 - 否則任何人都可以無限期延長證書的使用期限! – 2013-04-23 15:40:43