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.SSLServerSocket; 017 018/** 019 * An {@link SSLConfigurable} wrapper for an {@link SSLServerSocket}. 020 * 021 * @author Carl Harris 022 * @author Bruno Harbulot 023 */ 024public class SSLConfigurableServerSocket implements SSLConfigurable { 025 026 private final SSLServerSocket delegate; 027 028 public SSLConfigurableServerSocket(SSLServerSocket delegate) { 029 this.delegate = delegate; 030 } 031 032 public String[] getDefaultProtocols() { 033 return delegate.getEnabledProtocols(); 034 } 035 036 public String[] getSupportedProtocols() { 037 return delegate.getSupportedProtocols(); 038 } 039 040 public void setEnabledProtocols(String[] protocols) { 041 delegate.setEnabledProtocols(protocols); 042 } 043 044 public String[] getDefaultCipherSuites() { 045 return delegate.getEnabledCipherSuites(); 046 } 047 048 public String[] getSupportedCipherSuites() { 049 return delegate.getSupportedCipherSuites(); 050 } 051 052 public void setEnabledCipherSuites(String[] suites) { 053 delegate.setEnabledCipherSuites(suites); 054 } 055 056 public void setNeedClientAuth(boolean state) { 057 delegate.setNeedClientAuth(state); 058 } 059 060 public void setWantClientAuth(boolean state) { 061 delegate.setWantClientAuth(state); 062 } 063 064 @Override 065 public void setHostnameVerification(boolean verifyHostname) { 066 // This is not relevant for a server socket 067 } 068 069}