/** * This method allows to add all {@code X509CRL} from one {@code OfflineCRLSource} to this one. If the * {@code X509CRL} exists already within the current source then it is * ignored. * * @param offlineCRLSource * the source to be added */ public void addAll(final OfflineCRLSource offlineCRLSource) { for (Entry<String, byte[]> entry : offlineCRLSource.crlsMap.entrySet()) { super.addCRLBinary(entry.getKey(), entry.getValue()); } }
@Override public final CRLToken getRevocationToken(final CertificateToken certificateToken, final CertificateToken issuerToken) { if (certificateToken == null) { throw new NullPointerException(); } final CRLToken validCRLToken = validCRLTokenList.get(certificateToken); if (validCRLToken != null) { validCRLToken.setOrigin(RevocationOrigin.SIGNATURE); return validCRLToken; } if (issuerToken == null) { return null; } final CRLValidity bestCRLValidity = getBestCrlValidity(certificateToken, issuerToken); if (bestCRLValidity == null) { return null; } final CRLToken crlToken = new CRLToken(certificateToken, bestCRLValidity); crlToken.setOrigin(RevocationOrigin.SIGNATURE); validCRLTokenList.put(certificateToken, crlToken); return crlToken; }
final CRLValidity crlValidity = getCrlValidity(crlEntry.getKey(), crlEntry.getValue(), issuerToken); if (crlValidity == null || !crlValidity.isValid()) { continue;
protected void addCRLBinary(byte[] binaries) { String base64Digest = Utils.toBase64(DSSUtils.digest(DigestAlgorithm.SHA256, binaries)); addCRLBinary(base64Digest, binaries); }