public EACCertificateHolder build(EACSigner signer) throws EACException { try { CertificateBody body = buildBody(); OutputStream vOut = signer.getOutputStream(); vOut.write(body.getEncoded(ASN1Encoding.DER)); vOut.close(); return new EACCertificateHolder(new CVCertificate(body, signer.getSignature())); } catch (Exception e) { throw new EACException("unable to process signature: " + e.getMessage(), e); } }
public EACCertificateHolder(CVCertificate cvCertificate) { this.cvCertificate = cvCertificate; }
/** * Return the underlying ASN.1 structure for the certificate in this holder. * * @return a X509CertificateStructure object. */ public CVCertificate toASN1Structure() { return cvCertificate; }