try {
CVCertificate parsedObject = CertificateParser.parseCertificate(cert);
ret = new CardVerifiableCertificate(parsedObject);
} catch (ParseException e) {
log.debug("ParseException trying to read CVCCertificate.");
throw new CertificateException("Certificate exception trying to read CVCCertificate", e);
} catch (ConstructionException e) {
log.debug("ConstructionException trying to read CVCCertificate.");
throw new CertificateException("Certificate exception trying to read CVCCertificate", e);
} catch (IllegalArgumentException e) {
log.debug("CertificateException trying to read CVCCertificate.");
throw new CertificateException("Certificate exception trying to read CVCCertificate", e);
}
}
if (ret == null) {
throw new CertificateException("No certificate found");
}
//log.trace("<getCertfromByteArray");
return ret;
} // getCertfromByteArray