cancel
Showing results for 
Search instead for 
Did you mean: 

SSL Client Certificates from command line?

Highlighted
Contributor

SSL Client Certificates from command line?

Ole,

How do we get SSL client certificates working from command line? I am aware of the setup required and it all works fine via GUI. However when I run the same test case using testrunner.sh at command line the request does not work. It gives me the auth error. Is there anything we can do to make test case keystore aware at command line?

thanks,
Sachin
5 REPLIES 5
Highlighted

Re: SSL Client Certificates from command line?

Hi!

The global SSL Settings are saved in the soapui-settings.xml file, thus you need to specify this file with the -t option.

regards!

/Ole
eviware.com


 Join the virtual SmartBear Connect user conference on April 27-28! Get your free virtual ticket today!
Highlighted
Contributor

Re: SSL Client Certificates from command line?

Thanks, Ole. I used soapui-settings file and that works fine. However, I was wondering if there is anyway to give cert related properties right in command line. See the problem with soapui-settings file is that it takes absolute path of the cert file. In soapUI project I can give relative path with respect to the soapUI program so if I say "ext/certfile" it picks it up from bin/ext directory in soapUI project xml but that does not work with soapui-settings xml

on another note, I have a new post on soapUI tips and tricks, hope you and others find it useful: http://onebyteatatime.wordpress.com/200 ... ks-part-1/


-Sachin
Highlighted

Re: SSL Client Certificates from command line?

Hi Sachin,

thanks for the great post!

Regarding this issue, you could try the following instead:
1) Remove the keystore from the global ssl settings and add it to your projects WS-Security configuration under the keystores/certificate tab instead. Here you can use a relative path or properties as desired (relative paths will be resolved relative to the project ResourceRoot value)
2) Select this entry in your requests' "keystore" property (in the bottom left properties-table)

Now the keystore settings is stored in your project file instead, so you can skip the -t argument on the command-line.

Does that help?

regards!

/Ole
eviware.com


 Join the virtual SmartBear Connect user conference on April 27-28! Get your free virtual ticket today!
Highlighted
Contributor

Re: SSL Client Certificates from command line?

hmm, interesting. I actually tried that but somehow when I execute a test-case ( that points to the keystore from table properties on left hand side bottom as you specified ) from command line, testrunner is somehow unaware of this test-case having tied to the keystore. Have you guys tried such a test-case from command line? Just curious as this did not work for me.

I shall nevertheless, follow exact steps as you outlined and give it a try again.

Regards,
Sachin
Highlighted

Re: SSL Client Certificates from command line?

Hi Sachin,

ok.. please let us know how it goes so we can resolve this for you.

regards,

/Ole
eviware.com


 Join the virtual SmartBear Connect user conference on April 27-28! Get your free virtual ticket today!