Example usage for org.apache.commons.ssl TrustMaterial TrustMaterial

List of usage examples for org.apache.commons.ssl TrustMaterial TrustMaterial

Introduction

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

Prototype

public TrustMaterial(byte[] jks, char[] password) throws GeneralSecurityException, IOException 

Source Link

Usage

From source file:com.eviware.loadui.impl.messaging.socket.SocketMessageEndpointProvider.java

public SocketMessageEndpointProvider() throws IOException, GeneralSecurityException {
    client = new SSLClient();

    client.addTrustMaterial(new TrustMaterial(System.getProperty(LoadUI.TRUST_STORE),
            System.getProperty(LoadUI.TRUST_STORE_PASSWORD).toCharArray()));

    client.setCheckHostname(false); // default setting is "true" for SSLClient
    client.setCheckCRL(false); // default setting is "true" for SSLClient

    client.setKeyMaterial(new KeyMaterial(System.getProperty(LoadUI.KEY_STORE),
            System.getProperty(LoadUI.KEY_STORE_PASSWORD).toCharArray()));
}