001/**
002 * Logback: the reliable, generic, fast and flexible logging framework.
003 * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
004 *
005 * This program and the accompanying materials are dual-licensed under
006 * either the terms of the Eclipse Public License v1.0 as published by
007 * the Eclipse Foundation
008 *
009 *   or (per the licensee's choosing)
010 *
011 * under the terms of the GNU Lesser General Public License version 2.1
012 * as published by the Free Software Foundation.
013 */
014package ch.qos.logback.core.net.ssl;
015
016import javax.net.ssl.SSLContext;
017
018/**
019 * A configuration for an {@link SSLContext}.
020 * <p>
021 *
022 * @author Carl Harris
023 */
024public class SSLConfiguration extends SSLContextFactoryBean {
025
026    private SSLParametersConfiguration parameters;
027
028    /**
029     * Gets the SSL parameters configuration.
030     * 
031     * @return parameters configuration; if no parameters object was configured, a
032     *         default parameters object is returned
033     */
034    public SSLParametersConfiguration getParameters() {
035        if (parameters == null) {
036            parameters = new SSLParametersConfiguration();
037        }
038        return parameters;
039    }
040
041    /**
042     * Sets the SSL parameters configuration.
043     * 
044     * @param parameters the parameters configuration to set
045     */
046    public void setParameters(SSLParametersConfiguration parameters) {
047        this.parameters = parameters;
048    }
049
050}