public boolean isAllTokenCertificatesRevoked(String tokensn, String username) throws RemoteException, NamingException, CreateException, AuthorizationDeniedException, FinderException{ Collection certs = hardtokensession.findCertificatesInHardToken(administrator, tokensn);  boolean allrevoked = true;  if(!certs.isEmpty()){ Iterator j = certs.iterator(); while(j.hasNext()){ X509Certificate cert = (X509Certificate) j.next(); RevokedCertInfo revinfo = certificatesession.isRevoked(administrator, CertTools.getIssuerDN(cert), cert.getSerialNumber()); if(revinfo == null || revinfo.getReason()== RevokedCertInfo.NOT_REVOKED) allrevoked = false;
public boolean isAllTokenCertificatesRevoked(String tokensn) { Collection certs = hardtokensession.findCertificatesInHardToken(administrator, tokensn);  boolean allrevoked = true;  if(!certs.isEmpty()){ Iterator j = certs.iterator(); while(j.hasNext()){ X509Certificate cert = (X509Certificate) j.next(); RevokedCertInfo revinfo = certificatesession.isRevoked(administrator, CertTools.getIssuerDN(cert), cert.getSerialNumber()); if(revinfo == null || revinfo.getReason()== RevokedCertInfo.NOT_REVOKED) allrevoked = false; }
    public boolean isAllTokenCertificatesRevoked(String tokensn, String username) throws RemoteException, NamingException, CreateException, AuthorizationDeniedException, FinderException{      Collection certs = hardtokensession.findCertificatesInHardToken(administrator, tokensn);      boolean allrevoked = true;      if(!certs.isEmpty()){        Iterator j = certs.iterator();        while(j.hasNext()){          X509Certificate cert = (X509Certificate) j.next();                  RevokedCertInfo revinfo = certificatesession.isRevoked(administrator, CertTools.getIssuerDN(cert), cert.getSerialNumber());                    if(revinfo == null || revinfo.getReason()== RevokedCertInfo.NOT_REVOKED)            allrevoked = false;        }      }      return allrevoked;    }