synchronized void validate(X509Certificate c) throws CertificateException {
  Cert cert=certMap.get(c);
  if (cert == null) {
    cert=new Cert(c);
    certMap.put(c,cert);
  }
  StatusCode code=validator.validateCertificate(cert);
  boolean valid=code == null || code.isGood();
  if (valid) {
    acceptedCertificates.add(cert);
  }
 else {
    throw new CertificateException("Certificate is not valid");
  }
  X500Principal issuer=c.getIssuerX500Principal();
  X500Principal subject=c.getSubjectX500Principal();
  if (!subject.equals(issuer) && valid) {
    acceptedIssuers.add(cert);
    acceptedIssuersArray=null;
  }
}

synchronized void validate ( X509Certificate c ) throws CertificateException { Cert cert = certMap . get ( c ) ; if ( cert == null ) { cert = new Cert ( c ) ; certMap . put ( c , cert ) ; } StatusCode code = validator . validateCertificate ( cert ) ; boolean valid = code == null || code . isGood ( ) ; if ( valid ) { acceptedCertificates . add ( cert ) ; } else { throw new CertificateException ( "Certificate is not valid" ) ; } X500Principal issuer = c . getIssuerX500Principal ( ) ; X500Principal subject = c . getSubjectX500Principal ( ) ; if ( ! subject . equals ( issuer ) && valid ) { acceptedIssuers . add ( cert ) ; acceptedIssuersArray = null ; } }
encode x509certificate to binary and cache
