Class CertificateScopeOfUseExtension
- java.lang.Object
-
- org.mozilla.jss.netscape.security.x509.Extension
-
- org.mozilla.jss.netscape.security.extensions.CertificateScopeOfUseExtension
-
- All Implemented Interfaces:
java.io.Serializable
,CertAttrSet
public class CertificateScopeOfUseExtension extends Extension implements CertAttrSet
This represents the CertificateScopeOfUse extension as defined in draft-thayes-cert-scope-00 CertificateScopeEntry ::= SEQUENCE { name GeneralName, -- pattern, as for NameConstraints portNumber INTEGER OPTIONAL } CertificateScopeOfUse ::= SEQUENCE OF CertificateScopeEntry- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ObjectIdentifier
ID
static java.lang.String
NAME
static int[]
OID
-
Fields inherited from class org.mozilla.jss.netscape.security.x509.Extension
critical, extensionId, extensionValue
-
-
Constructor Summary
Constructors Constructor Description CertificateScopeOfUseExtension(boolean critical)
CertificateScopeOfUseExtension(boolean critical, java.util.Vector<CertificateScopeEntry> scopeEntries)
CertificateScopeOfUseExtension(java.lang.Boolean critical, java.lang.Object value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.java.util.Enumeration<java.lang.String>
getAttributeNames()
Return an enumeration of names of attributes existing within this attribute.java.util.Vector<CertificateScopeEntry>
getCertificateScopeEntries()
java.lang.String
getName()
Returns the name (identifier) of this CertAttrSet.void
set(java.lang.String name, java.lang.Object obj)
Sets extension attribute.java.lang.String
toString()
Returns a printable representation of the CertificateRenewalWindow.-
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
public static final int[] OID
-
ID
public static final ObjectIdentifier ID
-
-
Constructor Detail
-
CertificateScopeOfUseExtension
public CertificateScopeOfUseExtension(boolean critical, java.util.Vector<CertificateScopeEntry> scopeEntries) throws java.io.IOException
- Throws:
java.io.IOException
-
CertificateScopeOfUseExtension
public CertificateScopeOfUseExtension(boolean critical)
-
CertificateScopeOfUseExtension
public CertificateScopeOfUseExtension(java.lang.Boolean critical, java.lang.Object value) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:CertAttrSet
Returns the name (identifier) of this CertAttrSet.- Specified by:
getName
in interfaceCertAttrSet
- Returns:
- the name of this CertAttrSet.
-
getCertificateScopeEntries
public java.util.Vector<CertificateScopeEntry> getCertificateScopeEntries()
-
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.
-
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 CertificateRenewalWindow.- Specified by:
toString
in interfaceCertAttrSet
- Overrides:
toString
in classExtension
- Returns:
- value of this certificate attribute in printable form.
-
-