Class SubjectInfoAccessExtension
- java.lang.Object
-
- org.mozilla.jss.netscape.security.x509.Extension
-
- org.mozilla.jss.netscape.security.extensions.SubjectInfoAccessExtension
-
- All Implemented Interfaces:
java.io.Serializable
,CertAttrSet
public class SubjectInfoAccessExtension extends Extension implements CertAttrSet
This represents the subject information access extension as defined in RFC3280.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ObjectIdentifier
ID
static ObjectIdentifier
METHOD_CA_ISSUERS
static ObjectIdentifier
METHOD_OCSP
static java.lang.String
NAME
static int[]
OID
static int[]
OID_CA_ISSUERS
static int[]
OID_OCSP
-
Fields inherited from class org.mozilla.jss.netscape.security.x509.Extension
critical, extensionId, extensionValue
-
-
Constructor Summary
Constructors Constructor Description SubjectInfoAccessExtension(boolean critical)
Create the extension from the passed DER encoded value of the same.SubjectInfoAccessExtension(java.lang.Boolean critical, java.lang.Object value)
Create the extension from the passed DER encoded value of the same.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAccessDescription(ObjectIdentifier method, GeneralName gn)
Adds Access Description.void
decode(java.io.InputStream in)
Decodes this extension.void
delete(java.lang.String name)
Deletes attribute.void
encode(java.io.OutputStream out)
Write the extension to the DerOutputStream.java.lang.Object
get(java.lang.String name)
Retrieves extension attribute.AccessDescription
getAccessDescription(int pos)
java.util.Enumeration<java.lang.String>
getAttributeNames()
Return an enumeration of names of attributes existing within this attribute.java.lang.String
getName()
Return the name of this attribute.static void
main(java.lang.String[] argv)
int
numberOfAccessDescription()
Returns the number of access description.void
set(java.lang.String name, java.lang.Object obj)
Sets extension attribute.java.lang.String
toString()
Returns a printable representation of the AuthInfoAccess.-
Methods inherited from class org.mozilla.jss.netscape.security.x509.Extension
clearValue, encode, getExtensionId, getExtensionValue, isCritical, setCritical, setExtensionId, setExtensionValue
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
OID_OCSP
public static final int[] OID_OCSP
-
METHOD_OCSP
public static final ObjectIdentifier METHOD_OCSP
-
OID_CA_ISSUERS
public static final int[] OID_CA_ISSUERS
-
METHOD_CA_ISSUERS
public static final ObjectIdentifier METHOD_CA_ISSUERS
-
OID
public static final int[] OID
-
ID
public static final ObjectIdentifier ID
-
-
Constructor Detail
-
SubjectInfoAccessExtension
public SubjectInfoAccessExtension(boolean critical)
Create the extension from the passed DER encoded value of the same.- Parameters:
critical
- true if the extension is to be treated as critical.
-
SubjectInfoAccessExtension
public SubjectInfoAccessExtension(java.lang.Boolean critical, java.lang.Object value) throws java.io.IOException
Create the extension from the passed DER encoded value of the same.- Parameters:
critical
- true if the extension is to be treated as critical.value
- Array of DER encoded bytes of the actual value.- Throws:
java.io.IOException
- on error.
-
-
Method Detail
-
set
public void set(java.lang.String name, java.lang.Object obj) throws java.security.cert.CertificateException
Sets extension attribute.- Specified by:
set
in interfaceCertAttrSet
- Parameters:
name
- the name of the attribute (e.g. "x509.info.key")obj
- the attribute object.- Throws:
java.security.cert.CertificateException
- on attribute handling errors.
-
get
public java.lang.Object get(java.lang.String name) throws java.security.cert.CertificateException
Retrieves extension attribute.- Specified by:
get
in interfaceCertAttrSet
- Parameters:
name
- the name of the attribute to return.- Throws:
java.security.cert.CertificateException
- on attribute handling errors.
-
delete
public void delete(java.lang.String name) throws java.security.cert.CertificateException
Deletes attribute.- Specified by:
delete
in interfaceCertAttrSet
- Parameters:
name
- the name of the attribute to delete.- Throws:
java.security.cert.CertificateException
- on attribute handling errors.
-
decode
public void decode(java.io.InputStream in) throws java.io.IOException
Decodes this extension.- Specified by:
decode
in interfaceCertAttrSet
- Parameters:
in
- the InputStream to read the encoded attribute from.- Throws:
java.io.IOException
- on other errors.
-
getAttributeNames
public java.util.Enumeration<java.lang.String> getAttributeNames()
Return an enumeration of names of attributes existing within this attribute.- Specified by:
getAttributeNames
in interfaceCertAttrSet
- Returns:
- an enumeration of the attribute names.
-
getName
public java.lang.String getName()
Return the name of this attribute.- Specified by:
getName
in interfaceCertAttrSet
- Returns:
- the name of this CertAttrSet.
-
addAccessDescription
public void addAccessDescription(ObjectIdentifier method, GeneralName gn)
Adds Access Description.
-
getAccessDescription
public AccessDescription getAccessDescription(int pos)
-
numberOfAccessDescription
public int numberOfAccessDescription()
Returns the number of access description.
-
encode
public void encode(java.io.OutputStream out) throws java.io.IOException
Write the extension to the DerOutputStream.- Specified by:
encode
in interfaceCertAttrSet
- Parameters:
out
- the DerOutputStream to write the extension to.- Throws:
java.io.IOException
- on encoding errors.
-
toString
public java.lang.String toString()
Returns a printable representation of the AuthInfoAccess.- Specified by:
toString
in interfaceCertAttrSet
- Overrides:
toString
in classExtension
- Returns:
- value of this certificate attribute in printable form.
-
main
public static void main(java.lang.String[] argv)
-
-