public class PolicyMapping extends java.lang.Object implements ASN1Type
PolicyMappings
extenscion to be included into CA certificates.
A policy mapping is a pair of object identifiers specifying an issuerDomainPolicy and a subjectDomainPolicy for indicating that the issuing CA considers its issuerDomainPolicy equivalent to the subject CA's subjectDomainPolicy.
The PolicyMappings
extension is defined as sequence of such policy
mapping pairs:
PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE { issuerDomainPolicy CertPolicyId, subjectDomainPolicy CertPolicyId }
CertPolicyId ::= OBJECT IDENTIFIER
When creating a PolicyMapping
object to be used for the PolicyMappings
extension, specify
issuerDomainPolicy and subjectDomainPolicy as ObjectID
instances, e.g.:
ObjectID iaikPolicy1 = new ObjectID("1.2.3.4.5.1", "iaikPolicy1"); ObjectID iaikPolicy2 = new ObjectID("1.2.3.4.5.2", "iaikPolicy2"); PolicyMapping policyMap = new PolicyMapping(iaikPolicy1, iaikPolicy2);
PolicyMappings
Constructor and Description |
---|
PolicyMapping()
Default constructor.
|
PolicyMapping(ASN1Object obj)
Creates a policy mapping from an ASN1Object.
|
PolicyMapping(ObjectID issuerDomainPolicy,
ObjectID subjectDomainPolicy)
Creates a policy mapping from an issuerDomainPolicy and a subjectDomainPolicy.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(ASN1Object obj)
Decodes a PolicyMapping from the given ASN1Object.
|
ObjectID |
getIssuerDomainPolicy()
Returns the issuer domain policy.
|
ObjectID |
getSubjectDomainPolicy()
Returns the subject domain policy.
|
ASN1Object |
toASN1Object()
Returns this policy mapping as (SEQUENCE) ASN1Object.
|
java.lang.String |
toString()
Returns a string that represents the contents of
PolicyMapping |
public PolicyMapping()
PolicyMapping
object.
Implements the ASN1Type interface.public PolicyMapping(ASN1Object obj) throws CodingException
The given policy mapping ASN1Object is parsed for issuerDomainPolicy and subjectDomainPolicy object identifiers.
obj
- the PolicyMapping as ASN1ObjectCodingException
- if the given ASN1Object is not a PolicyMappingpublic PolicyMapping(ObjectID issuerDomainPolicy, ObjectID subjectDomainPolicy)
For instance:
ObjectID iaikPolicy1 = new ObjectID("1.2.3.4.5.1", "iaikPolicy1"); ObjectID iaikPolicy2 = new ObjectID("1.2.3.4.5.2", "iaikPolicy2"); PolicyMapping policyMap = new PolicyMapping(iaikPolicy1, iaikPolicy2);
issuerDomainPolicy
- the issuer domain policy object identifiersubjectDomainPolicy
- the subject domain policy object identifierpublic ASN1Object toASN1Object()
toASN1Object
in interface ASN1Type
public void decode(ASN1Object obj) throws CodingException
This method implements the ASN1Type
interface.
The given policy mapping ASN1Object is parsed for issuerDomainPolicy
and subjectDomainPolicy object identifiers.
decode
in interface ASN1Type
obj
- the PolicyMapping as ASN1ObjectCodingException
- if the given ASN1Object is not a PolicyMappingpublic ObjectID getIssuerDomainPolicy()
public ObjectID getSubjectDomainPolicy()
public java.lang.String toString()
PolicyMapping
toString
in class java.lang.Object