|
IAIK CMS/SMIME Toolkit API Documentation
Version 6.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectiaik.asn1.structures.AttributeValue
iaik.smime.ess.ESSAttributeValue
iaik.smime.ess.EquivalentLabels
public class EquivalentLabels
The S/MIMEv3 ESS EquivalentLabels attribute.
The Enhanced Security Services
for S/MIMEv3 (ESS) (RFC 2634) specifies the EquivalentLabels
attribute to may be included as signed attribute in a SignerInfo to list one or more security labels that are believed by the signer
to be semantically equivalent to the ESSSecurityLabel attribute included in the
same signerInfo :
EquivalentLabels ::= SEQUENCE OF ESSSecurityLabel
id-aa-equivalentLabels OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 9}
All security-policy object identifiers MUST be unique in the set of
ESSSecurityLabel and EquivalentLabels security labels. Before using
an EquivalentLabels attribute, a receiving agent must ensure that all security-policy OIDs are unique
in the security label or labels included in the EquivalentLabels. Once
the receiving agent selects the security label (within the EquivalentLabels
to be used for processing, then the security-policy OID of the selected
EquivalentLabels security label must be compared with the ESSSecurityLabel
security-policy OID to ensure that they are unique.
When creating an
EquivalentLabels attribute you have to supply the list of security labels that shall be included:
ESSSecurityLabel[] securityLabels = ...; EquivalentLabels equivalentLables = new EquivalentLabels(securityLabels);
ESSSecurityLabel| Field Summary | |
|---|---|
static iaik.asn1.ObjectID |
oid
The attributeType object identifier of this EquivalentLabels attribute. |
| Constructor Summary | |
|---|---|
EquivalentLabels()
Empty default constructor. |
|
EquivalentLabels(iaik.asn1.ASN1Object obj)
Creates an EquivalentLabels from its ASN.1 representation. |
|
EquivalentLabels(ESSSecurityLabel[] essSecurityLabels)
Creates an EquivalentLabels for the given list of ESSSecurityLabels. |
|
| Method Summary | |
|---|---|
ESSSecurityLabel[] |
checkForUniqueness()
Checks if all ESSSecurityLabels included are unique (i.e. have unique security-policy identifiers). |
void |
decode(iaik.asn1.ASN1Object obj)
Decodes the given ASN.1 EquivalentLabels object for parsing
the internal structure. |
boolean |
equals(java.lang.Object obj)
Compares this EquivalentLabels to the specified object. |
iaik.asn1.ObjectID |
getAttributeType()
Returns the OID identifying the EquivalentLabels attribute type. |
ESSSecurityLabel |
getESSSecurityLabel(iaik.asn1.ObjectID securityPolicyIdentifier)
Looks if an ESSSecurityLabel with the given security policy identifier is included in this EquivalentLabels. |
ESSSecurityLabel[] |
getESSSecurityLabels()
Returns the ESSSecurityLabels included in this EquivalentLabels. |
int |
hashCode()
Returns a hashcode for this object. |
iaik.asn1.ASN1Object |
toASN1Object()
Returns this EquivalentLabels as ASN1Object. |
java.lang.String |
toString()
Returns a string representation of this EquivalentLabels. |
java.lang.String |
toString(boolean detailed)
Returns a string representation of this EquivalentLabels. |
| Methods inherited from class iaik.smime.ess.ESSAttributeValue |
|---|
multipleAllowed |
| Methods inherited from class iaik.asn1.structures.AttributeValue |
|---|
getName |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final iaik.asn1.ObjectID oid
EquivalentLabels attribute.
The corresponding OID string is "1.2.840.113549.1.9.16.2.9".
| Constructor Detail |
|---|
public EquivalentLabels()
public EquivalentLabels(ESSSecurityLabel[] essSecurityLabels)
essSecurityLabels - the essSecurityLabels to be set for this
EquivalentLabels
public EquivalentLabels(iaik.asn1.ASN1Object obj)
throws iaik.asn1.CodingException
obj - the EquivalentLabels as ASN1Object
iaik.asn1.CodingException - if the encoding is invalid| Method Detail |
|---|
public ESSSecurityLabel[] getESSSecurityLabels()
null if no security labels are includedpublic ESSSecurityLabel getESSSecurityLabel(iaik.asn1.ObjectID securityPolicyIdentifier)
securityPolicyIdentifier - the security policy identifier of the
ESSSecurityLabel in mind
null if no ESSSecurityLabel with
this policy identifier is includedpublic ESSSecurityLabel[] checkForUniqueness()
All ESSSecurityLabels included in an EquivalentLabels are required to
have unique security policy identifier. This method steps through all
ESSSecurityLabels included thereby checking their security policy
identifiers. As soon as two ESSSecurityLabels with identical policy
identifiers are found, the two ESSSecurityLabels are returned. This method
returns null if all ESSSecurityLabels have unique policy identifiers
or no ESSSecurityLabel is included at all.
null if all ESSSecurityLabels have unique policy identifiers
or no ESSSecurityLabel is included at all.
public void decode(iaik.asn1.ASN1Object obj)
throws iaik.asn1.CodingException
EquivalentLabels object for parsing
the internal structure.
obj - the EquivalentLabels as ASN1Object
iaik.asn1.CodingException - if the encoding is invalid
public iaik.asn1.ASN1Object toASN1Object()
throws iaik.asn1.CodingException
iaik.asn1.CodingException - if an error occurs when building the ASN1Objectpublic iaik.asn1.ObjectID getAttributeType()
getAttributeType in class iaik.asn1.structures.AttributeValuepublic boolean equals(java.lang.Object obj)
EquivalentLabels to the specified object.
equals in class ESSAttributeValueobj - the object to compare this EquivalentLabels
against.
true, if the given object is equal to this
EquivalentLabels,
false otherwisepublic int hashCode()
hashCode in class ESSAttributeValuepublic java.lang.String toString()
toString in class iaik.asn1.structures.AttributeValuepublic java.lang.String toString(boolean detailed)
detailed - whether to give some more detailed information
|
IAIK CMS/SMIME Toolkit API Documentation
Version 6.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
|
v6.1 (c) 2002 IAIK, (c) 2003 - 2025 SIC |
|