0

I have an API. I need to run test using JMeter. But when I run it before it's passed but now I am getting below error. I am not sure this error is because of unsupported java format or environment unavailability

Error:- ?Data type("text"|"bin"|""):text Response code: Non HTTP response code: javax.net.ssl.SSLHandshakeException Response message: Non HTTP response message: No PrivateKey found for alias:'qa_hialcdr-publall-cons_di-cons_master_ppe'

Ken White
  • 123,280
  • 14
  • 225
  • 444
Harinath
  • 1
  • 1

2 Answers2

1

First, check if your keystore contains a certificate with alias a_hialcdr-publall-cons_di-cons_master_ppe (assuming this is the correct name of the certificate that you want to use).

keytool -list -keystore path/to/your/keystore -alias a_hialcdr-publall-cons_di-cons_master_ppe

Then, check if the keystore is properly set up in system.properties file in jmeter "bin" folder. You should see something like this:

javax.net.ssl.keyStore=path/to/your/keystore
javax.net.ssl.keyStorePassword=changeit

If the above are both ok, the issue could be that you are using a JKS keystore, but the certificate with alias a_hialcdr-publall-cons_di-cons_master_ppe was imported from a PKCS12 file. For some reason, JMeter can't read such certificates from within a JKS keystore. The solution is to create a PKCS12 keystore and point JMeter to it.

If you have individual PKCS12 files, merge them into a single PKCS12 keystore. Make sure all certs in the keystore have the same password. Alternatively, you can convert the JKS to PKCS12.

Then, in your system.properties file, point the SSL properties to your new file.

javax.net.ssl.keyStoreType=pkcs12
javax.net.ssl.keyStore=path/to/your/keystore.p12
javax.net.ssl.keyStorePassword=changeit

Then re-run your tests. This was the solution that worked for me.

tompaulman
  • 11
  • 3
0

It looks like you're using Keystore Configuration and CSV Data Set Config in order to pass multiple client-side certificates along with your HTTP Requests.

The error means that:

  1. The CSV file contains entry with the name of qa_hialcdr-publall-cons_di-cons_master_ppe
  2. And the keystore containing your client-side certificates doesn't contain an entry with such an alias

So ensure that all entries in the CSV files have matching certificates in the keystore and that should be it.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133