You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by ohaya <oh...@yahoo.com.INVALID> on 2020/12/22 05:19:52 UTC

Problem with client certificates - No certificate found for alias:'john_doe'

Hi,

It has been awhile since I have worked with Jmeter, but I am trying to setup a simple test plan where I do an HTTPS request.

I have a CSV file and a JKS file in the Jmeter "bin" directory.

The CSV file has one line:

intuser_cindy




The JKS is "intusers-keystore.jks", and has 3 privatekey entries, including one whose alias is "intuser_cindy".


Here's a snippet of keytool:

keytool -list -keystore intusers-keystore.jks -storepass XXXX -alias intuser_cindy
intuser_cindy, Dec 22, 2020, PrivateKeyEntry,
Certificate fingerprint (SHA1): D3:3C:8F:E4:E7:EB:.....:F5:A4:57:1C:AF:99:53:00:2B



In the Jmeter test plan I have:

- CSV Data set config (configured for filename '.\intusers_aliases.csv')
- Keystore Config
- HTTP request

In the system.properties file, I have:

javax.net.ssl.keyStore=./intusers-keystore.jks
javax.net.ssl.keyStorePassword=XXXXXX


However, when I run a test, I am seeing an error:

No certificate found for alias:'intuser_cindy'

As I said, it's been awhile since I've worked with Jmeter, but what could be configured incorrectly?  I've been staring at this for awhile now, so I hope that someone here might be able to help?

Thanks,
Jim


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: Problem with client certificates - No certificate found for alias:'john_doe'

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 22.12.20 um 16:39 schrieb ohaya:
>  Hi glinius,
>
> Thanks! 
>
> Our "normal" Jmeter is 4.0. Yes, I know that is old, but our work doesn't want to move to newer one yet. 

Any special reason, other than 'never change a running system'?


>
> FYI, I transferred the .jks file and .csv file over to a different 5.21 Jmeter, and it worked there!! So I am kind of ok with that for my testing, BUT, if I do make a new JKS with only a single cert/key in it, as you suggested, how do I use that without the CSV and Keystore Config?

You might be hit by https://bz.apache.org/bugzilla/show_bug.cgi?id=62766
, but I honestly don't have enough solid information to make more than a
guess.

Felix

>
> Thanks again!
>
> Jim
>
>
>
>      On Tuesday, December 22, 2020, 03:06:41 AM EST, glinius@live.com <gl...@live.com> wrote:  
>  
>  It's hard to say what's wrong without seeing your jmeter.log file
> <https://jmeter.apache.org/usermanual/get-started.html#logging>  , CSV Data
> Set Config and Keystore Config setup so I can only give a generic piece of
> advice: what you put into "Variable Names" in the CSV Data Set Config must
> match what your put into "Variable name holding certificate alias" in the
> Keystore Config, also ensure that "Alias start index" is 0 and "Alias end
> index" is -1 so Keystore Config would load all the certificates in the
> keystore. 
>
> See  How to Use Multiple Certificates When Load Testing Secure Websites
> <https://www.blazemeter.com/blog/how-to-use-multiple-certificates-when-load-testing-secure-websites>  
> article for more details. 
>
> If you need only one certificate from the keystore you can  extract it into
> a separate keystore
> <https://www.misterpki.com/import-keystore-into-another-keystore/>  like 
>
>
>> keytool -importkeystore -srckeystore c:\temp\keystore.p12 -destkeystore
>> c:\temp\onecert.p12 -srcstorepass secret --deststorepass secret -srcalias
>> intuser_cindy
> This way you will have *onecertp.12* keystore with only one certificate
> which can be used directly without having to add CSV Data Set Config or
> KeyStore Config
>
>
>
> --
> Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: Problem with client certificates - No certificate found for alias:'john_doe'

Posted by ohaya <oh...@yahoo.com.INVALID>.
 Hi glinius,

Thanks! 

Our "normal" Jmeter is 4.0. Yes, I know that is old, but our work doesn't want to move to newer one yet. 

FYI, I transferred the .jks file and .csv file over to a different 5.21 Jmeter, and it worked there!! So I am kind of ok with that for my testing, BUT, if I do make a new JKS with only a single cert/key in it, as you suggested, how do I use that without the CSV and Keystore Config?

Thanks again!

Jim



     On Tuesday, December 22, 2020, 03:06:41 AM EST, glinius@live.com <gl...@live.com> wrote:  
 
 It's hard to say what's wrong without seeing your jmeter.log file
<https://jmeter.apache.org/usermanual/get-started.html#logging>  , CSV Data
Set Config and Keystore Config setup so I can only give a generic piece of
advice: what you put into "Variable Names" in the CSV Data Set Config must
match what your put into "Variable name holding certificate alias" in the
Keystore Config, also ensure that "Alias start index" is 0 and "Alias end
index" is -1 so Keystore Config would load all the certificates in the
keystore. 

See  How to Use Multiple Certificates When Load Testing Secure Websites
<https://www.blazemeter.com/blog/how-to-use-multiple-certificates-when-load-testing-secure-websites>  
article for more details. 

If you need only one certificate from the keystore you can  extract it into
a separate keystore
<https://www.misterpki.com/import-keystore-into-another-keystore/>  like 


> keytool -importkeystore -srckeystore c:\temp\keystore.p12 -destkeystore
> c:\temp\onecert.p12 -srcstorepass secret --deststorepass secret -srcalias
> intuser_cindy

This way you will have *onecertp.12* keystore with only one certificate
which can be used directly without having to add CSV Data Set Config or
KeyStore Config



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org

  

Re: Problem with client certificates - No certificate found for alias:'john_doe'

Posted by "glinius@live.com" <gl...@live.com>.
It's hard to say what's wrong without seeing your jmeter.log file
<https://jmeter.apache.org/usermanual/get-started.html#logging>  , CSV Data
Set Config and Keystore Config setup so I can only give a generic piece of
advice: what you put into "Variable Names" in the CSV Data Set Config must
match what your put into "Variable name holding certificate alias" in the
Keystore Config, also ensure that "Alias start index" is 0 and "Alias end
index" is -1 so Keystore Config would load all the certificates in the
keystore. 

See  How to Use Multiple Certificates When Load Testing Secure Websites
<https://www.blazemeter.com/blog/how-to-use-multiple-certificates-when-load-testing-secure-websites>  
article for more details. 

If you need only one certificate from the keystore you can  extract it into
a separate keystore
<https://www.misterpki.com/import-keystore-into-another-keystore/>   like 


> keytool -importkeystore -srckeystore c:\temp\keystore.p12 -destkeystore
> c:\temp\onecert.p12 -srcstorepass secret --deststorepass secret -srcalias
> intuser_cindy

This way you will have *onecertp.12* keystore with only one certificate
which can be used directly without having to add CSV Data Set Config or
KeyStore Config



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org