/** * Adds a CRL to this revocation data set. * * @param crl */ public void addCRL(X509CRL crl) { byte[] encodedCrl; try { encodedCrl = crl.getEncoded(); } catch (CRLException e) { throw new IllegalArgumentException("CRL coding error: " + e.getMessage(), e); } addCRL(encodedCrl); }
private void createRevocationValues( RevocationValuesType revocationValues, RevocationData revocationData) { if (revocationData.hasCRLs()) { CRLValuesType crlValues = revocationValues.addNewCRLValues(); for (byte[] crl : revocationData.getCRLs()) { EncapsulatedPKIDataType encapsulatedCrlValue = crlValues.addNewEncapsulatedCRLValue(); encapsulatedCrlValue.setByteArrayValue(crl); } } if (revocationData.hasOCSPs()) { OCSPValuesType ocspValues = revocationValues.addNewOCSPValues(); for (byte[] ocsp : revocationData.getOCSPs()) { EncapsulatedPKIDataType encapsulatedOcspValue = ocspValues.addNewEncapsulatedOCSPValue(); encapsulatedOcspValue.setByteArrayValue(ocsp); } } } }
RevocationData tsaRevocationDataXadesT = new RevocationData(); LOG.log(POILogger.DEBUG, "creating XAdES-T time-stamp"); XAdESTimeStampType signatureTimeStamp = createXAdESTimeStamp if (tsaRevocationDataXadesT.hasRevocationDataEntries()) { ValidationDataType validationData = createValidationData(tsaRevocationDataXadesT); insertXChild(unsignedSigProps, validationData); RevocationData revocationData = signatureConfig.getRevocationDataService() .getRevocationData(certChain); if (revocationData.hasCRLs()) { CRLRefsType crlRefs = completeRevocationRefs.addNewCRLRefs(); completeRevocationRefs.setCRLRefs(crlRefs); for (byte[] encodedCrl : revocationData.getCRLs()) { CRLRefType crlRef = crlRefs.addNewCRLRef(); X509CRL crl; if (revocationData.hasOCSPs()) { OCSPRefsType ocspRefs = completeRevocationRefs.addNewOCSPRefs(); for (byte[] ocsp : revocationData.getOCSPs()) { try { OCSPRefType ocspRef = ocspRefs.addNewOCSPRef(); RevocationData tsaRevocationDataXadesX1 = new RevocationData(); LOG.log(POILogger.DEBUG, "creating XAdES-X time-stamp"); XAdESTimeStampType timeStampXadesX1 = createXAdESTimeStamp (timeStampNodesXadesX1, tsaRevocationDataXadesX1); if (tsaRevocationDataXadesX1.hasRevocationDataEntries()) {
RevocationData tsaRevocationDataXadesT = new RevocationData(); LOG.log(POILogger.DEBUG, "creating XAdES-T time-stamp"); XAdESTimeStampType signatureTimeStamp = createXAdESTimeStamp if (tsaRevocationDataXadesT.hasRevocationDataEntries()) { ValidationDataType validationData = createValidationData(tsaRevocationDataXadesT); insertXChild(unsignedSigProps, validationData); RevocationData revocationData = signatureConfig.getRevocationDataService() .getRevocationData(certChain); if (revocationData.hasCRLs()) { CRLRefsType crlRefs = completeRevocationRefs.addNewCRLRefs(); completeRevocationRefs.setCRLRefs(crlRefs); for (byte[] encodedCrl : revocationData.getCRLs()) { CRLRefType crlRef = crlRefs.addNewCRLRef(); X509CRL crl; if (revocationData.hasOCSPs()) { OCSPRefsType ocspRefs = completeRevocationRefs.addNewOCSPRefs(); for (byte[] ocsp : revocationData.getOCSPs()) { try { OCSPRefType ocspRef = ocspRefs.addNewOCSPRef(); RevocationData tsaRevocationDataXadesX1 = new RevocationData(); LOG.log(POILogger.DEBUG, "creating XAdES-X time-stamp"); XAdESTimeStampType timeStampXadesX1 = createXAdESTimeStamp (timeStampNodesXadesX1, tsaRevocationDataXadesX1); if (tsaRevocationDataXadesX1.hasRevocationDataEntries()) {
private void createRevocationValues( RevocationValuesType revocationValues, RevocationData revocationData) { if (revocationData.hasCRLs()) { CRLValuesType crlValues = revocationValues.addNewCRLValues(); for (byte[] crl : revocationData.getCRLs()) { EncapsulatedPKIDataType encapsulatedCrlValue = crlValues.addNewEncapsulatedCRLValue(); encapsulatedCrlValue.setByteArrayValue(crl); } } if (revocationData.hasOCSPs()) { OCSPValuesType ocspValues = revocationValues.addNewOCSPValues(); for (byte[] ocsp : revocationData.getOCSPs()) { EncapsulatedPKIDataType encapsulatedOcspValue = ocspValues.addNewEncapsulatedOCSPValue(); encapsulatedOcspValue.setByteArrayValue(ocsp); } } } }
/** * Adds a CRL to this revocation data set. * * @param crl */ public void addCRL(X509CRL crl) { byte[] encodedCrl; try { encodedCrl = crl.getEncoded(); } catch (CRLException e) { throw new IllegalArgumentException("CRL coding error: " + e.getMessage(), e); } addCRL(encodedCrl); }