public abstract class InfoAccess extends V3Extension
AuthorityInfoAccess and
SubjectInfoAccess extensions.
The X.509 Certificate and CRL profile presented in RFC 3280 specifies the
AuthorityInfoAccess
extension for identifiying how to access CA
information and services for the issuer of the certificate in
which the extension appears. The SubjectInfoAccess extensions has been
introduced by RFC 3280 successordraft-ietf-pkix-new-part1-06.txt
for indicating how to access information and services for the subject of the
certificate in which the extension appears.
The ASN.1 syntax is almost identical:
AuthorityInfoAccessSyntax ::=
SEQUENCE SIZE (1..MAX) OF AccessDescription
AccessDescription ::= SEQUENCE {
accessMethod OBJECT IDENTIFIER,
accessLocation GeneralName }
respectively:
SubjectInfoAccessSyntax ::=
SEQUENCE SIZE (1..MAX) OF AccessDescription
AccessDescription ::= SEQUENCE {
accessMethod OBJECT IDENTIFIER,
accessLocation GeneralName }
This class provides the base functionality for setting/getting AccessDescription
terms for both, AuthorityInfoAccess
and SubjectInfoAccess extensions, e.g.:
ObjectID accessMethod = ObjectID.caIssuers; GeneralName accessLocation = ...; AccessDescription accessDescription = new AccessDescription(accessMethod, accessLocation); AuthorityInfoAccess authorityInfoAccess = new AuthorityInfoAccess(); authorityInfoAccess.addAccessDescription(accessDescription);
respectively:
ObjectID accessMethod = ObjectID.caRepository; GeneralName accessLocation = ...; AccessDescription accessDescription = new AccessDescription(accessMethod, accessLocation); SubjectInfoAccess subjectInfoAccess = new SubjectInfoAccess() subjectInfoAccess.addAccessDescription(accessDescription);
Any further access description can be added by using the addAccessDescription method:
authorityInfoAccess.addAccessDescription(...); ...For adding a
AuthorityInfoAccess/SubjectInfoAccess extension object to a X509Certificate, use
the addExtension method of the X509Certificate
class:
X505Certificate cert = new X509Certificate(); ... cert.addExtension(authorityInfoAccess);
AccessDescription,
GeneralName,
ObjectID,
V3Extension,
X509Extensions,
X509Certificate,
AuthorityInfoAccess,
SubjectInfoAccesscritical| Constructor and Description |
|---|
InfoAccess()
Default constructor.
|
InfoAccess(AccessDescription accessDescription)
Creates an
InfoAccess object and adds a AccessDescription. |
| Modifier and Type | Method and Description |
|---|---|
void |
addAccessDescription(AccessDescription accessDescription)
Adds a accessDescription to this
InfoAccess
extension. |
java.util.Enumeration |
getAccessDescriptions()
Returns an enumeration of the access descriptions included into this
InfoAccess object. |
void |
init(ASN1Object obj)
Inits this
InfoAccess implementation with an ASN1object
representing the value of this extension. |
void |
removeAllAccessDescriptions()
Removes all access descriptions from this
InfoAccess
extension. |
ASN1Object |
toASN1Object()
Returns an ASN1Object representing the value of this
InfoAccess
object. |
java.lang.String |
toString()
Returns a string that represents the contents of
this
InfoAccess object. |
getName, getObjectID, hashCode, isCritical, setCriticalpublic InfoAccess()
InfoAccess object.
For adding a access description use the addAccessDescription method. Any AccessDescription to be
added has to be of type iaik.asn1.structures.AccessDescription, e.g.:
ObjectID accessMethod = ObjectID.caIssuers; GeneralName accessLocation = ...; AccessDescription accessDescription = new AccessDescription(accessMethod, accessLocation); AuthorityInfoAccess authorityInfoAccess = new AuthorityInfoAccess(); authorityInfoAccess.addAccessDescription(accessDescription); ...
AccessDescriptionpublic InfoAccess(AccessDescription accessDescription) throws java.lang.IllegalArgumentException
InfoAccess object and adds a AccessDescription.
The AccessDescription to be added has to be of type
iaik.asn1.structures.AccessDescription, e.g.:
ObjectID accessMethod = ObjectID.caIssuers; GeneralName accessLocation = ...; AccessDescription accessDescription = new AccessDescription(accessMethod, accessLocation); AuthorityInfoAccess authorityInfoAccess = new AuthorityInfoAccess(accessDescription); ...
accessDescription - the AccessDescription to addjava.lang.IllegalArgumentException - if a null object is suppliedAccessDescriptionpublic void init(ASN1Object obj) throws X509ExtensionException
InfoAccess implementation with an ASN1object
representing the value of this extension.
The given ASN1Object consits of a Sequence of access descriptions included in
the InfoAccess object.
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
AuthorityInfoAccess/SubjectInfoAcsess 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 InfoAccess as ASN1ObjectX509ExtensionException - if the extension could not be parsedpublic ASN1Object toASN1Object() throws X509ExtensionException
InfoAccess
object.
The ASN1Object is an ASN.1 Sequence including any access description that has been
added to this InfoAccess object.
toASN1Object in class V3ExtensionInfoAccess as ASN1ObjectX509ExtensionException - if the extension could not be createdpublic void addAccessDescription(AccessDescription accessDescription) throws java.lang.IllegalArgumentException
InfoAccess
extension.
The accessDescription to be added has to be of type
iaik.asn1.structures.AccessDescription, e.g.:
ObjectID accessMethod = ObjectID.caIssuers; GeneralName accessLocation = ...; AccessDescription accessDescription = new AccessDescription(accessMethod, accessLocation); AuthorityInfoAccess authorityInfoAccess = new AuthorityInfoAccess(); authorityInfoAccess.addAccessDescription(accessDescription); ...
accessDescription - the access description to addjava.lang.IllegalArgumentException - if a null object is suppliedAccessDescriptionpublic void removeAllAccessDescriptions()
InfoAccess
extension.public java.util.Enumeration getAccessDescriptions()
InfoAccess object.public java.lang.String toString()
InfoAccess object.toString in class java.lang.Object