Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CertificatePoliciesValidationBuilder.java « validations « path « cert « spongycastle « org « java « main « src « pkix - gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 44817b61ea78652f2290174d6af842da9d17c5e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package org.spongycastle.cert.path.validations;

import org.spongycastle.cert.path.CertPath;

public class CertificatePoliciesValidationBuilder
{
    private boolean isExplicitPolicyRequired;
    private boolean isAnyPolicyInhibited;
    private boolean isPolicyMappingInhibited;

    public void setAnyPolicyInhibited(boolean anyPolicyInhibited)
    {
        isAnyPolicyInhibited = anyPolicyInhibited;
    }

    public void setExplicitPolicyRequired(boolean explicitPolicyRequired)
    {
        isExplicitPolicyRequired = explicitPolicyRequired;
    }

    public void setPolicyMappingInhibited(boolean policyMappingInhibited)
    {
        isPolicyMappingInhibited = policyMappingInhibited;
    }

    public CertificatePoliciesValidation build(int pathLen)
    {
        return new CertificatePoliciesValidation(pathLen, isExplicitPolicyRequired, isAnyPolicyInhibited, isPolicyMappingInhibited);
    }

    public CertificatePoliciesValidation build(CertPath path)
    {
        return build(path.length());
    }
}