You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by rmiller <ro...@cobancorporation.com> on 2007/06/09 01:50:16 UTC

JMeter not loading SSL certs

I've been unable to log into secure sites using JMeter. I've downloaded the
SSL certificates from the sites I'm trying to reach and imported them into
CACERTS. I configured the properties to read the CACERTS file but
consistently get this exception: "jmeter.util.SSLManager: Couldn't load
keystore java.lang.Exception: No key found."

To verify that my certs were actually getting loaded I modified
jmeter.util.keystore.DefaultKeyStore (in rel-2-2) to log the alias names as
it was iterating through the keystore aliases and found my aliases are
there. Next I checked to see if the following line, "if
(store.isKeyEntry(alias))," is returning true and found that in all cases,
including all the certs that come with Java, it returns false; thus the _key
value is null and the above exception gets thrown. 

In researching this problem I found a large number of entries on the lists
with the same problem, but it seems that no one has found a solution. I'm
new to JMeter and this is my first peak at the code, so I'm not sure where
to go from here. Can anyone please advise. 

Thanks,
Ron
-- 
View this message in context: http://www.nabble.com/JMeter-not-loading-SSL-certs-tf3892688.html#a11035708
Sent from the JMeter - Dev mailing list archive at Nabble.com.


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


Re: JMeter not loading SSL certs

Posted by sebb <se...@gmail.com>.
On 12/06/07, sebb <se...@gmail.com> wrote:
> On 12/06/07, rmiller <ro...@cobancorporation.com> wrote:
> >
> > I don't know where they are getting loaded (not DefaultKeyStore), but I used
> > this on the command line to discover that the certs were actually getting
> > loaded:
> > -Djavax.net.debug=ssl:keymanager. It's very useful to get lots of
> > information about SSL connections. I found the documentation at
> > http://java.sun.com/j2se/1.5.0/docs/guide/security/jsse/JSSERefGuide.html#Debug.
>
> It's mentioned in the system.properties file, but it should probably
> be mentioned in the HTTP Sampler description too.
>
> > It led me to look more closely at my Recording Controller and it turns out
> > that I was getting redirects on the login page and all I had to do was
> > checkmark "Follow Redirects" in the sampler(s) to get it to work.
>
> Glad it's working.
>
> > Question: why would one not want to follow redirects?
>
> Because they want to see what is happening in detail?
>
> > Why is "Follow Redirects" not checkmarked by default?
>
> History probably.
>
> "Redirect automatically" would probably be a better default.
> I'll probably change it.

I've now committed that to SVN.

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


Re: JMeter not loading SSL certs

Posted by sebb <se...@gmail.com>.
On 12/06/07, rmiller <ro...@cobancorporation.com> wrote:
>
> I don't know where they are getting loaded (not DefaultKeyStore), but I used
> this on the command line to discover that the certs were actually getting
> loaded:
> -Djavax.net.debug=ssl:keymanager. It's very useful to get lots of
> information about SSL connections. I found the documentation at
> http://java.sun.com/j2se/1.5.0/docs/guide/security/jsse/JSSERefGuide.html#Debug.

It's mentioned in the system.properties file, but it should probably
be mentioned in the HTTP Sampler description too.

> It led me to look more closely at my Recording Controller and it turns out
> that I was getting redirects on the login page and all I had to do was
> checkmark "Follow Redirects" in the sampler(s) to get it to work.

Glad it's working.

> Question: why would one not want to follow redirects?

Because they want to see what is happening in detail?

> Why is "Follow Redirects" not checkmarked by default?

History probably.

"Redirect automatically" would probably be a better default.
I'll probably change it.

> Thanks,
> Ron
>
>
> rmiller wrote:
> >
> > I've been unable to log into secure sites using JMeter. I've downloaded
> > the SSL certificates from the sites I'm trying to reach and imported them
> > into CACERTS. I configured the properties to read the CACERTS file but
> > consistently get this exception: "jmeter.util.SSLManager: Couldn't load
> > keystore java.lang.Exception: No key found."
> >
> > To verify that my certs were actually getting loaded I modified
> > jmeter.util.keystore.DefaultKeyStore (in rel-2-2) to log the alias names
> > as it was iterating through the keystore aliases and found my aliases are
> > there. Next I checked to see if the following line, "if
> > (store.isKeyEntry(alias))," is returning true and found that in all cases,
> > including all the certs that come with Java, it returns false; thus the
> > _key value is null and the above exception gets thrown.
> >
> > In researching this problem I found a large number of entries on the lists
> > with the same problem, but it seems that no one has found a solution. I'm
> > new to JMeter and this is my first peak at the code, so I'm not sure where
> > to go from here. Can anyone please advise.
> >
> > Thanks,
> > Ron
> >
>
> --
> View this message in context: http://www.nabble.com/JMeter-not-loading-SSL-certs-tf3892688.html#a11073020
> Sent from the JMeter - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>

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


Re: JMeter not loading SSL certs

Posted by rmiller <ro...@cobancorporation.com>.
I don't know where they are getting loaded (not DefaultKeyStore), but I used
this on the command line to discover that the certs were actually getting
loaded: 
-Djavax.net.debug=ssl:keymanager. It's very useful to get lots of
information about SSL connections. I found the documentation at
http://java.sun.com/j2se/1.5.0/docs/guide/security/jsse/JSSERefGuide.html#Debug.

It led me to look more closely at my Recording Controller and it turns out
that I was getting redirects on the login page and all I had to do was
checkmark "Follow Redirects" in the sampler(s) to get it to work.

Question: why would one not want to follow redirects? Why is "Follow
Redirects" not checkmarked by default?

Thanks,
Ron


rmiller wrote:
> 
> I've been unable to log into secure sites using JMeter. I've downloaded
> the SSL certificates from the sites I'm trying to reach and imported them
> into CACERTS. I configured the properties to read the CACERTS file but
> consistently get this exception: "jmeter.util.SSLManager: Couldn't load
> keystore java.lang.Exception: No key found."
> 
> To verify that my certs were actually getting loaded I modified
> jmeter.util.keystore.DefaultKeyStore (in rel-2-2) to log the alias names
> as it was iterating through the keystore aliases and found my aliases are
> there. Next I checked to see if the following line, "if
> (store.isKeyEntry(alias))," is returning true and found that in all cases,
> including all the certs that come with Java, it returns false; thus the
> _key value is null and the above exception gets thrown. 
> 
> In researching this problem I found a large number of entries on the lists
> with the same problem, but it seems that no one has found a solution. I'm
> new to JMeter and this is my first peak at the code, so I'm not sure where
> to go from here. Can anyone please advise. 
> 
> Thanks,
> Ron
> 

-- 
View this message in context: http://www.nabble.com/JMeter-not-loading-SSL-certs-tf3892688.html#a11073020
Sent from the JMeter - Dev mailing list archive at Nabble.com.


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