@@ -88,7 +88,7 @@ public class TomcatJSS implements SSLSocketListener {
88
88
boolean requireClientAuth ;
89
89
boolean wantClientAuth ;
90
90
91
- boolean enableOCSP ;
91
+ boolean enableRevocationCheck ;
92
92
String ocspResponderURL ;
93
93
String ocspResponderCertNickname ;
94
94
int ocspCacheSize = 1000 ; // entries
@@ -183,12 +183,12 @@ public boolean getWantClientAuth() {
183
183
return wantClientAuth ;
184
184
}
185
185
186
- public boolean getEnableOCSP () {
187
- return enableOCSP ;
186
+ public boolean getEnableRevocationCheck () {
187
+ return enableRevocationCheck ;
188
188
}
189
189
190
- public void setEnableOCSP (boolean enableOCSP ) {
191
- this .enableOCSP = enableOCSP ;
190
+ public void setEnableRevocationCheck (boolean enableRevocationCheck ) {
191
+ this .enableRevocationCheck = enableRevocationCheck ;
192
192
}
193
193
194
194
public String getOcspResponderURL () {
@@ -269,7 +269,11 @@ public void loadJSSConfig(Properties config) {
269
269
270
270
String enableOCSPProp = config .getProperty ("enableOCSP" );
271
271
if (enableOCSPProp != null )
272
- setEnableOCSP (Boolean .parseBoolean (enableOCSPProp ));
272
+ setEnableRevocationCheck (Boolean .parseBoolean (enableOCSPProp ));
273
+
274
+ String enableRevocationCheckProp = config .getProperty ("enableRevocationCheck" );
275
+ if (enableRevocationCheckProp != null )
276
+ setEnableRevocationCheck (Boolean .parseBoolean (enableRevocationCheckProp ));
273
277
274
278
String ocspResponderURLProp = config .getProperty ("ocspResponderURL" );
275
279
if (ocspResponderURLProp != null )
@@ -328,31 +332,35 @@ public void loadTomcatConfig(Document document) throws XPathExpressionException
328
332
}
329
333
330
334
String certDbProp = connector .getAttribute ("certdbDir" );
331
- if (certDbProp != null )
335
+ if (StringUtils . isNotEmpty ( certDbProp ) )
332
336
setCertdbDir (certDbProp );
333
337
334
338
String passwordClassProp = connector .getAttribute ("passwordClass" );
335
- if (passwordClassProp != null )
339
+ if (StringUtils . isNotEmpty ( passwordClassProp ) )
336
340
setPasswordClass (passwordClassProp );
337
341
338
342
String passwordFileProp = connector .getAttribute ("passwordFile" );
339
- if (passwordFileProp != null )
343
+ if (StringUtils . isNotEmpty ( passwordFileProp ) )
340
344
setPasswordFile (passwordFileProp );
341
345
342
346
String serverCertNickFileProp = connector .getAttribute ("serverCertNickFile" );
343
- if (serverCertNickFileProp != null )
347
+ if (StringUtils . isNotEmpty ( serverCertNickFileProp ) )
344
348
setServerCertNickFile (serverCertNickFileProp );
345
349
346
350
String enableOCSPProp = connector .getAttribute ("enableOCSP" );
347
- if (enableOCSPProp != null )
348
- setEnableOCSP (Boolean .parseBoolean (enableOCSPProp ));
351
+ if (StringUtils .isNotEmpty (enableOCSPProp ))
352
+ setEnableRevocationCheck (Boolean .parseBoolean (enableOCSPProp ));
353
+
354
+ String enableRevocationCheckProp = connector .getAttribute ("enableRevocationCheck" );
355
+ if (StringUtils .isNotEmpty (enableRevocationCheckProp ))
356
+ setEnableRevocationCheck (Boolean .parseBoolean (enableRevocationCheckProp ));
349
357
350
358
String ocspResponderURLProp = connector .getAttribute ("ocspResponderURL" );
351
- if (ocspResponderURLProp != null )
359
+ if (StringUtils . isNotEmpty ( ocspResponderURLProp ) )
352
360
setOcspResponderURL (ocspResponderURLProp );
353
361
354
362
String ocspResponderCertNicknameProp = connector .getAttribute ("ocspResponderCertNickname" );
355
- if (ocspResponderCertNicknameProp != null )
363
+ if (StringUtils . isNotEmpty ( ocspResponderCertNicknameProp ) )
356
364
setOcspResponderCertNickname (ocspResponderCertNicknameProp );
357
365
358
366
String ocspCacheSizeProp = connector .getAttribute ("ocspCacheSize" );
@@ -469,7 +477,7 @@ public void init() throws KeyDatabaseException, CertDatabaseException, GeneralSe
469
477
logger .debug ("wantClientAuth: {}" , wantClientAuth );
470
478
471
479
if (requireClientAuth || wantClientAuth ) {
472
- configureOCSP ();
480
+ configureRevocationCheck ();
473
481
}
474
482
475
483
// 12 hours = 43200 seconds
@@ -549,12 +557,12 @@ public CryptoToken getToken(String tag) throws NoSuchTokenException {
549
557
return null ;
550
558
}
551
559
552
- public void configureOCSP () throws GeneralSecurityException , ConfigurationException {
560
+ public void configureRevocationCheck () throws GeneralSecurityException , ConfigurationException {
553
561
554
- logger .info ("configuring OCSP " );
562
+ logger .info ("configuring Revocation Check " );
555
563
556
- logger .debug ("enableOCSP : {}" , enableOCSP );
557
- if (!enableOCSP ) {
564
+ logger .debug ("enableCertificateCheck : {}" , enableRevocationCheck );
565
+ if (!enableRevocationCheck ) {
558
566
return ;
559
567
}
560
568
0 commit comments