Class SslConfig

java.lang.Object
io.karatelabs.core.SslConfig

public class SslConfig extends Object
SSL/TLS configuration for both client and server contexts.

Client configuration (for HTTP client):

  • trustAll - Trust all server certificates (for self-signed)
  • keyStore/keyStorePassword/keyStoreType - Client certificate for mTLS
  • trustStore/trustStorePassword/trustStoreType - Custom trust store

Server configuration (for mock server):

  • certPath - PEM certificate file path
  • keyPath - PEM private key file path
  • clientAuth - Require client certificate (mTLS)
  • Constructor Details

    • SslConfig

      public SslConfig()
  • Method Details

    • trustAll

      public static SslConfig trustAll()
      Create a trust-all configuration (for self-signed certificates).
    • fromMap

      public static SslConfig fromMap(Map<String,Object> map)
      Create an SslConfig from a map (for karate.configure('ssl', {...})).
    • isTrustAll

      public boolean isTrustAll()
    • setTrustAll

      public void setTrustAll(boolean trustAll)
    • getTrustStore

      public String getTrustStore()
    • setTrustStore

      public void setTrustStore(String trustStore)
    • getTrustStorePassword

      public String getTrustStorePassword()
    • setTrustStorePassword

      public void setTrustStorePassword(String trustStorePassword)
    • getTrustStoreType

      public String getTrustStoreType()
    • setTrustStoreType

      public void setTrustStoreType(String trustStoreType)
    • getKeyStore

      public String getKeyStore()
    • setKeyStore

      public void setKeyStore(String keyStore)
    • getKeyStorePassword

      public String getKeyStorePassword()
    • setKeyStorePassword

      public void setKeyStorePassword(String keyStorePassword)
    • getKeyStoreType

      public String getKeyStoreType()
    • setKeyStoreType

      public void setKeyStoreType(String keyStoreType)
    • getAlgorithm

      public String getAlgorithm()
    • setAlgorithm

      public void setAlgorithm(String algorithm)
    • getCertPath

      public String getCertPath()
    • setCertPath

      public void setCertPath(String certPath)
    • getKeyPath

      public String getKeyPath()
    • setKeyPath

      public void setKeyPath(String keyPath)
    • isClientAuth

      public boolean isClientAuth()
    • setClientAuth

      public void setClientAuth(boolean clientAuth)
    • getTrustStorePath

      public String getTrustStorePath()
    • setTrustStorePath

      public void setTrustStorePath(String trustStorePath)