use of java.security.cert.PKIXCertPathChecker in project XobotOS by xamarin.
the class RFC3280CertPathUtilities method wrapupCertF.
protected static void wrapupCertF(CertPath certPath, int index, List pathCheckers, Set criticalExtensions) throws CertPathValidatorException {
List certs = certPath.getCertificates();
X509Certificate cert = (X509Certificate) certs.get(index);
Iterator tmpIter;
tmpIter = pathCheckers.iterator();
while (tmpIter.hasNext()) {
try {
((PKIXCertPathChecker) tmpIter.next()).check(cert, criticalExtensions);
} catch (CertPathValidatorException e) {
throw new ExtCertPathValidatorException("Additional certificate path checker failed.", e, certPath, index);
}
}
if (!criticalExtensions.isEmpty()) {
throw new ExtCertPathValidatorException("Certificate has unsupported critical extension", null, certPath, index);
}
}
use of java.security.cert.PKIXCertPathChecker in project jdk8u_jdk by JetBrains.
the class ForwardState method initState.
/**
* Initialize the state.
*
* @param certPathCheckers the list of user-defined PKIXCertPathCheckers
*/
public void initState(List<PKIXCertPathChecker> certPathCheckers) throws CertPathValidatorException {
subjectNamesTraversed = new HashSet<GeneralNameInterface>();
traversedCACerts = 0;
/*
* Populate forwardCheckers with every user-defined checker
* that supports forward checking and initialize the forwardCheckers
*/
forwardCheckers = new ArrayList<PKIXCertPathChecker>();
for (PKIXCertPathChecker checker : certPathCheckers) {
if (checker.isForwardCheckingSupported()) {
checker.init(true);
forwardCheckers.add(checker);
}
}
init = true;
}
use of java.security.cert.PKIXCertPathChecker in project robovm by robovm.
the class PKIXCertPathCheckerTest method testInit.
public final void testInit() throws CertPathValidatorException {
PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
pc.init(true);
}
use of java.security.cert.PKIXCertPathChecker in project robovm by robovm.
the class PKIXCertPathCheckerTest method testClone.
public final void testClone() {
PKIXCertPathChecker pc1 = TestUtils.getTestCertPathChecker();
PKIXCertPathChecker pc2 = (PKIXCertPathChecker) pc1.clone();
assertNotSame("notSame", pc1, pc2);
}
use of java.security.cert.PKIXCertPathChecker in project robovm by robovm.
the class PKIXCertPathCheckerTest method testCheck.
public final void testCheck() throws CertPathValidatorException {
PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
pc.check(new MyCertificate("", null), new HashSet<String>());
}
Aggregations