@@ -98,7 +98,7 @@ public class CRLValidator {
98
98
*
99
99
* @param builder See {@link ValidatorChainBuilder}
100
100
*/
101
- CRLValidator (ValidatorChainBuilder builder ) {
101
+ protected CRLValidator (ValidatorChainBuilder builder ) {
102
102
this .certificateRetriever = builder .getCertificateRetriever ();
103
103
this .properties = builder .getProperties ();
104
104
this .builder = builder ;
@@ -114,7 +114,7 @@ public class CRLValidator {
114
114
* @param validationDate validation date to check for
115
115
*/
116
116
public void validate (ValidationReport report , ValidationContext context , X509Certificate certificate , X509CRL crl ,
117
- Date validationDate ) {
117
+ Date validationDate ) {
118
118
ValidationContext localContext = context .setValidatorContext (ValidatorContext .CRL_VALIDATOR );
119
119
if (CertificateUtil .isSelfSigned (certificate )) {
120
120
report .addReportItem (new CertificateReportItem (certificate , CRL_CHECK , SELF_SIGNED_CERTIFICATE ,
@@ -123,7 +123,7 @@ public void validate(ValidationReport report, ValidationContext context, X509Cer
123
123
}
124
124
// Check that thisUpdate >= (validationDate - freshness).
125
125
Duration freshness = properties .getFreshness (localContext );
126
- if (crl .getThisUpdate ().before (DateTimeUtil .addMillisToDate (validationDate , -(long )freshness .toMillis ()))) {
126
+ if (crl .getThisUpdate ().before (DateTimeUtil .addMillisToDate (validationDate , -(long ) freshness .toMillis ()))) {
127
127
report .addReportItem (new CertificateReportItem (certificate , CRL_CHECK ,
128
128
MessageFormatUtil .format (FRESHNESS_CHECK , crl .getThisUpdate (), validationDate , freshness ),
129
129
ReportItemStatus .INDETERMINATE ));
@@ -203,7 +203,7 @@ public void validate(ValidationReport report, ValidationContext context, X509Cer
203
203
}
204
204
205
205
private static void verifyRevocation (ValidationReport report , X509Certificate certificate ,
206
- Date verificationDate , X509CRL crl ) {
206
+ Date verificationDate , X509CRL crl ) {
207
207
X509CRLEntry revocation = crl .getRevokedCertificate (certificate .getSerialNumber ());
208
208
if (revocation != null ) {
209
209
Date revocationDate = revocation .getRevocationDate ();
@@ -255,7 +255,7 @@ private static Date getExpiredCertsOnCRLExtensionDate(X509CRL crl) {
255
255
}
256
256
257
257
private static int computeInterimReasonsMask (IIssuingDistributionPoint issuingDistPoint ,
258
- IDistributionPoint distributionPoint ) {
258
+ IDistributionPoint distributionPoint ) {
259
259
int interimReasonsMask = ALL_REASONS ;
260
260
if (!issuingDistPoint .isNull ()) {
261
261
IReasonFlags onlySomeReasons = issuingDistPoint .getOnlySomeReasons ();
@@ -273,7 +273,7 @@ private static int computeInterimReasonsMask(IIssuingDistributionPoint issuingDi
273
273
}
274
274
275
275
private void verifyCrlIntegrity (ValidationReport report , ValidationContext context , X509Certificate certificate ,
276
- X509CRL crl ) {
276
+ X509CRL crl ) {
277
277
Certificate [] certs = certificateRetriever .getCrlIssuerCertificates (crl );
278
278
if (certs .length == 0 ) {
279
279
report .addReportItem (new CertificateReportItem (certificate , CRL_CHECK , CRL_ISSUER_NOT_FOUND ,
@@ -312,7 +312,7 @@ private void verifyCrlIntegrity(ValidationReport report, ValidationContext conte
312
312
}
313
313
314
314
private Certificate getRoot (Certificate cert ) {
315
- Certificate [] chain = certificateRetriever .retrieveMissingCertificates (new Certificate []{cert });
315
+ Certificate [] chain = certificateRetriever .retrieveMissingCertificates (new Certificate [] {cert });
316
316
return chain [chain .length - 1 ];
317
317
}
318
318
}
0 commit comments