Package io.karatelabs.core
Class SslConfig
java.lang.Object
io.karatelabs.core.SslConfig
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SslConfigCreate an SslConfig from a map (for karate.configure('ssl', {...})).booleanbooleanvoidsetAlgorithm(String algorithm) voidsetCertPath(String certPath) voidsetClientAuth(boolean clientAuth) voidsetKeyPath(String keyPath) voidsetKeyStore(String keyStore) voidsetKeyStorePassword(String keyStorePassword) voidsetKeyStoreType(String keyStoreType) voidsetTrustAll(boolean trustAll) voidsetTrustStore(String trustStore) voidsetTrustStorePassword(String trustStorePassword) voidsetTrustStorePath(String trustStorePath) voidsetTrustStoreType(String trustStoreType) static SslConfigtrustAll()Create a trust-all configuration (for self-signed certificates).
-
Constructor Details
-
SslConfig
public SslConfig()
-
-
Method Details
-
trustAll
Create a trust-all configuration (for self-signed certificates). -
fromMap
Create an SslConfig from a map (for karate.configure('ssl', {...})). -
isTrustAll
public boolean isTrustAll() -
setTrustAll
public void setTrustAll(boolean trustAll) -
getTrustStore
-
setTrustStore
-
getTrustStorePassword
-
setTrustStorePassword
-
getTrustStoreType
-
setTrustStoreType
-
getKeyStore
-
setKeyStore
-
getKeyStorePassword
-
setKeyStorePassword
-
getKeyStoreType
-
setKeyStoreType
-
getAlgorithm
-
setAlgorithm
-
getCertPath
-
setCertPath
-
getKeyPath
-
setKeyPath
-
isClientAuth
public boolean isClientAuth() -
setClientAuth
public void setClientAuth(boolean clientAuth) -
getTrustStorePath
-
setTrustStorePath
-