[Webtest] Grails, WebTest, and HTTPS

David C. Hicks David C. Hicks" <dhicks@i-hicks.org
Mon, 04 Aug 2008 18:14:39 -0400

Hi folks,

I've been trying for several days with no luck to get this to work.  
I've searched all over for references, but every one seems to be 
different than the others.  None of them appear to work.  I must be 
doing something wrong, or not doing something right.  Here's what I 
*have* done:

1) Save the certificate from a running HTTPS Grails web application.
2) Import that certificate into a trusted keystore using keytool.
3) Place the trusted keystore in "webtest/keystore/trust.keystore".
4) Modify webtest.properties and add the following lines:

webtest.connectioninitializer = 
webtest.truststore.file = webtest/keystore/trust.keystore
webtest.truststore.passphrase = webtest

5) Modified the port and protocol to 8443 and https in webtest.properties.

When I run webtest, I get an SSL exception caused by:

Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

So, can anyone tell me what the secret sauce to make this work really is?