rest-assured/src/main/java/io/restassured/internal/http/AuthConfig.java
public void certificate(Object keyStorePath, String keyStorePassword, String keyStoreType, KeyStore keyStore,
                            Object trustStorePath, String trustStorePassword, String trustStoreType, KeyStore trustStore,
                            int port, X509HostnameVerifier hostnameVerifier, SSLSocketFactory sslConnectionSocketFactory) {
        TrustAndKeystoreSpecImpl spec = new TrustAndKeystoreSpecImpl();
        URI uri = ((URIBuilder) builder.getUri()).toURI();
        if (uri == null) throw new IllegalStateException("a default URI must be set");
        spec.setKeyStoreType(keyStoreType);
        spec.setKeyStorePassword(keyStorePassword);
        spec.setKeyStorePath(keyStorePath);
        spec.setKeyStore(keyStore);
        spec.setTrustStoreType(trustStoreType);
        spec.setTrustStorePassword(trustStorePassword);
        spec.setTrustStorePath(trustStorePath);
        spec.setTrustStore(trustStore);
        spec.setPort(port);
        spec.setX509HostnameVerifier(hostnameVerifier);
        spec.setFactory(sslConnectionSocketFactory);

        int portSpecifiedInUri = uri.getPort();
        spec.apply(builder, portSpecifiedInUri == UNDEFINED_PORT ? DEFAULT_HTTPS_PORT : portSpecifiedInUri);
    }
public void certificate(Object keyStorePath, String keyStorePassword, String keyStoreType, KeyStore keyStore,
                            Object trustStorePath, String trustStorePassword, String trustStoreType, KeyStore trustStore,
                            int port, X509HostnameVerifier hostnameVerifier, SSLSocketFactory sslConnectionSocketFactory) {
        TrustAndKeystoreSpecImpl spec = new TrustAndKeystoreSpecImpl();
        URI uri = ((URIBuilder) builder.getUri()).toURI();
        if (uri == null) throw new IllegalStateException("a default URI must be set");
        spec.setKeyStoreType(keyStoreType);
        spec.setKeyStorePassword(keyStorePassword);
        spec.setKeyStorePath(keyStorePath);
        spec.setKeyStore(keyStore);
        spec.setTrustStoreType(trustStoreType);
        spec.setTrustStorePassword(trustStorePassword);
        spec.setTrustStorePath(trustStorePath);
        spec.setTrustStore(trustStore);
        spec.setPort(port);
        spec.setX509HostnameVerifier(hostnameVerifier);
        spec.setFactory(sslConnectionSocketFactory);

        int portSpecifiedInUri = uri.getPort();
        spec.apply(builder, portSpecifiedInUri == UNDEFINED_PORT ? DEFAULT_HTTPS_PORT : portSpecifiedInUri);
    }
public void certificate ( Object keyStorePath , String keyStorePassword , String keyStoreType , KeyStore keyStore , Object trustStorePath , String trustStorePassword , String trustStoreType , KeyStore trustStore , int port , X509HostnameVerifier hostnameVerifier , SSLSocketFactory sslConnectionSocketFactory ) { TrustAndKeystoreSpecImpl spec = new TrustAndKeystoreSpecImpl ( ) ; URI uri = ( ( URIBuilder ) builder . getUri ( ) ) . toURI ( ) ; if ( uri == null ) throw new IllegalStateException ( "a default URI must be set" ) ; spec . setKeyStoreType ( keyStoreType ) ; spec . setKeyStorePassword ( keyStorePassword ) ; spec . setKeyStorePath ( keyStorePath ) ; spec . setKeyStore ( keyStore ) ; spec . setTrustStoreType ( trustStoreType ) ; spec . setTrustStorePassword ( trustStorePassword ) ; spec . setTrustStorePath ( trustStorePath ) ; spec . setTrustStore ( trustStore ) ; spec . setPort ( port ) ; spec . setX509HostnameVerifier ( hostnameVerifier ) ; spec . setFactory ( sslConnectionSocketFactory ) ; int portSpecifiedInUri = uri . getPort ( ) ; spec . apply ( builder , portSpecifiedInUri == UNDEFINED_PORT ? DEFAULT_HTTPS_PORT : portSpecifiedInUri ) ; }
Sets a certificate to be used for SSL authentication. See {@link Class#getResource(String)} for how to get a URL from a resource
on the classpath.

@param keyStorePath               URL to a JKS keystore where the certificate is stored.
@param keyStorePassword           password to decrypt the keystore
@param keyStoreType               The certificate type
@param keyStore                   The key store
@param trustStorePath             URL to a trust store
@param trustStorePassword         password to decrypt the trust store
@param trustStoreType             The certificate type
@param trustStore                 The trust store
@param port                       The SSL port
@param hostnameVerifier           The X509HostnameVerifier to use
@param sslConnectionSocketFactory The SSLConnectionSocketFactory to use
Sets a certificate to be used for SSL authentication . See { @link Class#getResource ( String ) } for how to get a URL from a resource on the classpath .