package com.l7tech.server.tomcat;

import com.l7tech.server.transport.tls.SsgConnectorSslHelper;
import java.security.NoSuchAlgorithmException;
import java.util.List;
import javax.net.ssl.KeyManager;
import javax.net.ssl.TrustManager;
import org.apache.tomcat.util.net.SSLContext;
import org.apache.tomcat.util.net.SSLHostConfigCertificate;
import org.apache.tomcat.util.net.jsse.JSSEUtil;

public class SsgJSSEUtil extends JSSEUtil {
   private final SsgConnectorSslHelper a;

   public SsgJSSEUtil(SSLHostConfigCertificate var1, SsgConnectorSslHelper var2) {
      super(var1, false);
      this.a = var2;
   }

   public SSLContext createSSLContextInternal(List<String> var1) throws NoSuchAlgorithmException {
      return SsgJSSESSLContext.createInstance(this.sslHostConfig.getSslProtocol(), this.a.getSslContext().getProvider());
   }

   public KeyManager[] getKeyManagers() throws Exception {
      return this.a.getKeyManagers();
   }

   public TrustManager[] getTrustManagers() throws Exception {
      return this.a.getTrustManagers();
   }

   public String[] getEnabledProtocols() throws IllegalArgumentException {
      return this.a.getEnabledProtocols();
   }

   public String[] getEnabledCiphers() throws IllegalArgumentException {
      return this.a.getEnabledCiphers();
   }
}
