当前位置: 首页>>代码示例>>Java>>正文


Java X509CRL.getRevokedCertificates方法代码示例

本文整理汇总了Java中java.security.cert.X509CRL.getRevokedCertificates方法的典型用法代码示例。如果您正苦于以下问题:Java X509CRL.getRevokedCertificates方法的具体用法?Java X509CRL.getRevokedCertificates怎么用?Java X509CRL.getRevokedCertificates使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.security.cert.X509CRL的用法示例。


在下文中一共展示了X509CRL.getRevokedCertificates方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addCRL

import java.security.cert.X509CRL; //导入方法依赖的package包/类
/**
 * Add the CRLEntry objects contained in a previous CRL.
 * 
 * @param other the X509CRL to source the other entries from. 
 */
public void addCRL(X509CRL other)
    throws CRLException
{
    Set revocations = other.getRevokedCertificates();

    if (revocations != null)
    {
        Iterator it = revocations.iterator();
        while (it.hasNext())
        {
            X509CRLEntry entry = (X509CRLEntry)it.next();

            ASN1InputStream aIn = new ASN1InputStream(entry.getEncoded());

            try
            {
                tbsGen.addCRLEntry(ASN1Sequence.getInstance(aIn.readObject()));
            }
            catch (IOException e)
            {
                throw new CRLException("exception processing encoding of CRL: " + e.toString());
            }
        }
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:31,代码来源:X509V2CRLGenerator.java

示例2: addCRLsToStoreMaterial

import java.security.cert.X509CRL; //导入方法依赖的package包/类
/**
 * Add CRL's from the specified collection to the list of certs and CRL's being collected
 * for the CertStore.
 * 
 * @param storeMaterial list of certs and CRL's to be updated.
 * @param crls collection of CRL's to be processed
 * @param now current date/time
 */
protected void addCRLsToStoreMaterial(List<Object> storeMaterial, Collection<X509CRL> crls, Date now) {
    for (X509CRL crl : crls) {
        boolean isEmpty = crl.getRevokedCertificates() == null || crl.getRevokedCertificates().isEmpty();
        boolean isExpired = crl.getNextUpdate().before(now);
        if (!isEmpty || options.isProcessEmptyCRLs()) {
            if (!isExpired || options.isProcessExpiredCRLs()) {
                storeMaterial.add(crl);
                if (log.isTraceEnabled()) {
                    log.trace("Added X509CRL to cert store from issuer {} dated {}",
                            x500DNHandler.getName(crl.getIssuerX500Principal()), crl.getThisUpdate());
                    if (isEmpty) {
                        log.trace("X509CRL added to cert store from issuer {} dated {} was empty",
                                x500DNHandler.getName(crl.getIssuerX500Principal()), crl.getThisUpdate());
                    }
                }
                if (isExpired) {
                    log.warn("Using X509CRL from issuer {} with a nextUpdate in the past: {}",
                            x500DNHandler.getName(crl.getIssuerX500Principal()), crl.getNextUpdate());
                }
            } else {
                if (log.isTraceEnabled()) {
                    log.trace("Expired X509CRL not added to cert store, from issuer {} nextUpdate {}",
                            x500DNHandler.getName(crl.getIssuerX500Principal()), crl.getNextUpdate());
                }
            }
        } else {
            if (log.isTraceEnabled()) {
                log.trace("Empty X509CRL not added to cert store, from issuer {} dated {}",
                        x500DNHandler.getName(crl.getIssuerX500Principal()), crl.getThisUpdate());
            }
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:42,代码来源:CertPathPKIXTrustEvaluator.java


注:本文中的java.security.cert.X509CRL.getRevokedCertificates方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。