package com.l7tech.identity.cert;

import com.l7tech.identity.User;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.ObjectNotFoundException;
import com.l7tech.objectmodel.UpdateException;
import java.math.BigInteger;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
import java.util.List;
import javax.security.auth.x500.X500Principal;

public interface ClientCertManager {
   boolean userCanGenCert(User var1, Certificate var2) throws FindException;

   boolean isCertPossiblyStale(X509Certificate var1);

   void recordNewUserCert(User var1, Certificate var2, boolean var3) throws UpdateException;

   Certificate getUserCert(User var1) throws FindException;

   void revokeUserCert(User var1) throws UpdateException, ObjectNotFoundException;

   boolean revokeUserCertIfIssuerMatches(User var1, X500Principal var2) throws UpdateException, ObjectNotFoundException;

   void forbidCertReset(User var1) throws UpdateException;

   List<CertEntryRow> findByThumbprint(String var1) throws FindException;

   List<CertEntryRow> findBySki(String var1) throws FindException;

   List<CertEntryRow> findByIssuerAndSerial(X500Principal var1, BigInteger var2) throws FindException;

   List<CertEntryRow> findBySubjectDn(X500Principal var1) throws FindException;

   List<ClientCertManager.CertInfo> findAll() throws FindException;

   interface CertInfo {
      Goid getProviderId();

      String getUserId();

      String getLogin();
   }

   class VetoSave extends Exception {
      static final long serialVersionUID = 6183449469568025338L;

      public VetoSave() {
      }

      public VetoSave(String var1) {
         super(var1);
      }

      public VetoSave(String var1, Throwable var2) {
         super(var1, var2);
      }

      public VetoSave(Throwable var1) {
         super(var1);
      }
   }
}
