public class AccessDescription extends java.lang.Object implements ASN1Type
ASN.1 definition:
AuthorityInfoAccessSyntax ::=
SEQUENCE SIZE (1..MAX) OF AccessDescription
AccessDescription ::= SEQUENCE {
accessMethod OBJECT IDENTIFIER,
accessLocation GeneralName }
The PKIX profile already has defined one accessMethod OID, id-ad-caIssuers to 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.
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.:
AccessDescription ad = new AccessDescription(ObjectID.caIssuers, new GeneralName(...));
AuthorityInfoAccess| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
java.lang.String |
toString()
Returns a string giving some information
about this
AccessDescription object. |
public AccessDescription()
public AccessDescription(ObjectID accessMethod, GeneralName accessLocation) throws java.lang.IllegalArgumentException
For instance:
AccessDescription ad = new AccessDescription(ObjectID.caIssuers, new GeneralName(...));
accessMethod - the accessMethod OIDaccessLocation - the accessLocation GeneralNameInvalidArgumentException - if one of the arguments is nulljava.lang.IllegalArgumentExceptionpublic AccessDescription(ASN1Object obj) throws CodingException
AccessDescription from an ASN1Object.
The ASN1Object supplied to this constructor represents an
already exisiting AccessDescription object that may
have been created by calling toASN1Object
obj - the AccessDescription as ASN1ObjectCodingException - if the object can not be parsedpublic void decode(ASN1Object obj) throws CodingException
AccessDescription object for parsing
the internal structure.
decode in interface ASN1Typeobj - the AccessDescription as ASN1ObjectCodingException - if the object can not be parsedpublic ASN1Object toASN1Object() throws CodingException
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.
toASN1Object in interface ASN1TypeAccessDescription as ASN1Object.CodingException - if an de/encoding error occurspublic ObjectID getAccessMethod()
null if not setpublic GeneralName getAccessLocation()
null if not setpublic void setAccessMethod(ObjectID accessMethod) throws java.lang.IllegalArgumentException
the - access method OIDInvalidArgumentException - if the argument is nulljava.lang.IllegalArgumentExceptionpublic void setAccessLocation(GeneralName accessLocation) throws java.lang.IllegalArgumentException
the - access location as GeneralNameInvalidArgumentException - if the argument is nulljava.lang.IllegalArgumentExceptionpublic java.lang.String toString()
AccessDescription object.toString in class java.lang.Object