class CertificateConfigurer {

    public void configure(ConfigurerParameters parameters)
    {
        CertificateConfiguration certConfig = getCertConfig(parameters);

        if (certConfig != null && certConfig.isUseCertificate())
        {
            HttpClient client = parameters.getClient();

            SslConfig sslConfig = client.getOptions().getSslConfig();

            sslConfig.getCustomKeyManagers().addAll(certConfig.getKeyManagers());
            sslConfig.getCustomTrustManagers().addAll(certConfig.getTrustManagers());
            sslConfig.setHostNameVerifier(new LenientHostNameVerifier());
        }
    }

}