本文整理了Java中java.security.cert.X509CRL.toString()
方法的一些代码示例,展示了X509CRL.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X509CRL.toString()
方法的具体详情如下:
包路径:java.security.cert.X509CRL
类名称:X509CRL
方法名:toString
暂无
代码示例来源:origin: org.jsslutils/jsslutils
@Override
public String toString() {
X509CRL crl = this.crl;
if (crl != null) {
return this.getClass().getName() + ", wrapped CRL: "
+ crl.toString();
} else {
return this.getClass().getName() + ", no wrapped CRL!";
}
}
}
代码示例来源:origin: org.jasig.cas/cas-server-support-x509
/**
* {@inheritDoc}
* The CRL next update time is compared against the current time with the threshold
* applied and rejected if and only if the next update time is in the past.
*
* @param crl CRL instance to evaluate.
*
* @throws GeneralSecurityException On expired CRL data. Check the exception type for exact details
*
* @see org.jasig.cas.adaptors.x509.authentication.handler.support.RevocationPolicy#apply(java.lang.Object)
*/
@Override
public void apply(final X509CRL crl) throws GeneralSecurityException {
final Calendar cutoff = Calendar.getInstance();
if (CertUtils.isExpired(crl, cutoff.getTime())) {
cutoff.add(Calendar.SECOND, -this.threshold);
if (CertUtils.isExpired(crl, cutoff.getTime())) {
throw new ExpiredCRLException(crl.toString(), cutoff.getTime(), this.threshold);
}
logger.info(String.format("CRL expired on %s but is within threshold period, %s seconds.",
crl.getNextUpdate(), this.threshold));
}
}
代码示例来源:origin: org.apereo.cas/cas-server-support-x509-core
/**
* {@inheritDoc}
* The CRL next update time is compared against the current time with the threshold
* applied and rejected if and only if the next update time is in the past.
*
* @param crl CRL instance to evaluate.
* @throws ExpiredCRLException On expired CRL data. Check the exception type for exact details
*/
@Override
public void apply(final X509CRL crl) throws ExpiredCRLException {
val cutoff = ZonedDateTime.now(ZoneOffset.UTC);
if (CertUtils.isExpired(crl, cutoff)) {
if (CertUtils.isExpired(crl, cutoff.minusSeconds(this.threshold))) {
throw new ExpiredCRLException(crl.toString(), cutoff, this.threshold);
}
LOGGER.info(String.format("CRL expired on %s but is within threshold period, %s seconds.",
crl.getNextUpdate(), this.threshold));
}
}
}
内容来源于网络,如有侵权,请联系作者删除!