-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling certificate verification using CRL-DP extension #1003
Merged
+79
−31
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
= Paramater Changes = | ||
|
||
== Rename enableOCSP to enableRevocationCheck == | ||
|
||
The `enableOCSP` param has been deprecated. Use `enableRevocationCheck` instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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() { | ||
|
@@ -269,7 +269,11 @@ public void loadJSSConfig(Properties config) { | |
|
||
String enableOCSPProp = config.getProperty("enableOCSP"); | ||
if (enableOCSPProp != null) | ||
setEnableOCSP(Boolean.parseBoolean(enableOCSPProp)); | ||
setEnableRevocationCheck(Boolean.parseBoolean(enableOCSPProp)); | ||
|
||
String enableRevocationCheckProp = config.getProperty("enableRevocationCheck"); | ||
if (enableRevocationCheckProp != null) | ||
setEnableRevocationCheck(Boolean.parseBoolean(enableRevocationCheckProp)); | ||
Comment on lines
+274
to
+276
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, we should also check |
||
|
||
String ocspResponderURLProp = config.getProperty("ocspResponderURL"); | ||
if (ocspResponderURLProp != null) | ||
|
@@ -328,31 +332,35 @@ public void loadTomcatConfig(Document document) throws XPathExpressionException | |
} | ||
|
||
String certDbProp = connector.getAttribute("certdbDir"); | ||
if (certDbProp != null) | ||
if (StringUtils.isNotEmpty(certDbProp)) | ||
setCertdbDir(certDbProp); | ||
|
||
String passwordClassProp = connector.getAttribute("passwordClass"); | ||
if (passwordClassProp != null) | ||
if (StringUtils.isNotEmpty(passwordClassProp)) | ||
setPasswordClass(passwordClassProp); | ||
|
||
String passwordFileProp = connector.getAttribute("passwordFile"); | ||
if (passwordFileProp != null) | ||
if (StringUtils.isNotEmpty(passwordFileProp)) | ||
setPasswordFile(passwordFileProp); | ||
|
||
String serverCertNickFileProp = connector.getAttribute("serverCertNickFile"); | ||
if (serverCertNickFileProp != null) | ||
if (StringUtils.isNotEmpty(serverCertNickFileProp)) | ||
setServerCertNickFile(serverCertNickFileProp); | ||
|
||
String enableOCSPProp = connector.getAttribute("enableOCSP"); | ||
if (enableOCSPProp != null) | ||
setEnableOCSP(Boolean.parseBoolean(enableOCSPProp)); | ||
if (StringUtils.isNotEmpty(enableOCSPProp)) | ||
setEnableRevocationCheck(Boolean.parseBoolean(enableOCSPProp)); | ||
|
||
String enableRevocationCheckProp = connector.getAttribute("enableRevocationCheck"); | ||
if (StringUtils.isNotEmpty(enableRevocationCheckProp)) | ||
setEnableRevocationCheck(Boolean.parseBoolean(enableRevocationCheckProp)); | ||
|
||
String ocspResponderURLProp = connector.getAttribute("ocspResponderURL"); | ||
if (ocspResponderURLProp != null) | ||
if (StringUtils.isNotEmpty(ocspResponderURLProp)) | ||
setOcspResponderURL(ocspResponderURLProp); | ||
|
||
String ocspResponderCertNicknameProp = connector.getAttribute("ocspResponderCertNickname"); | ||
if (ocspResponderCertNicknameProp != null) | ||
if (StringUtils.isNotEmpty(ocspResponderCertNicknameProp)) | ||
setOcspResponderCertNickname(ocspResponderCertNicknameProp); | ||
|
||
String ocspCacheSizeProp = connector.getAttribute("ocspCacheSize"); | ||
|
@@ -469,7 +477,7 @@ public void init() throws KeyDatabaseException, CertDatabaseException, GeneralSe | |
logger.debug("wantClientAuth: {}", wantClientAuth); | ||
|
||
if (requireClientAuth || wantClientAuth) { | ||
configureOCSP(); | ||
configureRevocationCheck(); | ||
} | ||
|
||
// 12 hours = 43200 seconds | ||
|
@@ -549,12 +557,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; | ||
} | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the following setting, it might help the reader to add a comment that says something like "/* if CRL-dp is present in the cert, disable CERT_REV_M_FAIL_ON_MISSING_FRESH_INFO for ocsp */
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment added to the if where the flag is modified