/** * Helper method to validate the whole CompleteCertificateRefs object * * @return a possibly empty list of DigiDocException objects */ public ArrayList validate() { ArrayList errs = new ArrayList(); for (int i = 0; i < countCertIDs(); i++) { CertID cid = getCertID(i); ArrayList a = cid.validate(); if (a.size() > 0) errs.addAll(a); } return errs; }
private static void registerCert(X509Certificate cert, int type, String id, Signature sig) throws DigiDocException { String sid = id; if (sid != null) sid = sid.replace(" ", "_"); CertValue cval = new CertValue(sid, cert, type, sig); sig.addCertValue(cval); CertID cid = new CertID(sig, cert, type); sig.addCertID(cid); if (type != CertID.CERTID_TYPE_SIGNER) cid.setUri("#" + cval.getId()); }
public Request(ASN1Sequence seq) { reqCert = CertID.getInstance(seq.getObjectAt(0)); if (seq.size() == 2) { singleRequestExtensions = X509Extensions.getInstance((ASN1TaggedObject) seq.getObjectAt(1), true); } }
/** * Mutator for certSerial attribute. Rerouted to set this attribute on CertID sublement. * * @param str new value for certSerial attribute * @throws DigiDocException for validation errors */ public void setCertSerial(BigInteger i) throws DigiDocException { CertID cid = getOrCreateCertIdOfType(CertID.CERTID_TYPE_RESPONDER); cid.setSerial(i); }
public String getCertIssuer() { CertID cid = getCertIdOfType(CertID.CERTID_TYPE_RESPONDER); if (cid != null) return cid.getIssuer(); else return null; }
/** * Accessor for certSerial attribute. Rerouted to get this attribute from CertID sublement. * * @return value of certSerial attribute */ public BigInteger getCertSerial() { CertID cid = getCertIdOfType(CertID.CERTID_TYPE_RESPONDER); if (cid != null) return cid.getSerial(); else return null; }
/** * Mutator for certDigestValue attribute. Rerouted to set this attribute on CertID sublement. * * @param data new value for certDigestValue attribute * @throws DigiDocException for validation errors */ public void setCertDigestValue(byte[] data) throws DigiDocException { CertID cid = getOrCreateCertIdOfType(CertID.CERTID_TYPE_RESPONDER); cid.setDigestValue(data); }
/** * Accessor for certDigestValue attribute Rerouted to get this attribute from CertID sublement. * * @return value of certDigestValue attribute */ public byte[] getCertDigestValue() { CertID cid = getCertIdOfType(CertID.CERTID_TYPE_RESPONDER); if (cid != null) return cid.getDigestValue(); else return null; }
/** * Mutator for certDigestAlgorithm attribute. Rerouted to set this attribute on CertID sublement. * * @param str new value for certDigestAlgorithm attribute * @throws DigiDocException for validation errors */ public void setCertDigestAlgorithm(String str) throws DigiDocException { CertID cid = getOrCreateCertIdOfType(CertID.CERTID_TYPE_RESPONDER); cid.setDigestAlgorithm(str); }
/** * Accessor for certDigestAlgorithm attribute Rerouted to get this attribute from CertID * sublement. * * @return value of certDigestAlgorithm attribute */ public String getCertDigestAlgorithm() { CertID cid = getCertIdOfType(CertID.CERTID_TYPE_RESPONDER); if (cid != null) return cid.getDigestAlgorithm(); else return null; }