Java Code Examples for sun.security.provider.certpath.PKIX.BuilderParams#maxPathLength()
The following examples show how to use
sun.security.provider.certpath.PKIX.BuilderParams#maxPathLength() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ReverseState.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Initialize the state. * * @param buildParams builder parameters */ public void initState(BuilderParams buildParams) throws CertPathValidatorException { /* * Initialize number of remainingCACerts. * Note that -1 maxPathLen implies unlimited. * 0 implies only an EE cert is acceptable. */ int maxPathLen = buildParams.maxPathLength(); remainingCACerts = (maxPathLen == -1) ? Integer.MAX_VALUE : maxPathLen; /* Initialize explicit policy state variable */ if (buildParams.explicitPolicyRequired()) { explicitPolicy = 0; } else { // unconstrained if maxPathLen is -1, // otherwise, we want to initialize this to the value of the // longest possible path + 1 (i.e. maxpathlen + finalcert + 1) explicitPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize policy mapping state variable */ if (buildParams.policyMappingInhibited()) { policyMapping = 0; } else { policyMapping = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize inhibit any policy state variable */ if (buildParams.anyPolicyInhibited()) { inhibitAnyPolicy = 0; } else { inhibitAnyPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize certIndex */ certIndex = 1; /* Initialize policy tree */ Set<String> initExpPolSet = new HashSet<>(1); initExpPolSet.add(PolicyChecker.ANY_POLICY); rootNode = new PolicyNodeImpl(null, PolicyChecker.ANY_POLICY, null, false, initExpPolSet, false); /* * Initialize each user-defined checker * Shallow copy the checkers */ userCheckers = new ArrayList<>(buildParams.certPathCheckers()); /* initialize each checker (just in case) */ for (PKIXCertPathChecker checker : userCheckers) { checker.init(false); } /* Start by trusting the cert to sign CRLs */ crlSign = true; init = true; }
Example 2
Source File: ReverseState.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Initialize the state. * * @param buildParams builder parameters */ public void initState(BuilderParams buildParams) throws CertPathValidatorException { /* * Initialize number of remainingCACerts. * Note that -1 maxPathLen implies unlimited. * 0 implies only an EE cert is acceptable. */ int maxPathLen = buildParams.maxPathLength(); remainingCACerts = (maxPathLen == -1) ? Integer.MAX_VALUE : maxPathLen; /* Initialize explicit policy state variable */ if (buildParams.explicitPolicyRequired()) { explicitPolicy = 0; } else { // unconstrained if maxPathLen is -1, // otherwise, we want to initialize this to the value of the // longest possible path + 1 (i.e. maxpathlen + finalcert + 1) explicitPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize policy mapping state variable */ if (buildParams.policyMappingInhibited()) { policyMapping = 0; } else { policyMapping = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize inhibit any policy state variable */ if (buildParams.anyPolicyInhibited()) { inhibitAnyPolicy = 0; } else { inhibitAnyPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize certIndex */ certIndex = 1; /* Initialize policy tree */ Set<String> initExpPolSet = new HashSet<>(1); initExpPolSet.add(PolicyChecker.ANY_POLICY); rootNode = new PolicyNodeImpl(null, PolicyChecker.ANY_POLICY, null, false, initExpPolSet, false); /* * Initialize each user-defined checker * Shallow copy the checkers */ userCheckers = new ArrayList<>(buildParams.certPathCheckers()); /* initialize each checker (just in case) */ for (PKIXCertPathChecker checker : userCheckers) { checker.init(false); } /* Start by trusting the cert to sign CRLs */ crlSign = true; init = true; }
Example 3
Source File: ReverseState.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Initialize the state. * * @param buildParams builder parameters */ public void initState(BuilderParams buildParams) throws CertPathValidatorException { /* * Initialize number of remainingCACerts. * Note that -1 maxPathLen implies unlimited. * 0 implies only an EE cert is acceptable. */ int maxPathLen = buildParams.maxPathLength(); remainingCACerts = (maxPathLen == -1) ? Integer.MAX_VALUE : maxPathLen; /* Initialize explicit policy state variable */ if (buildParams.explicitPolicyRequired()) { explicitPolicy = 0; } else { // unconstrained if maxPathLen is -1, // otherwise, we want to initialize this to the value of the // longest possible path + 1 (i.e. maxpathlen + finalcert + 1) explicitPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize policy mapping state variable */ if (buildParams.policyMappingInhibited()) { policyMapping = 0; } else { policyMapping = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize inhibit any policy state variable */ if (buildParams.anyPolicyInhibited()) { inhibitAnyPolicy = 0; } else { inhibitAnyPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize certIndex */ certIndex = 1; /* Initialize policy tree */ Set<String> initExpPolSet = new HashSet<>(1); initExpPolSet.add(PolicyChecker.ANY_POLICY); rootNode = new PolicyNodeImpl(null, PolicyChecker.ANY_POLICY, null, false, initExpPolSet, false); /* * Initialize each user-defined checker * Shallow copy the checkers */ userCheckers = new ArrayList<>(buildParams.certPathCheckers()); /* initialize each checker (just in case) */ for (PKIXCertPathChecker checker : userCheckers) { checker.init(false); } /* Start by trusting the cert to sign CRLs */ crlSign = true; init = true; }
Example 4
Source File: ReverseState.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
/** * Initialize the state. * * @param buildParams builder parameters */ public void initState(BuilderParams buildParams) throws CertPathValidatorException { /* * Initialize number of remainingCACerts. * Note that -1 maxPathLen implies unlimited. * 0 implies only an EE cert is acceptable. */ int maxPathLen = buildParams.maxPathLength(); remainingCACerts = (maxPathLen == -1) ? Integer.MAX_VALUE : maxPathLen; /* Initialize explicit policy state variable */ if (buildParams.explicitPolicyRequired()) { explicitPolicy = 0; } else { // unconstrained if maxPathLen is -1, // otherwise, we want to initialize this to the value of the // longest possible path + 1 (i.e. maxpathlen + finalcert + 1) explicitPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize policy mapping state variable */ if (buildParams.policyMappingInhibited()) { policyMapping = 0; } else { policyMapping = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize inhibit any policy state variable */ if (buildParams.anyPolicyInhibited()) { inhibitAnyPolicy = 0; } else { inhibitAnyPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize certIndex */ certIndex = 1; /* Initialize policy tree */ Set<String> initExpPolSet = new HashSet<>(1); initExpPolSet.add(PolicyChecker.ANY_POLICY); rootNode = new PolicyNodeImpl(null, PolicyChecker.ANY_POLICY, null, false, initExpPolSet, false); /* * Initialize each user-defined checker * Shallow copy the checkers */ userCheckers = new ArrayList<>(buildParams.certPathCheckers()); /* initialize each checker (just in case) */ for (PKIXCertPathChecker checker : userCheckers) { checker.init(false); } /* Start by trusting the cert to sign CRLs */ crlSign = true; init = true; }
Example 5
Source File: ReverseState.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
/** * Initialize the state. * * @param buildParams builder parameters */ public void initState(BuilderParams buildParams) throws CertPathValidatorException { /* * Initialize number of remainingCACerts. * Note that -1 maxPathLen implies unlimited. * 0 implies only an EE cert is acceptable. */ int maxPathLen = buildParams.maxPathLength(); remainingCACerts = (maxPathLen == -1) ? Integer.MAX_VALUE : maxPathLen; /* Initialize explicit policy state variable */ if (buildParams.explicitPolicyRequired()) { explicitPolicy = 0; } else { // unconstrained if maxPathLen is -1, // otherwise, we want to initialize this to the value of the // longest possible path + 1 (i.e. maxpathlen + finalcert + 1) explicitPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize policy mapping state variable */ if (buildParams.policyMappingInhibited()) { policyMapping = 0; } else { policyMapping = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize inhibit any policy state variable */ if (buildParams.anyPolicyInhibited()) { inhibitAnyPolicy = 0; } else { inhibitAnyPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize certIndex */ certIndex = 1; /* Initialize policy tree */ Set<String> initExpPolSet = new HashSet<>(1); initExpPolSet.add(PolicyChecker.ANY_POLICY); rootNode = new PolicyNodeImpl(null, PolicyChecker.ANY_POLICY, null, false, initExpPolSet, false); /* * Initialize each user-defined checker * Shallow copy the checkers */ userCheckers = new ArrayList<>(buildParams.certPathCheckers()); /* initialize each checker (just in case) */ for (PKIXCertPathChecker checker : userCheckers) { checker.init(false); } /* Start by trusting the cert to sign CRLs */ crlSign = true; init = true; }
Example 6
Source File: ReverseState.java From j2objc with Apache License 2.0 | 4 votes |
/** * Initialize the state. * * @param buildParams builder parameters */ public void initState(BuilderParams buildParams) throws CertPathValidatorException { /* * Initialize number of remainingCACerts. * Note that -1 maxPathLen implies unlimited. * 0 implies only an EE cert is acceptable. */ int maxPathLen = buildParams.maxPathLength(); remainingCACerts = (maxPathLen == -1) ? Integer.MAX_VALUE : maxPathLen; /* Initialize explicit policy state variable */ if (buildParams.explicitPolicyRequired()) { explicitPolicy = 0; } else { // unconstrained if maxPathLen is -1, // otherwise, we want to initialize this to the value of the // longest possible path + 1 (i.e. maxpathlen + finalcert + 1) explicitPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize policy mapping state variable */ if (buildParams.policyMappingInhibited()) { policyMapping = 0; } else { policyMapping = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize inhibit any policy state variable */ if (buildParams.anyPolicyInhibited()) { inhibitAnyPolicy = 0; } else { inhibitAnyPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2; } /* Initialize certIndex */ certIndex = 1; /* Initialize policy tree */ Set<String> initExpPolSet = new HashSet<>(1); initExpPolSet.add(PolicyChecker.ANY_POLICY); rootNode = new PolicyNodeImpl(null, PolicyChecker.ANY_POLICY, null, false, initExpPolSet, false); /* * Initialize each user-defined checker * Shallow copy the checkers */ userCheckers = new ArrayList<>(buildParams.certPathCheckers()); /* initialize each checker (just in case) */ for (PKIXCertPathChecker checker : userCheckers) { checker.init(false); } /* Start by trusting the cert to sign CRLs */ crlSign = true; init = true; }