Quantcast

Using SSL authentication certificates

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Using SSL authentication certificates

Shmuel Krakower
Hi Community,
I am trying to use private certificate to authenticate my HTTPS requests.


   1. I've exported my certificate from windows MMC certificates manager to
   PFX file, renamed it to p12.
   2. Opened my jmeter scripts - changed relevant http samplers to use the
   Java implementation.
   3. Loaded the p12 file with SSL manager.
   4. It works!


I have few questions about it:

   1. Is it documented that only Java implementation works? or am I missing
   something (as HC3.1 and 4 don't use the certificate I load in SSL Manager).
   2. How can I use this certificate in non gui mode? as it asks for the
   pass phrase of the p12 file.
   3. How can I use multiple certificates? as I wanna simulate different
   users using the system.


Best Regards,
Shmuel.
pmd
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using SSL authentication certificates

pmd
Hello,
Did you look at keystore config élément ?
It triés to explain the whole process.

regards
Philippe

http://www.ubik-ingenierie.com
On Thursday, June 7, 2012, Shmuel Krakower wrote:

> Hi Community,
> I am trying to use private certificate to authenticate my HTTPS requests.
>
>
>   1. I've exported my certificate from windows MMC certificates manager to
>   PFX file, renamed it to p12.
>   2. Opened my jmeter scripts - changed relevant http samplers to use the
>   Java implementation.
>   3. Loaded the p12 file with SSL manager.
>   4. It works!
>
>
> I have few questions about it:
>
>   1. Is it documented that only Java implementation works? or am I missing
>   something (as HC3.1 and 4 don't use the certificate I load in SSL
> Manager).

Ni cause it works better with hc31 and hc4

>   2. How can I use this certificate in non gui mode? as it asks for the
>   pass phrase of the p12 file.u

Yes, look at keystore config

>   3. How can I use multiple certificates? as I wanna simulate different
>   users using the system.
>
> Same answer

>
> Best Regards,
> Shmuel.
>


--
Cordialement.
Philippe Mouawad.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using SSL authentication certificates

Shmuel Krakower
Pretty simple :) thanks! I was googling and only found this SSL Manager...
btw why does it still exist? It seems like it cannot do something which the
ketstore config element cannot.
בתאריך 2012 6 7 22:09, מאת "Philippe Mouawad" <[hidden email]>:

> Hello,
> Did you look at keystore config élément ?
> It triés to explain the whole process.
>
> regards
> Philippe
>
> http://www.ubik-ingenierie.com
> On Thursday, June 7, 2012, Shmuel Krakower wrote:
>
> > Hi Community,
> > I am trying to use private certificate to authenticate my HTTPS requests.
> >
> >
> >   1. I've exported my certificate from windows MMC certificates manager
> to
> >   PFX file, renamed it to p12.
> >   2. Opened my jmeter scripts - changed relevant http samplers to use the
> >   Java implementation.
> >   3. Loaded the p12 file with SSL manager.
> >   4. It works!
> >
> >
> > I have few questions about it:
> >
> >   1. Is it documented that only Java implementation works? or am I
> missing
> >   something (as HC3.1 and 4 don't use the certificate I load in SSL
> > Manager).
>
> Ni cause it works better with hc31 and hc4
>
> >   2. How can I use this certificate in non gui mode? as it asks for the
> >   pass phrase of the p12 file.u
>
> Yes, look at keystore config
>
> >   3. How can I use multiple certificates? as I wanna simulate different
> >   users using the system.
> >
> > Same answer
>
> >
> > Best Regards,
> > Shmuel.
> >
>
>
> --
> Cordialement.
> Philippe Mouawad.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using SSL authentication certificates

Flavio Cysne
Shmuel,

google this list archive for SSL Manager or https certificate, it has
already been answered before.

Any way, here we go. I'm using JMeter 2.6 as an example, then https tests
with digital certificates only works with HttpClient 3.1.
As said in JMeter 2.7 changelog, it works with both, HttpClient 3.1 and 4.

SSL Manager can load many certificates at once, and Keystore Configuration
is used to select what certificate(s) to use with its 0-based index.

If you want to do a non-gui test using digital certificates, create a
keystore using the command bellow, edit system.properties and, remove the
comments and configure the keys javax.net.ssl.keyStore
and javax.net.ssl.keyStorePassword to the path where your generated
keystore is (I recommend to create a folder ssl inside JMeter home
directory) and the password used on it, respectively.

keytool -importkeystore -srckeystore certificate.p12 -srcstoretype PKCS12
-srcstorepass <certificate_password> -keystore <keystore_filename>
-storepass <stored_password>

Certificates imported must be imported using the same <stored_password>

If you will use only one certificate there's no need to add a Keystore
Configuration component in your Test Plan.

Hope it helps you.
Flávio Cysne

2012/6/8 Shmuel Krakower <[hidden email]>

> Pretty simple :) thanks! I was googling and only found this SSL Manager...
> btw why does it still exist? It seems like it cannot do something which the
> ketstore config element cannot.
> בתאריך 2012 6 7 22:09, מאת "Philippe Mouawad" <[hidden email]
> >:
>
> > Hello,
> > Did you look at keystore config élément ?
> > It triés to explain the whole process.
> >
> > regards
> > Philippe
> >
> > http://www.ubik-ingenierie.com
> > On Thursday, June 7, 2012, Shmuel Krakower wrote:
> >
> > > Hi Community,
> > > I am trying to use private certificate to authenticate my HTTPS
> requests.
> > >
> > >
> > >   1. I've exported my certificate from windows MMC certificates manager
> > to
> > >   PFX file, renamed it to p12.
> > >   2. Opened my jmeter scripts - changed relevant http samplers to use
> the
> > >   Java implementation.
> > >   3. Loaded the p12 file with SSL manager.
> > >   4. It works!
> > >
> > >
> > > I have few questions about it:
> > >
> > >   1. Is it documented that only Java implementation works? or am I
> > missing
> > >   something (as HC3.1 and 4 don't use the certificate I load in SSL
> > > Manager).
> >
> > Ni cause it works better with hc31 and hc4
> >
> > >   2. How can I use this certificate in non gui mode? as it asks for the
> > >   pass phrase of the p12 file.u
> >
> > Yes, look at keystore config
> >
> > >   3. How can I use multiple certificates? as I wanna simulate different
> > >   users using the system.
> > >
> > > Same answer
> >
> > >
> > > Best Regards,
> > > Shmuel.
> > >
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using SSL authentication certificates

Shmuel Krakower
I love this community. Thank you guys!
בתאריך 2012 6 8 14:21, מאת "Flavio Cysne" <[hidden email]>:

> Shmuel,
>
> google this list archive for SSL Manager or https certificate, it has
> already been answered before.
>
> Any way, here we go. I'm using JMeter 2.6 as an example, then https tests
> with digital certificates only works with HttpClient 3.1.
> As said in JMeter 2.7 changelog, it works with both, HttpClient 3.1 and 4.
>
> SSL Manager can load many certificates at once, and Keystore Configuration
> is used to select what certificate(s) to use with its 0-based index.
>
> If you want to do a non-gui test using digital certificates, create a
> keystore using the command bellow, edit system.properties and, remove the
> comments and configure the keys javax.net.ssl.keyStore
> and javax.net.ssl.keyStorePassword to the path where your generated
> keystore is (I recommend to create a folder ssl inside JMeter home
> directory) and the password used on it, respectively.
>
> keytool -importkeystore -srckeystore certificate.p12 -srcstoretype PKCS12
> -srcstorepass <certificate_password> -keystore <keystore_filename>
> -storepass <stored_password>
>
> Certificates imported must be imported using the same <stored_password>
>
> If you will use only one certificate there's no need to add a Keystore
> Configuration component in your Test Plan.
>
> Hope it helps you.
> Flávio Cysne
>
> 2012/6/8 Shmuel Krakower <[hidden email]>
>
> > Pretty simple :) thanks! I was googling and only found this SSL
> Manager...
> > btw why does it still exist? It seems like it cannot do something which
> the
> > ketstore config element cannot.
> > בתאריך 2012 6 7 22:09, מאת "Philippe Mouawad" <
> [hidden email]
> > >:
> >
> > > Hello,
> > > Did you look at keystore config élément ?
> > > It triés to explain the whole process.
> > >
> > > regards
> > > Philippe
> > >
> > > http://www.ubik-ingenierie.com
> > > On Thursday, June 7, 2012, Shmuel Krakower wrote:
> > >
> > > > Hi Community,
> > > > I am trying to use private certificate to authenticate my HTTPS
> > requests.
> > > >
> > > >
> > > >   1. I've exported my certificate from windows MMC certificates
> manager
> > > to
> > > >   PFX file, renamed it to p12.
> > > >   2. Opened my jmeter scripts - changed relevant http samplers to use
> > the
> > > >   Java implementation.
> > > >   3. Loaded the p12 file with SSL manager.
> > > >   4. It works!
> > > >
> > > >
> > > > I have few questions about it:
> > > >
> > > >   1. Is it documented that only Java implementation works? or am I
> > > missing
> > > >   something (as HC3.1 and 4 don't use the certificate I load in SSL
> > > > Manager).
> > >
> > > Ni cause it works better with hc31 and hc4
> > >
> > > >   2. How can I use this certificate in non gui mode? as it asks for
> the
> > > >   pass phrase of the p12 file.u
> > >
> > > Yes, look at keystore config
> > >
> > > >   3. How can I use multiple certificates? as I wanna simulate
> different
> > > >   users using the system.
> > > >
> > > > Same answer
> > >
> > > >
> > > > Best Regards,
> > > > Shmuel.
> > > >
> > >
> > >
> > > --
> > > Cordialement.
> > > Philippe Mouawad.
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using SSL authentication certificates

victor
This post has NOT been accepted by the mailing list yet.
I followed below approach and it works for me
1) Runt the command :  keytool -importkeystore -srckeystore  MT_perf2013.p12  -srcstoretype PKCS12 -srcstorepass mtcert -keystore keystore1.jks -storepass mtcert
Note : MT_perf2013.p12   is your existing certificate and keystore1.jks is new keystore

2) \jmeter-2.8-enhancedV1.0\bin\ system.properties and add the below lines
You need to give actual  path  for your keystore1.jks   as I placed it in jmeter-2.8-enhancedV1.0\bin , I gave only name
javax.net.ssl.keyStore=keystore1.jks  ( give the phisical path)
#
#The password to your keystore
javax.net.ssl.keyStorePassword=mtcert
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using SSL authentication certificates

majicas
This post has NOT been accepted by the mailing list yet.
Sorry for the question again.  I have a P12 certificate that is given to me with a password. How can I use this existing certificate in Jmeter? Can you please give me a step by step instructions so I can set the certificate in Jmeter.  Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using SSL authentication certificates

glinius@live.com
This post has NOT been accepted by the mailing list yet.
Add the following lines to system.properties file:

javax.net.ssl.keyStoreType=pkcs12
javax.net.ssl.keyStore=/path/to/your/certificate.p12
javax.net.ssl.keyStorePassword=your certificate password
Restart JMeter to pick the property up. That's it.

See How to Set Your JMeter Load Test to Use Client Side Certificates for more detailed explanation.
Loading...