Search in sources :

Example 1 with DefaultCasSslContext

use of org.apereo.cas.authentication.DefaultCasSslContext in project cas by apereo.

the class TrustedProxyAuthenticationTrustStoreSslSocketFactoryTests method prepareHttpClient.

@Before
public void prepareHttpClient() throws Exception {
    final SimpleHttpClientFactoryBean clientFactory = new SimpleHttpClientFactoryBean();
    clientFactory.setSslSocketFactory(new SSLConnectionSocketFactory(new DefaultCasSslContext(TRUST_STORE, TRUST_STORE_PSW, KeyStore.getDefaultType()).getSslContext()));
    this.client = clientFactory.getObject();
}
Also used : SimpleHttpClientFactoryBean(org.apereo.cas.util.http.SimpleHttpClientFactoryBean) DefaultCasSslContext(org.apereo.cas.authentication.DefaultCasSslContext) SSLConnectionSocketFactory(org.apache.http.conn.ssl.SSLConnectionSocketFactory) Before(org.junit.Before)

Aggregations

SSLConnectionSocketFactory (org.apache.http.conn.ssl.SSLConnectionSocketFactory)1 DefaultCasSslContext (org.apereo.cas.authentication.DefaultCasSslContext)1 SimpleHttpClientFactoryBean (org.apereo.cas.util.http.SimpleHttpClientFactoryBean)1 Before (org.junit.Before)1