|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--iaik.x509.V3Extension
|
+--iaik.x509.extensions.PolicyMappings
This class implements the PolicyMappings Extension.
The PolicyMappings extension is a non critical standard X509v3
extension for being used in CA certificates.
Each extension is associated with a specific certificateExtension
object identifier, derived from:
certificateExtension OBJECT IDENTIFIER ::=
{joint-iso-ccitt(2) ds(5) 29}
id-ce OBJECT IDENTIFIER ::= certificateExtension
The object identifier for the PolicyMappings extension
is defined as:
id-ce-policyMappings OBJECT IDENTIFIER ::= { id-ce 33 }
which corresponds to the OID string "2.5.29.33".
The X.509 Certificate and CRL profile presented in RFC 2459 specifies the policy mappings extension to be used within CA certificates for listing one or more pairs of object identifiers, each of them including an issuerDomainPolicy and a subjectDomainPolicy. The pairing indicates the issuing CA considers its issuerDomainPolicy equivalent to the subject CA's subjectDomainPolicy.
The issuing CA's users may accept an issuerDomainPolicy for certain applications. The policy mapping tells the issuing CA's users which policies associated with the subject CA are comparable to the policy they accept.
ASN.1 definition:
PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE {
issuerDomainPolicy CertPolicyId,
subjectDomainPolicy CertPolicyId }
CertPolicyId ::= OBJECT IDENTIFIER
More information can be found in RFC 2459, section 4.2.1.6 "Policy Mappings".
This class only provides one constructor, the empty default constructor for creating
a PolicyMappings extension. Particular issuerDomainPolicy - subjectDomainPolicy
pairs can be added by using the addMapping(PolicyMapping policyMapping)
method, where the supplied parameter value
has to be of type iaik.asn1.structures.PolicyMapping, 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 policyMaps = new PolicyMappings();
policyMaps.addMapping(policyMap);
For adding a PolicyMappings extension object to a X509Certificate, use
the addExtension method of the iaik.x509.X509Certificate class:
X505Certificate cert = new X509Certificate(); ... cert.addExtension(policyMaps);
PolicyMapping,
ObjectID,
V3Extension,
X509Extensions,
X509Certificate| Field Summary | |
static ObjectID |
oid
The object identifier of this PolicyMappings extension.
|
| Fields inherited from class iaik.x509.V3Extension |
critical |
| Constructor Summary | |
PolicyMappings()
Default constructor. |
|
| Method Summary | |
void |
addMapping(PolicyMapping policyMapping)
Adds one mapping of type iaik.asn1.structures.PolicyMapping representing an
an issuerDomainPolicy - subjectDomainPolicy pair.
|
PolicyMapping[] |
getMappings()
Returns the policy mappings this extension contains. |
ObjectID |
getObjectID()
Returns the object ID of this PolicyMappings extension |
int |
hashCode()
Returns a hashcode for this identity. |
void |
init(ASN1Object obj)
Inits this PolicyMappings implementation with an ASN1object
representing the value of this extension.
|
ASN1Object |
toASN1Object()
Returns an ASN1Object representing the value of this PolicyMappings
extension object.
|
String |
toString()
Returns a string that represents the contents of this PolicyMappings
extension. |
| Methods inherited from class iaik.x509.V3Extension |
getName, isCritical, setCritical |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final ObjectID oid
PolicyMappings extension.
The corresponding OID string is "2.5.29.33".| Constructor Detail |
public PolicyMappings()
Creates an empty PolicyMappings object.
Use addMapping for adding some policy mapping
of type PolicyMapping representing an
an issuerDomainPolicy - subjectDomainPolicy pair, e.g:
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 policyMaps = new PolicyMappings();
policyMaps.addMapping(policyMap);
| Method Detail |
public void addMapping(PolicyMapping policyMapping)
iaik.asn1.structures.PolicyMapping representing an
an issuerDomainPolicy - subjectDomainPolicy pair.
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);
PolicyMappings policyMaps = new PolicyMappings();
policyMaps.addMapping(policyMap);
policyMapping - the policy mapping to addPolicyMappingpublic PolicyMapping[] getMappings()
This method returns an array of iaik.asn1.structures.PolicyMapping objects:
PolicyMapping[] policyMapping = policyMaps.getMappings();
public ASN1Object toASN1Object()
throws X509ExtensionException
PolicyMappings
extension object.
The returned ASN1Object represents a sequence of PolicyMapping pairs:
PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE {
issuerDomainPolicy CertPolicyId,
subjectDomainPolicy CertPolicyId }
toASN1Object in class V3ExtensionPolicyMappings as ASN1Object
public void init(ASN1Object obj)
throws X509ExtensionException
PolicyMappings implementation with an ASN1object
representing the value of this extension.
The given ASN1Object represents a sequence of PolicyMapping pairs.
The given ASN1Object is the one created by toASN1Object().
This method is used by the X509Extensions class when parsing the ASN.1 representation
of a certificate for properly initializing an included
PolicyMappings extension. This method initializes the
extension only with its value, but not with its critical
specification. For that reason, this method shall not be
explicitly called by an application.
init in class V3Extensionobj - the PolicyMappings as ASN1ObjectX509ExtensionException - if the extension could not be parsedpublic int hashCode()
hashCode in class V3Extensionpublic ObjectID getObjectID()
PolicyMappings extensiongetObjectID in class V3Extensionpublic String toString()
PolicyMappings
extension.toString in class Object
|
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). | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK