mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Java: Improved the query for disabled certificate revocation checking
- Added a taint propagation step for List.of() methods - Added a testcase with one of the List.of() method - Simplified conditions - Fixed typos
This commit is contained in:
@@ -47,7 +47,7 @@ public class DisabledRevocationChecking {
|
||||
validator.validate(certPath, params);
|
||||
}
|
||||
|
||||
public void testSettingRevocationCheckerWithList(KeyStore cacerts, CertPath certPath) throws Exception {
|
||||
public void testSettingRevocationCheckerWithAddingToArrayList(KeyStore cacerts, CertPath certPath) throws Exception {
|
||||
CertPathValidator validator = CertPathValidator.getInstance("PKIX");
|
||||
PKIXParameters params = new PKIXParameters(cacerts);
|
||||
params.setRevocationEnabled(false);
|
||||
@@ -58,6 +58,16 @@ public class DisabledRevocationChecking {
|
||||
validator.validate(certPath, params);
|
||||
}
|
||||
|
||||
public void testSettingRevocationCheckerWithListOf(KeyStore cacerts, CertPath certPath) throws Exception {
|
||||
CertPathValidator validator = CertPathValidator.getInstance("PKIX");
|
||||
PKIXParameters params = new PKIXParameters(cacerts);
|
||||
params.setRevocationEnabled(false);
|
||||
PKIXRevocationChecker checker = (PKIXRevocationChecker) validator.getRevocationChecker();
|
||||
List<PKIXCertPathChecker> checkers = List.of(checker);
|
||||
params.setCertPathCheckers(checkers);
|
||||
validator.validate(certPath, params);
|
||||
}
|
||||
|
||||
public void testAddingRevocationChecker(KeyStore cacerts, CertPath certPath) throws Exception {
|
||||
CertPathValidator validator = CertPathValidator.getInstance("PKIX");
|
||||
PKIXParameters params = new PKIXParameters(cacerts);
|
||||
|
||||
Reference in New Issue
Block a user