Forum Discussion

Sachin_Sawe__Pr's avatar
Sachin_Sawe__Pr
Contributor
16 years ago

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

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    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
  • 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
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    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
  • 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
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Sachin,

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

    regards,

    /Ole
    eviware.com