package com.l7tech.server;

import com.l7tech.gateway.common.security.keystore.SsgKeyEntry;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.util.Pair;
import java.io.IOException;
import java.security.KeyStoreException;
import javax.net.ssl.KeyManager;

public interface DefaultKey {
   SsgKeyEntry getSslInfo() throws IOException;

   SsgKeyEntry getServerSslInfo() throws IOException;

   SsgKeyEntry getClientSslInfo() throws IOException;

   default SsgKeyEntry getLatestSslInfo() throws IOException {
      return this.getSslInfo();
   }

   default SsgKeyEntry getLatestServerSslInfo() throws IOException {
      return this.getServerSslInfo();
   }

   default SsgKeyEntry getLatestClientSslInfo() throws IOException {
      return this.getClientSslInfo();
   }

   SsgKeyEntry getCaInfo();

   SsgKeyEntry getAuditSigningInfo();

   SsgKeyEntry getAuditViewerInfo();

   Pair<Goid, String> getAuditViewerAlias();

   KeyManager[] getSslKeyManagers();

   KeyManager[] getServerSslKeyManagers();

   KeyManager[] getClientSslKeyManagers();

   SsgKeyEntry lookupKeyByKeyAlias(String var1, Goid var2) throws FindException, KeyStoreException, IOException;

   default void addKeyInfoListener(DefaultKey.KeyInfoListener var1) {
   }

   default void removeKeyInfoListener(DefaultKey.KeyInfoListener var1) {
   }

   interface KeyInfoListener {
      void notifyKeyChanged(String var1);
   }
}
