iaik.asn1.structures
Class AccessDescription

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

public class AccessDescription
extends Object
implements ASN1Type

This class represents a AccessDescription to be used as parameter for creating a private internet extension of type "Authority Information Access".

ASN.1 definition:

 AuthorityInfoAccessSyntax  ::=
          SEQUENCE SIZE (1..MAX) OF AccessDescription
 AccessDescription  ::=  SEQUENCE {
          accessMethod          OBJECT IDENTIFIER,
          accessLocation        GeneralName  }
 

The PKIX profile already has defined two accessMethod OID, id-ad-caIssuers and id-ad-ocsp.
id-ad-caIssuers may be used when the additional information lists CAs that have issued certificates superior to the CA that issued the certificate containing this extension. The referenced CA Issuers description is intended to aid certificate users in the selection of a certification path that terminates at a point trusted by the certificate user.
id-as-ocsp may be used to indicate that revocation information for the certificate may be obtained by OCSP.

More information can be found in the X.509 Certificate and CRL profile presented in RFC 3280, section 4.2.2.1 "AuthorityInfoAccess".

When creating a AccessDescription, the accessMethod OID and the accessLocation GeneralName has to be specified, e.g.:

 GeneralName caCertURL = new GeneralName(GeneralName.uniformResourceIdentifier, "http://test.ca.com/cert/caCert.cer");
 AccessDescription ad = new AccessDescription(ObjectID.caIssuers, new GeneralName(caCertURL));
 
or
 GeneralName ocspURL = new GeneralName(GeneralName.uniformResourceIdentifier, "http://test.ca.com/ocsp");
 AccessDescription ad = new AccessDescription(ObjectID.ocsp, new GeneralName(ocspURL));
 

Version:
File Revision 12
See Also:
AuthorityInfoAccess

Constructor Summary
AccessDescription()
          Default constructor.
AccessDescription(ASN1Object obj)
          Creates a new AccessDescription from an ASN1Object.
AccessDescription(ObjectID accessMethod, GeneralName accessLocation)
          Creates a new AccessDescription from the given Oid and GeneralName.
 
Method Summary
 void decode(ASN1Object obj)
          Decodes the given ASN.1 AccessDescription object for parsing the internal structure.
 GeneralName getAccessLocation()
          Returns the access location.
 ObjectID getAccessMethod()
          Returns the access method OID.
 void setAccessLocation(GeneralName accessLocation)
          Sets the access location.
 void setAccessMethod(ObjectID accessMethod)
          Sets the access method OID.
 ASN1Object toASN1Object()
          Returns this AccessDescription as ASN1Object.
 String toString()
          Returns a string giving some information about this AccessDescription object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AccessDescription

public AccessDescription()
Default constructor. Creates an empty AccessDescription.

AccessDescription

public AccessDescription(ObjectID accessMethod,
                         GeneralName accessLocation)
                  throws IllegalArgumentException
Creates a new AccessDescription from the given Oid and GeneralName.

For instance:

 AccessDescription ad = new AccessDescription(ObjectID.caIssuers, new GeneralName(...));
 
Parameters:
accessMethod - the accessMethod OID
accessLocation - the accessLocation GeneralName
Throws:
InvalidArgumentException - if one of the arguments is null

AccessDescription

public AccessDescription(ASN1Object obj)
                  throws CodingException
Creates a new AccessDescription from an ASN1Object.

The ASN1Object supplied to this constructor represents an already exisiting AccessDescription object that may have been created by calling toASN1Object

Parameters:
obj - the AccessDescription as ASN1Object
Throws:
CodingException - if the object can not be parsed
Method Detail

decode

public void decode(ASN1Object obj)
            throws CodingException
Decodes the given ASN.1 AccessDescription object for parsing the internal structure.

Specified by:
decode in interface ASN1Type
Parameters:
obj - the AccessDescription as ASN1Object
Throws:
CodingException - if the object can not be parsed

toASN1Object

public ASN1Object toASN1Object()
                        throws CodingException
Returns this AccessDescription as ASN1Object.

The ASN1Object returned by this method may be used as parameter value when creating a AccessDescription object using the AccessDescription(ASN1Object obj) constructor.

Specified by:
toASN1Object in interface ASN1Type
Returns:
this AccessDescription as ASN1Object.

getAccessMethod

public ObjectID getAccessMethod()
Returns the access method OID.
Returns:
the access method OID or null if not set

getAccessLocation

public GeneralName getAccessLocation()
Returns the access location.
Returns:
the access location as GeneralName or null if not set

setAccessMethod

public void setAccessMethod(ObjectID accessMethod)
                     throws IllegalArgumentException
Sets the access method OID.
Parameters:
the - access method OID
Throws:
InvalidArgumentException - if the argument is null

setAccessLocation

public void setAccessLocation(GeneralName accessLocation)
                       throws IllegalArgumentException
Sets the access location.
Parameters:
the - access location as GeneralName
Throws:
InvalidArgumentException - if the argument is null

toString

public String toString()
Returns a string giving some information about this AccessDescription object.
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