本文整理了Java中java.security.cert.X509CRL.verify()
方法的一些代码示例,展示了X509CRL.verify()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X509CRL.verify()
方法的具体详情如下:
包路径:java.security.cert.X509CRL
类名称:X509CRL
方法名:verify
[英]Verifies this CRL by verifying that this CRL was signed with the corresponding private key to the specified public key.
[中]通过验证此CRL是否使用指定公钥的相应私钥签名来验证此CRL。
代码示例来源:origin: apache/pdfbox
crlDistributionPointsURL + " could not be verified");
crl.verify(crlIssuerCert.getPublicKey(), SecurityProvider.getProvider().getName());
代码示例来源:origin: apache/pdfbox
crl.verify(issuerCertificate.getPublicKey(), SecurityProvider.getProvider().getName());
CRLVerifier.checkRevocation(crl, certInfo.getCertificate(), signDate.getTime(), certInfo.getCrlUrl());
COSStream crlStream = writeDataToStream(crl.getEncoded());
代码示例来源:origin: org.jsslutils/jsslutils
@Override
public void verify(PublicKey key, String sigProvider) throws CRLException,
NoSuchAlgorithmException, InvalidKeyException,
NoSuchProviderException, SignatureException {
X509CRL crl = this.crl;
if (crl != null) {
crl.verify(key, sigProvider);
} else {
throw new CRLException("No CRL loaded, nothing to verify.");
}
}
代码示例来源:origin: org.jsslutils/jsslutils
@Override
public void verify(PublicKey key) throws CRLException,
NoSuchAlgorithmException, InvalidKeyException,
NoSuchProviderException, SignatureException {
X509CRL crl = this.crl;
if (crl != null) {
crl.verify(key);
} else {
throw new CRLException("No CRL loaded, nothing to verify.");
}
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
protected static PublicKey processCRLG(
X509CRL crl,
Set keys)
throws AnnotatedException
{
Exception lastException = null;
for (Iterator it = keys.iterator(); it.hasNext();)
{
PublicKey key = (PublicKey)it.next();
try
{
crl.verify(key);
return key;
}
catch (Exception e)
{
lastException = e;
}
}
throw new AnnotatedException("Cannot verify CRL.", lastException);
}
代码示例来源:origin: eu.eu-emi.security/canl
protected static PublicKey processCRLG(
X509CRL crl,
Set keys)
throws AnnotatedException
{
Exception lastException = null;
for (Iterator it = keys.iterator(); it.hasNext();)
{
PublicKey key = (PublicKey)it.next();
try
{
crl.verify(key);
return key;
}
catch (Exception e)
{
lastException = e;
}
}
throw new AnnotatedException("Cannot verify CRL.", lastException);
}
代码示例来源:origin: com.madgag/scprov-jdk15on
protected static PublicKey processCRLG(
X509CRL crl,
Set keys)
throws AnnotatedException
{
Exception lastException = null;
for (Iterator it = keys.iterator(); it.hasNext();)
{
PublicKey key = (PublicKey)it.next();
try
{
crl.verify(key);
return key;
}
catch (Exception e)
{
lastException = e;
}
}
throw new AnnotatedException("Cannot verify CRL.", lastException);
}
代码示例来源:origin: ibinti/bugvm
protected static PublicKey processCRLG(
X509CRL crl,
Set keys)
throws AnnotatedException
{
Exception lastException = null;
for (Iterator it = keys.iterator(); it.hasNext();)
{
PublicKey key = (PublicKey)it.next();
try
{
crl.verify(key);
return key;
}
catch (Exception e)
{
lastException = e;
}
}
throw new AnnotatedException("Cannot verify CRL.", lastException);
}
代码示例来源:origin: com.bugvm/bugvm-rt
protected static PublicKey processCRLG(
X509CRL crl,
Set keys)
throws AnnotatedException
{
Exception lastException = null;
for (Iterator it = keys.iterator(); it.hasNext();)
{
PublicKey key = (PublicKey)it.next();
try
{
crl.verify(key);
return key;
}
catch (Exception e)
{
lastException = e;
}
}
throw new AnnotatedException("Cannot verify CRL.", lastException);
}
代码示例来源:origin: com.madgag.spongycastle/prov
protected static PublicKey processCRLG(
X509CRL crl,
Set keys)
throws AnnotatedException
{
Exception lastException = null;
for (Iterator it = keys.iterator(); it.hasNext();)
{
PublicKey key = (PublicKey)it.next();
try
{
crl.verify(key);
return key;
}
catch (Exception e)
{
lastException = e;
}
}
throw new AnnotatedException("Cannot verify CRL.", lastException);
}
代码示例来源:origin: ripple-unmaintained/ripple-lib-java
protected static PublicKey processCRLG(
X509CRL crl,
Set keys)
throws AnnotatedException
{
Exception lastException = null;
for (Iterator it = keys.iterator(); it.hasNext();)
{
PublicKey key = (PublicKey)it.next();
try
{
crl.verify(key);
return key;
}
catch (Exception e)
{
lastException = e;
}
}
throw new AnnotatedException("Cannot verify CRL.", lastException);
}
代码示例来源:origin: ibinti/bugvm
protected static X509CRL processCRLH(
Set deltacrls,
PublicKey key)
throws AnnotatedException
{
Exception lastException = null;
for (Iterator it = deltacrls.iterator(); it.hasNext();)
{
X509CRL crl = (X509CRL)it.next();
try
{
crl.verify(key);
return crl;
}
catch (Exception e)
{
lastException = e;
}
}
if (lastException != null)
{
throw new AnnotatedException("Cannot verify delta CRL.", lastException);
}
return null;
}
代码示例来源:origin: com.madgag.spongycastle/prov
protected static X509CRL processCRLH(
Set deltacrls,
PublicKey key)
throws AnnotatedException
{
Exception lastException = null;
for (Iterator it = deltacrls.iterator(); it.hasNext();)
{
X509CRL crl = (X509CRL)it.next();
try
{
crl.verify(key);
return crl;
}
catch (Exception e)
{
lastException = e;
}
}
if (lastException != null)
{
throw new AnnotatedException("Cannot verify delta CRL.", lastException);
}
return null;
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
protected static X509CRL processCRLH(
Set deltacrls,
PublicKey key)
throws AnnotatedException
{
Exception lastException = null;
for (Iterator it = deltacrls.iterator(); it.hasNext();)
{
X509CRL crl = (X509CRL)it.next();
try
{
crl.verify(key);
return crl;
}
catch (Exception e)
{
lastException = e;
}
}
if (lastException != null)
{
throw new AnnotatedException("Cannot verify delta CRL.", lastException);
}
return null;
}
代码示例来源:origin: ripple-unmaintained/ripple-lib-java
protected static X509CRL processCRLH(
Set deltacrls,
PublicKey key)
throws AnnotatedException
{
Exception lastException = null;
for (Iterator it = deltacrls.iterator(); it.hasNext();)
{
X509CRL crl = (X509CRL)it.next();
try
{
crl.verify(key);
return crl;
}
catch (Exception e)
{
lastException = e;
}
}
if (lastException != null)
{
throw new AnnotatedException("Cannot verify delta CRL.", lastException);
}
return null;
}
代码示例来源:origin: com.bugvm/bugvm-rt
protected static X509CRL processCRLH(
Set deltacrls,
PublicKey key)
throws AnnotatedException
{
Exception lastException = null;
for (Iterator it = deltacrls.iterator(); it.hasNext();)
{
X509CRL crl = (X509CRL)it.next();
try
{
crl.verify(key);
return crl;
}
catch (Exception e)
{
lastException = e;
}
}
if (lastException != null)
{
throw new AnnotatedException("Cannot verify delta CRL.", lastException);
}
return null;
}
代码示例来源:origin: com.madgag/scprov-jdk15on
protected static X509CRL processCRLH(
Set deltacrls,
PublicKey key)
throws AnnotatedException
{
Exception lastException = null;
for (Iterator it = deltacrls.iterator(); it.hasNext();)
{
X509CRL crl = (X509CRL)it.next();
try
{
crl.verify(key);
return crl;
}
catch (Exception e)
{
lastException = e;
}
}
if (lastException != null)
{
throw new AnnotatedException("Cannot verify delta CRL.", lastException);
}
return null;
}
代码示例来源:origin: arhs/sd-dss
private void checkSignatureValue(final X509CRL x509CRL, final CertificateToken issuerToken, final CRLValidity crlValidity) {
try {
x509CRL.verify(issuerToken.getPublicKey());
crlValidity.signatureIntact = true;
crlValidity.issuerToken = issuerToken;
} catch (InvalidKeyException e) {
crlValidity.signatureInvalidityReason = e.getClass().getSimpleName() + " - " + e.getMessage();
} catch (CRLException e) {
crlValidity.signatureInvalidityReason = e.getClass().getSimpleName() + " - " + e.getMessage();
} catch (NoSuchAlgorithmException e) {
crlValidity.signatureInvalidityReason = e.getClass().getSimpleName() + " - " + e.getMessage();
} catch (SignatureException e) {
crlValidity.signatureInvalidityReason = e.getClass().getSimpleName() + " - " + e.getMessage();
} catch (NoSuchProviderException e) {
throw new DSSException(e);
}
}
代码示例来源:origin: esig/dss
private void checkSignatureValue(final X509CRL x509CRL, final CertificateToken issuerToken, final CRLValidity crlValidity) {
try {
x509CRL.verify(issuerToken.getPublicKey());
crlValidity.setSignatureIntact(true);
crlValidity.setIssuerToken(issuerToken);
} catch (KeyException | CRLException | NoSuchAlgorithmException | SignatureException e) {
crlValidity.setSignatureInvalidityReason(e.getClass().getSimpleName() + " - " + e.getMessage());
} catch (NoSuchProviderException e) {
throw new DSSException(e);
}
}
代码示例来源:origin: org.apache.pdfbox/pdfbox-examples
/**
* Fetches and adds CRL data to storage for the given Certificate.
*
* @param certInfo the certificate info, for it to check CRL data.
* @throws IOException
* @throws RevokedCertificateException
* @throws GeneralSecurityException
* @throws CertificateVerificationException
*/
private void addCrlRevocationInfo(CertSignatureInformation certInfo)
throws IOException, RevokedCertificateException, GeneralSecurityException,
CertificateVerificationException
{
X509CRL crl = CRLVerifier.downloadCRLFromWeb(certInfo.getCrlUrl());
crl.verify(certInfo.getIssuerCertificate().getPublicKey(), SecurityProvider.getProvider().getName());
CRLVerifier.checkRevocation(crl, certInfo.getCertificate(), signDate.getTime(), certInfo.getCrlUrl());
COSStream crlStream = writeDataToStream(crl.getEncoded());
crls.add(crlStream);
if (correspondingCRLs != null)
{
correspondingCRLs.add(crlStream);
}
foundRevocationInformation.add(certInfo.getCertificate().getSerialNumber());
}
内容来源于网络,如有侵权,请联系作者删除!