Skip to content

Commit

Permalink
Rename enableOCSP to enableRevocationCheck
Browse files Browse the repository at this point in the history
Since verification with CRL-DP is introduced and it is enabled using
this parameter the name is modified to be not related only to OCSP.
  • Loading branch information
fmarco76 committed Apr 10, 2024
1 parent b8f1b44 commit 573ba47
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ public void setServerCertNickFile(String serverCertNickFile) {
tomcatjss.setServerCertNickFile(serverCertNickFile);
}

public boolean getEnabledOCSP() {
return tomcatjss.getEnableOCSP();
public boolean getEnableRevocationCheck() {
return tomcatjss.getEnableRevocationCheck();
}

public void setEnableOCSP(boolean enableOCSP) {
tomcatjss.setEnableOCSP(enableOCSP);
public void setEnableRevocationCheck(boolean enableRevocationCheck) {
tomcatjss.setEnableRevocationCheck(enableRevocationCheck);
}

public String getOcspResponderURL() {
Expand Down
32 changes: 16 additions & 16 deletions tomcat/src/main/java/org/dogtagpki/jss/tomcat/TomcatJSS.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class TomcatJSS implements SSLSocketListener {
boolean requireClientAuth;
boolean wantClientAuth;

boolean enableOCSP;
boolean enableRevocationCheck;
String ocspResponderURL;
String ocspResponderCertNickname;
int ocspCacheSize = 1000; // entries
Expand Down Expand Up @@ -183,12 +183,12 @@ public boolean getWantClientAuth() {
return wantClientAuth;
}

public boolean getEnableOCSP() {
return enableOCSP;
public boolean getEnableRevocationCheck() {
return enableRevocationCheck;
}

public void setEnableOCSP(boolean enableOCSP) {
this.enableOCSP = enableOCSP;
public void setEnableRevocationCheck(boolean enableRevocationCheck) {
this.enableRevocationCheck = enableRevocationCheck;
}

public String getOcspResponderURL() {
Expand Down Expand Up @@ -267,9 +267,9 @@ public void loadJSSConfig(Properties config) {
if (passwordFileProp != null)
setPasswordFile(passwordFileProp);

String enableOCSPProp = config.getProperty("enableOCSP");
if (enableOCSPProp != null)
setEnableOCSP(Boolean.parseBoolean(enableOCSPProp));
String enableRevocationCheckProp = config.getProperty("enableRevocationCheck");
if (enableRevocationCheckProp != null)
setEnableRevocationCheck(Boolean.parseBoolean(enableRevocationCheckProp));

String ocspResponderURLProp = config.getProperty("ocspResponderURL");
if (ocspResponderURLProp != null)
Expand Down Expand Up @@ -343,9 +343,9 @@ public void loadTomcatConfig(Document document) throws XPathExpressionException
if (serverCertNickFileProp != null)
setServerCertNickFile(serverCertNickFileProp);

String enableOCSPProp = connector.getAttribute("enableOCSP");
if (enableOCSPProp != null)
setEnableOCSP(Boolean.parseBoolean(enableOCSPProp));
String enableRevocationCheckProp = connector.getAttribute("enableRevocationCheck");
if (enableRevocationCheckProp != null)
setEnableRevocationCheck(Boolean.parseBoolean(enableRevocationCheckProp));

String ocspResponderURLProp = connector.getAttribute("ocspResponderURL");
if (ocspResponderURLProp != null)
Expand Down Expand Up @@ -469,7 +469,7 @@ public void init() throws KeyDatabaseException, CertDatabaseException, GeneralSe
logger.debug("wantClientAuth: {}", wantClientAuth);

if (requireClientAuth || wantClientAuth) {
configureOCSP();
configureRevocationCheck();
}

// 12 hours = 43200 seconds
Expand Down Expand Up @@ -549,12 +549,12 @@ public CryptoToken getToken(String tag) throws NoSuchTokenException {
return null;
}

public void configureOCSP() throws GeneralSecurityException, ConfigurationException {
public void configureRevocationCheck() throws GeneralSecurityException, ConfigurationException {

logger.info("configuring OCSP");
logger.info("configuring Revocation Check");

logger.debug("enableOCSP: {}", enableOCSP);
if (!enableOCSP) {
logger.debug("enableCertificateCheck: {}", enableRevocationCheck);
if (!enableRevocationCheck) {
return;
}

Expand Down

0 comments on commit 573ba47

Please sign in to comment.