Java 8 SSLParameters - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 SSLParameters class.

This code example shows how to use the following methods:getCipherSuites, getProtocols
This code example shows how to use the following methods:getCipherSuites, getNeedClientAuth, getProtocols, getWantClientAuth
        assertFalse(p.getNeedClientAuth());
    } 
 
    public void test_SSLParameters_cipherSuitesConstructor() { 
        String[] cipherSuites = new String[] { "foo", null, "bar" };
        SSLParameters p = new SSLParameters(cipherSuites);
        assertNotNull(p.getCipherSuites());
        assertNotSame(cipherSuites, p.getCipherSuites());
        assertEquals(Arrays.asList(cipherSuites), Arrays.asList(p.getCipherSuites()));
        assertNull(p.getProtocols());
        assertFalse(p.getWantClientAuth());
        assertFalse(p.getNeedClientAuth());
    } 
 
    public void test_SSLParameters_cpherSuitesProtocolsConstructor() { 
        String[] cipherSuites = new String[] { "foo", null, "bar" };
        String[] protocols = new String[] { "baz", null, "qux" };
        SSLParameters p = new SSLParameters(cipherSuites, protocols);
        assertNotNull(p.getCipherSuites());
        assertNotNull(p.getProtocols());
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setCipherSuites, setNeedClientAuth, setProtocols, setWantClientAuth, setEndpointIdentificationAlgorithm
    { 
        if (LOG.isDebugEnabled())
            LOG.debug("Customize {}",sslEngine);
 
        SSLParameters sslParams = sslEngine.getSSLParameters();
        sslParams.setEndpointIdentificationAlgorithm(_endpointIdentificationAlgorithm);
        sslParams.setUseCipherSuitesOrder(_useCipherSuitesOrder);
        if (!_certHosts.isEmpty() || !_certWilds.isEmpty())
        { 
            if (LOG.isDebugEnabled())
                LOG.debug("Enable SNI matching {}",sslEngine);
            sslParams.setSNIMatchers(Collections.singletonList((SNIMatcher)new AliasSNIMatcher()));
        } 
        sslParams.setCipherSuites(_selectedCipherSuites);
        sslParams.setProtocols(_selectedProtocols);
 
        if (getWantClientAuth()) 
            sslParams.setWantClientAuth(true);
        if (getNeedClientAuth()) 
            sslParams.setNeedClientAuth(true);

5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 SSLParameters Methods: