Example usage for org.apache.commons.ssl HostnameVerifier STRICT

List of usage examples for org.apache.commons.ssl HostnameVerifier STRICT

Introduction

In this page you can find the example usage for org.apache.commons.ssl HostnameVerifier STRICT.

Prototype

HostnameVerifier STRICT

To view the source code for org.apache.commons.ssl HostnameVerifier STRICT.

Click Source Link

Document

The STRICT HostnameVerifier works the same way as java.net.URL in Sun Java 1.4, Sun Java 5, Sun Java 6.

Usage

From source file:com.dtolabs.rundeck.jetty.jaas.HostnameVerifyingTrustManager.java

public HostnameVerifyingTrustManager(TrustManager trustManager) {
    if (!(trustManager instanceof X509TrustManager)) {
        throw new IllegalArgumentException(String.format(
                "Expected trustManager to be of type X509TrustManager but was [%s]", trustManager.getClass()));
    }/* w  w w  .  ja va  2s .  c om*/
    this.verifier = HostnameVerifier.STRICT;
    this.realTrustManager = (X509TrustManager) trustManager;
}

From source file:org.springframework.security.saml.context.SAMLContextProviderImplTest.java

@Test
public void testPopulateLocalEntityAliasNoRole() throws Exception {
    setLocalContextParameters(request, "/SSO/alias/myAlias", null);
    replayMock();/*from   w ww .  j a  v  a  2s.  com*/
    SAMLMessageContext context = contextProvider.getLocalEntity(request, response);
    assertEquals("testSP2", context.getLocalEntityId());
    assertEquals(SPSSODescriptor.DEFAULT_ELEMENT_NAME, context.getLocalEntityRole());
    assertEquals(context.getLocalSSLHostnameVerifier(), HostnameVerifier.STRICT);
    verifyMock();
}