Skip navigation links

Oracle Fusion Middleware S/MIME Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10672-03


oracle.security.crypto.smime.ess
Class ESSSecurityLabel

java.lang.Object
  extended by oracle.security.crypto.smime.ess.ESSSecurityLabel

All Implemented Interfaces:
oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

public class ESSSecurityLabel
extends java.lang.Object
implements oracle.security.crypto.asn1.ASN1Object

An ESS security label.

A security label consists of a security policy identifier, and optionnaly of a security classification, a privacy mark and security categories.


Field Summary
static int CONFIDENTIAL
          A security classification.
static int RESTRICTED
          A security classification.
static int SECRET
          A security classification.
static int TOP_SECRET
          A security classification.
static int UB_INTEGER_OPTIONS
          Maximum value of security classification.
static int UB_PRIVACY_MARK_LENGTH
          Maximum length of the privacy mark.
static int UB_SECURITY_CATEGORIES
          Maximum number of security categories.
static int UNCLASSIFIED
          A security classification.
static int UNMARKED
          A security classification.

 

Constructor Summary
ESSSecurityLabel(oracle.security.crypto.asn1.ASN1ObjectID securityPolicyID)
          Creates a ESSSecurityLabel with the given policy identifier.
ESSSecurityLabel(oracle.security.crypto.asn1.ASN1ObjectID securityPolicyID, int secClass)
          Creates a ESSSecurityLabel with the given policy identifier and classification.
ESSSecurityLabel(oracle.security.crypto.asn1.ASN1ObjectID securityPolicyID, int secClass, java.lang.String privMark, boolean useUTF8)
          Creates a ESSSecurityLabel with the given policy identifier and classification.
ESSSecurityLabel(oracle.security.crypto.cms.CMSSignerInfo si)
          Creates a ESSSecurityLabel from the CMSSignerInfo.
ESSSecurityLabel(java.io.InputStream is)
          Creates a ESSSecurityLabel by reading the BER encoding from the given input stream.

 

Method Summary
 void addSecurityCategory(oracle.security.crypto.asn1.ASN1ObjectID type, oracle.security.crypto.asn1.ASN1Object value)
          Adds a security category with the given type and value.
 boolean equals(java.lang.Object o)
          Indicates if the object equals the specified object.
 java.lang.String getPrivacyMark()
          Returns the Privacy Mark.
 java.util.Hashtable getSecurityCategories()
          Returns the list Security Categories.
 int getSecurityClassification()
          Returns the Security Classification value.
 oracle.security.crypto.asn1.ASN1ObjectID getSecurityPolicyIdentifier()
          Returns the Security Policy Identifier.
 int hashCode()
          Return the hash code for this object.
 void input(java.io.InputStream is)
           
 boolean isUTF8StringPrivacyMark()
          Indicates if the privacy mark is to be encoded as an UTF8String.
 int length()
          Returns the length of this object's encoding.
 void output(java.io.OutputStream os)
          Outputs this object's encoding to the specified output stream.
 void setPrivacyMark(java.lang.String privacyMark, boolean useUTF8)
          Sets the privacy mark of this security label.
 void setSecurityClassification(int secClass)
          Sets the security classification of this security label.
 java.lang.String toString()
           

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

UNMARKED

public static final int UNMARKED
A security classification.
See Also:
Constant Field Values

UNCLASSIFIED

public static final int UNCLASSIFIED
A security classification.
See Also:
Constant Field Values

RESTRICTED

public static final int RESTRICTED
A security classification.
See Also:
Constant Field Values

CONFIDENTIAL

public static final int CONFIDENTIAL
A security classification.
See Also:
Constant Field Values

SECRET

public static final int SECRET
A security classification.
See Also:
Constant Field Values

TOP_SECRET

public static final int TOP_SECRET
A security classification.
See Also:
Constant Field Values

UB_INTEGER_OPTIONS

public static final int UB_INTEGER_OPTIONS
Maximum value of security classification.
See Also:
Constant Field Values

UB_PRIVACY_MARK_LENGTH

public static final int UB_PRIVACY_MARK_LENGTH
Maximum length of the privacy mark.
See Also:
Constant Field Values

UB_SECURITY_CATEGORIES

public static final int UB_SECURITY_CATEGORIES
Maximum number of security categories.
See Also:
Constant Field Values

Constructor Detail

ESSSecurityLabel

public ESSSecurityLabel(java.io.InputStream is)
                 throws java.io.IOException
Creates a ESSSecurityLabel by reading the BER encoding from the given input stream.
Parameters:
is - The input stream.
Throws:
java.io.IOException - If the input encoding is incorrect or an I/O error occurred.

ESSSecurityLabel

public ESSSecurityLabel(oracle.security.crypto.cms.CMSSignerInfo si)
                 throws oracle.security.crypto.util.InvalidInputException
Creates a ESSSecurityLabel from the CMSSignerInfo.
Parameters:
si - The message signer (CMSSignerInfo).
Throws:
oracle.security.crypto.util.InvalidInputException - If the input is not correctly formatted.

ESSSecurityLabel

public ESSSecurityLabel(oracle.security.crypto.asn1.ASN1ObjectID securityPolicyID)
Creates a ESSSecurityLabel with the given policy identifier.
Parameters:
securityPolicyID - The security policy identifier of this security label.

ESSSecurityLabel

public ESSSecurityLabel(oracle.security.crypto.asn1.ASN1ObjectID securityPolicyID,
                        int secClass)
                 throws oracle.security.crypto.util.InvalidInputException
Creates a ESSSecurityLabel with the given policy identifier and classification.
Parameters:
securityPolicyID - The security policy identifier of this security label.
secClass - The security classification of this security label.
Throws:
oracle.security.crypto.util.InvalidInputException - If the security classification value is invalid.

ESSSecurityLabel

public ESSSecurityLabel(oracle.security.crypto.asn1.ASN1ObjectID securityPolicyID,
                        int secClass,
                        java.lang.String privMark,
                        boolean useUTF8)
                 throws oracle.security.crypto.util.InvalidInputException
Creates a ESSSecurityLabel with the given policy identifier and classification.
Parameters:
securityPolicyID - The security policy identifier of this security label.
Throws:
oracle.security.crypto.util.InvalidInputException - If the privacy mark is too long.

Method Detail

equals

public boolean equals(java.lang.Object o)
Indicates if the object equals the specified object.
Overrides:
equals in class java.lang.Object
Returns:
If true this object is equal to the specified object; false otherwise.

hashCode

public int hashCode()
Return the hash code for this object.
Overrides:
hashCode in class java.lang.Object
Returns:
The hash code value.

setSecurityClassification

public void setSecurityClassification(int secClass)
                               throws oracle.security.crypto.util.InvalidInputException
Sets the security classification of this security label.
Parameters:
secClass - The security classification of this security label.
Throws:
oracle.security.crypto.util.InvalidInputException - If the security classification is invalid.

setPrivacyMark

public void setPrivacyMark(java.lang.String privacyMark,
                           boolean useUTF8)
                    throws oracle.security.crypto.util.InvalidInputException
Sets the privacy mark of this security label.
Parameters:
privMark - The privacy mark of this security label.
useUTF8 - If true the privacy mark is encoded as an UTF8String; false otherwise.
Throws:
oracle.security.crypto.util.InvalidInputException - If the privacy mark is too long.

addSecurityCategory

public void addSecurityCategory(oracle.security.crypto.asn1.ASN1ObjectID type,
                                oracle.security.crypto.asn1.ASN1Object value)
                         throws oracle.security.crypto.util.InvalidInputException
Adds a security category with the given type and value.
Parameters:
type - The security category identifier.
value - The security category value.
Throws:
oracle.security.crypto.util.InvalidInputException - If the maximum number of allowable security categories is exceeded.

getSecurityPolicyIdentifier

public oracle.security.crypto.asn1.ASN1ObjectID getSecurityPolicyIdentifier()
Returns the Security Policy Identifier.
Returns:
The security policy identifier.

getSecurityClassification

public int getSecurityClassification()
Returns the Security Classification value.
Returns:
The security classification value if present; -1 otherwise.

getPrivacyMark

public java.lang.String getPrivacyMark()
Returns the Privacy Mark.
Returns:
The privacy mark if present; null otherwise.

isUTF8StringPrivacyMark

public boolean isUTF8StringPrivacyMark()
Indicates if the privacy mark is to be encoded as an UTF8String.

This method is revelant only if the privacy mark is present.


getSecurityCategories

public java.util.Hashtable getSecurityCategories()
Returns the list Security Categories.
Returns:
The Hashtable of security categories if present; null otherwise.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
A string description of this object.

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Specified by:
input in interface oracle.security.crypto.util.Streamable
Throws:
java.io.IOException

output

public void output(java.io.OutputStream os)
            throws java.io.IOException
Outputs this object's encoding to the specified output stream.
Specified by:
output in interface oracle.security.crypto.util.Streamable
Parameters:
os - The output stream.
Throws:
java.io.IOException - An I/O error occurred.

length

public int length()
Returns the length of this object's encoding.
Specified by:
length in interface oracle.security.crypto.util.Streamable
Returns:
The length in bytes.

Skip navigation links

Oracle Fusion Middleware S/MIME Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10672-03


Copyright © 2005, 2011 , Oracle. All rights reserved.