简体   繁体   English

如何在Jmeter中将客户端证书与SOAP请求一起发送

[英]How to send client certificate along with SOAP request in Jmeter

I have a certificate which i need to pass along with the SOAP Request in JMeter. 我有一个证书,需要与JMeter中的SOAP Request一起传递。

I have edited the system.properites file to add 我已经编辑了system.properites文件以添加

javax.net.ssl.keyStore= path to keystore file
javax.net.ssl.keyStorePassword=password

I am still getting the error You need valid client certificate from DHW to access page . 我仍然收到错误消息You need valid client certificate from DHW to access page

Am I missing somethig here? 我在这里想念某事吗?

The same request is working well from SOAP_UI. 来自SOAP_UI的相同请求运行良好。

There is a lot that can be going wrong here. 这里有很多地方可能出错。

Here is my guess though... 不过这是我的猜测...

The server is most likely setup for mutual authentication. 服务器很可能是为相互身份验证而设置的。 You can test this by running your java client with the following system property: -Djavax.net.debug=ssl 您可以通过使用以下系统属性运行Java客户端来对此进行测试:-Djavax.net.debug = ssl

You should see the ssl handshake and see if the server is requesting a client certificate or not. 您应该看到ssl握手,并查看服务器是否在请求客户端证书。 The messaging will be VERY verbose and you will have to diligently look though the log output to see what is actually occurring. 消息将非常冗长,您将必须认真查看日志输出以查看实际发生的情况。

Hopefully, in the output you will see a list of Certificate Authorities (CAs) that the server trusts. 希望在输出中您将看到服务器信任的证书颁发机构(CA)的列表。 Your client's certificate MUST be signed by one of these CAs. 您的客户的证书必须由这些CA之一签名。 If not, the client won't even attempt to send its client certificate. 如果没有,则客户端甚至不会尝试发送其客户端证书。

If you have access to the server, you can create your own CA and then sign the clients certificate with that new CA and that will work. 如果您有权访问服务器,则可以创建自己的CA,然后使用该新CA签署客户端证书,这样将起作用。 I actually just did that yesterday. 我实际上昨天才这样做。 :D :d

The issue is resolved. 问题已解决。 I was giving only single backspace instead of two backspaces as per java conventions. 我只给出一个退格键,而不是按照Java约定给出两个退格键。 It works fine with this minor modification. 通过此较小的修改,它可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM