Class ExtendedKeyUsageExtension
- java.lang.Object
-
- org.mozilla.jss.netscape.security.x509.Extension
-
- org.mozilla.jss.netscape.security.extensions.ExtendedKeyUsageExtension
-
- All Implemented Interfaces:
java.io.Serializable,CertAttrSet
public class ExtendedKeyUsageExtension extends Extension implements CertAttrSet
This represents the extended key usage extension.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMEstatic java.lang.StringOIDstatic ObjectIdentifierOID_CODE_SIGNINGstatic int[]OID_CODE_SIGNING_STRstatic java.lang.StringOID_CODESigningstatic ObjectIdentifierOID_OCSP_SIGNINGstatic int[]OID_OCSP_SIGNING_STRstatic java.lang.StringOID_OCSPSigning-
Fields inherited from class org.mozilla.jss.netscape.security.x509.Extension
critical, extensionId, extensionValue
-
-
Constructor Summary
Constructors Constructor Description ExtendedKeyUsageExtension()ExtendedKeyUsageExtension(boolean crit, java.util.Vector<ObjectIdentifier> oids)ExtendedKeyUsageExtension(java.lang.Boolean crit, java.lang.Object byteVal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOID(ObjectIdentifier oid)voiddecode(java.io.InputStream in)Decodes the attribute in the input stream.voiddelete(java.lang.String name)Deletes an attribute value from this CertAttrSet.voiddeleteAllOIDs()voidencode(java.io.OutputStream out)Encodes the attribute to the output stream in a format that can be parsed by thedecodemethod.voidencode(DerOutputStream out)Write the extension to the DerOutputStream.java.lang.Objectget(java.lang.String name)Gets an attribute value for this CertAttrSet.java.util.Enumeration<java.lang.String>getAttributeNames()Returns an enumeration of the names of the attributes existing within this attribute.java.lang.StringgetName()Returns the name (identifier) of this CertAttrSet.java.util.Enumeration<ObjectIdentifier>getOIDs()voidset(java.lang.String name, java.lang.Object obj)Sets an attribute value within this CertAttrSet.voidsetCritical(boolean newValue)java.lang.StringtoString()Returns the Extension in user readable form.-
Methods inherited from class org.mozilla.jss.netscape.security.x509.Extension
clearValue, getExtensionId, getExtensionValue, isCritical, setExtensionId, setExtensionValue
-
-
-
-
Field Detail
-
OID
public static final java.lang.String OID
- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
OID_OCSPSigning
public static final java.lang.String OID_OCSPSigning
- See Also:
- Constant Field Values
-
OID_CODESigning
public static final java.lang.String OID_CODESigning
- See Also:
- Constant Field Values
-
OID_OCSP_SIGNING_STR
public static final int[] OID_OCSP_SIGNING_STR
-
OID_OCSP_SIGNING
public static final ObjectIdentifier OID_OCSP_SIGNING
-
OID_CODE_SIGNING_STR
public static final int[] OID_CODE_SIGNING_STR
-
OID_CODE_SIGNING
public static final ObjectIdentifier OID_CODE_SIGNING
-
-
Constructor Detail
-
ExtendedKeyUsageExtension
public ExtendedKeyUsageExtension() throws java.io.IOException- Throws:
java.io.IOException
-
ExtendedKeyUsageExtension
public ExtendedKeyUsageExtension(boolean crit, java.util.Vector<ObjectIdentifier> oids) throws java.io.IOException- Throws:
java.io.IOException
-
ExtendedKeyUsageExtension
public ExtendedKeyUsageExtension(java.lang.Boolean crit, java.lang.Object byteVal) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
setCritical
public void setCritical(boolean newValue)
- Overrides:
setCriticalin classExtension
-
getOIDs
public java.util.Enumeration<ObjectIdentifier> getOIDs()
-
deleteAllOIDs
public void deleteAllOIDs()
-
addOID
public void addOID(ObjectIdentifier oid)
-
encode
public void encode(DerOutputStream out) throws java.io.IOException
Description copied from class:ExtensionWrite the extension to the DerOutputStream.
-
toString
public java.lang.String toString()
Description copied from class:ExtensionReturns the Extension in user readable form.- Specified by:
toStringin interfaceCertAttrSet- Overrides:
toStringin classExtension- Returns:
- value of this certificate attribute in printable form.
-
decode
public void decode(java.io.InputStream in) throws java.security.cert.CertificateException, java.io.IOExceptionDescription copied from interface:CertAttrSetDecodes the attribute in the input stream.- Specified by:
decodein interfaceCertAttrSet- Parameters:
in- the InputStream to read the encoded attribute from.- Throws:
java.security.cert.CertificateException- on decoding or validity errors.java.io.IOException- on other errors.
-
encode
public void encode(java.io.OutputStream out) throws java.security.cert.CertificateException, java.io.IOExceptionDescription copied from interface:CertAttrSetEncodes the attribute to the output stream in a format that can be parsed by thedecodemethod.- Specified by:
encodein interfaceCertAttrSet- Parameters:
out- the OutputStream to encode the attribute to.- Throws:
java.security.cert.CertificateException- on encoding or validity errors.java.io.IOException- on other errors.
-
set
public void set(java.lang.String name, java.lang.Object obj) throws java.security.cert.CertificateException, java.io.IOExceptionDescription copied from interface:CertAttrSetSets an attribute value within this CertAttrSet.- Specified by:
setin 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.java.io.IOException- on other errors.
-
get
public java.lang.Object get(java.lang.String name) throws java.security.cert.CertificateException, java.io.IOExceptionDescription copied from interface:CertAttrSetGets an attribute value for this CertAttrSet.- Specified by:
getin interfaceCertAttrSet- Parameters:
name- the name of the attribute to return.- Throws:
java.security.cert.CertificateException- on attribute handling errors.java.io.IOException- on other errors.
-
getAttributeNames
public java.util.Enumeration<java.lang.String> getAttributeNames()
Description copied from interface:CertAttrSetReturns an enumeration of the names of the attributes existing within this attribute.- Specified by:
getAttributeNamesin interfaceCertAttrSet- Returns:
- an enumeration of the attribute names.
-
getName
public java.lang.String getName()
Description copied from interface:CertAttrSetReturns the name (identifier) of this CertAttrSet.- Specified by:
getNamein interfaceCertAttrSet- Returns:
- the name of this CertAttrSet.
-
delete
public void delete(java.lang.String name) throws java.security.cert.CertificateException, java.io.IOExceptionDescription copied from interface:CertAttrSetDeletes an attribute value from this CertAttrSet.- Specified by:
deletein interfaceCertAttrSet- Parameters:
name- the name of the attribute to delete.- Throws:
java.security.cert.CertificateException- on attribute handling errors.java.io.IOException- on other errors.
-
-