[Webtest] Problems using certificate with Webtest ...

Karel Soupal karels@ework.cz
Wed, 17 Oct 2007 17:43:37 +0200


Hello Arthur,

I am not sure this will help you, but I was also struggling a bit with t=
he  =

certificates and there was one catch that took me long to find out ...

my env was debian etch ... and the trick was that the keystore was  =

supposed to be exactly on this path :  =

/usr/lib/j2sdk1.5-sun/jre/lib/security ....

my properties then look like this:

     <property name=3D"webtest.port" value=3D"443"/>
     <property name=3D"webtest.protocol" value=3D"https" />
     <property name=3D"webtest.truststore.file" value=3D"trusted.keystor=
e" />
     <property name=3D"webtest.truststore.passphrase" value=3D"something=
" />
     <property name=3D"webtest.connectioninitializer"  =

value=3D"com.canoo.webtest.security.SunJsseBaseConnectionInitializer" />=


let me know if this might be of any assistance to you ...

Dne Wed, 17 Oct 2007 14:19:48 +0200 Arthur Neudeck  =

<arthur.neudeck@giniality.com> napsal/-a:

> Hoi ...
>
> we are currently trying to use WebTest in a JEE environment. Having  =

> studied
> several samples, mailing lists and web-sites I do not find a way, how =
to  =

> make
> the whole thing work using certificates.
>
> The reported problem is:
> "java.lang.RuntimeException: Unexpected error:
> java.security.InvalidAlgorithmParameterException: the trustAnchors  =

> parameter
> must be non-empty"
>
> I use the following parameters in teh build.xml:
> <property name=3D"webtest.connectioninitializer"
> value=3D"com.canoo.webtest.security.SunJsseBaseConnectionInitializer" =
/>
> <property name=3D"webtest.truststore.file"
> value=3D"certs/<...snipped...>\trust.keystore" />
> <property name=3D"webtest.truststore.passphrase" value=3D"<...snipped.=
..>" />
>
> The Certificate is already imported into the "trust.keystore" mentione=
d  =

> above.
>
> Using the  =

> "com.canoo.webtest.security.SunJsseClientAuthConnectionInitializer"
> leads to the following problem:
> "Exception raised while trying to create custom ConnectionInitializer
> <com.canoo.webtest.security.SunJsseClientAuthConnectionInitializer> /
> Exception: java.lang.NullPointerException"
> --> It seems as if the class of the custom initializer was not found .=
..
>
> Also I received - playing around with keystore/ truststore settings:
> "Unconnected sockets not implemented"
>
> Where do I get a documentation that might solve my problems?
> What did I do wrong?
>
> Thanx for your help!
> Arthur



-- =

Karel Soupal
http://www.ework.cz
Software Testing Services and Solutions