iaik.asn1.structures
Class PolicyMapping

java.lang.Object
  |
  +--iaik.asn1.structures.PolicyMapping
All Implemented Interfaces:
ASN1Type

public class PolicyMapping
extends Object
implements ASN1Type

This class implements a policy mapping as used by the X509v3 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);
 

Version:
File Revision 13
See Also:
PolicyMappings

Constructor Summary
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.
 
Method Summary
 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.
 String toString()
          Returns a string that represents the contents of PolicyMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PolicyMapping

public PolicyMapping()
Default constructor. Creates an empty PolicyMapping object. Implements the ASN1Type interface.

PolicyMapping

public PolicyMapping(ASN1Object obj)
              throws CodingException
Creates a policy mapping from an ASN1Object.

The given policy mapping ASN1Object is parsed for issuerDomainPolicy and subjectDomainPolicy object identifiers.

Parameters:
obj - the PolicyMapping as ASN1Object
Throws:
CodingException - if the given ASN1Object is not a PolicyMapping

PolicyMapping

public PolicyMapping(ObjectID issuerDomainPolicy,
                     ObjectID subjectDomainPolicy)
Creates a policy mapping from an issuerDomainPolicy and a 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);
 

Parameters:
issuer_domain_policy - the issuer domain policy object identifier
subject_domain_policy - the subject domain policy object identifier
Method Detail

toASN1Object

public ASN1Object toASN1Object()
Returns this policy mapping as (SEQUENCE) ASN1Object.
Specified by:
toASN1Object in interface ASN1Type
Returns:
this policy mapping as ASN1Object

decode

public void decode(ASN1Object obj)
            throws CodingException
Decodes a PolicyMapping from the given ASN1Object.

This method implements the ASN1Type interface. The given policy mapping ASN1Object is parsed for issuerDomainPolicy and subjectDomainPolicy object identifiers.

Specified by:
decode in interface ASN1Type
Parameters:
obj - the PolicyMapping as ASN1Object
Throws:
CodingException - if the given ASN1Object is not a PolicyMapping

getIssuerDomainPolicy

public ObjectID getIssuerDomainPolicy()
Returns the issuer domain policy.
Returns:
the issuer domain policy object identifier

getSubjectDomainPolicy

public ObjectID getSubjectDomainPolicy()
Returns the subject domain policy.
Returns:
the subject domain policy object identifier

toString

public String toString()
Returns a string that represents the contents of PolicyMapping
Overrides:
toString in class Object
Returns:
the string representation

This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK