Forum Discussion

anallagundla's avatar
13 years ago

Load SSL certificates for different environments in settings

HI /Ole

We have different environments with different SSL certificates but with same password. Now we want to have a central groovy script library which holds all the SSL certificates in one file/folder, may be in one soapui-settings file

Is it possible? or is there a way i can write some script to hold all certificates at one place?

Right now we change <con:setting id="SSLSettings@keyStore">.\CP-Gateway\Groovy\stg-g\stg_all.p12</con:setting> for each environment, can i just put path for all certificates in one soapui-settings file?

Let me know if there is any work around you can provide me with this


5 Replies

  • SmartBear_Suppo's avatar
    SmartBear Alumni (Retired)

    you can use the new environments feature in 4.5 to switch between certificates for different environments - the process is as follows:

    1) add all your keystores containing the different certs to the WS-Security tab in your project (under Keystores)
    2) define a custom project property containing the name of the default keystore to use
    3) set the SSL Keystore property (in the bottom left table of properties) of all requests that should use this certificate to ${#Project#<nameofproperty>}
    4) add environments in the project windows Environments tab and override the property value with the keystore names of those to use in the corresponding environment

    Now when you switch between the available environments your requests will use that environments specific keystore/certificate.

    Hope that makes sense :-)


    SmartBear Software
  • Hi /Ole

    I tried out as you instructed but I got back error SSL Peer Unverified

    adult image hosting

    jpg image hosting

    Error Logs

    Fri Mar 23 15:54:02 PDT peer not authenticated peer not authenticated
    at Source)
    at org.apache.http.conn.ssl.AbstractVerifier.verify(
    at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(
    at org.apache.http.impl.client.DefaultRequestDirector.execute(
    at org.apache.http.impl.client.AbstractHttpClient.execute(
    at org.apache.http.impl.client.AbstractHttpClient.execute(
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(
    at java.util.concurrent.Executors$ Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$ Source)
    at Source)

    Let me know if am doing something wrong

  • I though i can try try this in soapui 4.0.0

    I just need to know if I can select Global Project property to SSLKeystore present in the REST step, something like this ${#Project#...

    image host

    Am not able to edit SSLKeystore property in REST Step, is it possible to edit or pull project property?

    image hosting jpg

    Please let me know

    • deejmore's avatar
      New Contributor



      I wonder if this is possible for REST Services, for Ready API 1.5/1.7 I cannot type on the property "SSL Keystore" it is only a select list.  When will this feature be added?


      Best regards,



    • Luffy's avatar
      Occasional Contributor

      SSL Keystore aint a property to set, so it wont work that way.
      Below has worked for me.


      import com.eviware.soapui.settings.SSLSettings
      import com.eviware.soapui.SoapUI 
      SoapUI.settings.setString( SSLSettings.KEYSTORE, pathToKeystore )
      SoapUI.settings.setString( SSLSettings.KEYSTORE_PASSWORD, keystorePassword )
      def KeyStore  = SoapUI.settings.getString( SSLSettings.KEYSTORE, "SSL KeyStore is not stored, Please set it" )
      testRunner.testCase.getTestStepByName('StateDetails').setPropertyValue("SSLKeystore", "$KeyStore")



      You like the reply. How to give a Kudos / Accept as solution?