|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.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 ObjectID |
oid
The attributeType object identifier of this EquivalentLabels attribute. |
Constructor Summary | |
---|---|
EquivalentLabels()
Empty default constructor. |
|
EquivalentLabels(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(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. |
ObjectID |
getAttributeType()
Returns the OID identifying the EquivalentLabels attribute type. |
ESSSecurityLabel |
getESSSecurityLabel(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. |
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 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
EquivalentLabelspublic EquivalentLabels(ASN1Object obj) throws CodingException
obj
- the EquivalentLabels as ASN1Object
CodingException
- if the encoding is invalidMethod Detail |
---|
public ESSSecurityLabel[] getESSSecurityLabels()
null
if no security labels are includedpublic ESSSecurityLabel getESSSecurityLabel(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(ASN1Object obj) throws CodingException
EquivalentLabels
object for parsing
the internal structure.
obj
- the EquivalentLabels as ASN1Object
CodingException
- if the encoding is invalidpublic ASN1Object toASN1Object() throws CodingException
CodingException
- if an error occurs when building the ASN1Objectpublic ObjectID getAttributeType()
getAttributeType
in class AttributeValue
public boolean equals(java.lang.Object obj)
EquivalentLabels
to the specified object.
equals
in class ESSAttributeValue
obj
- the object to compare this EquivalentLabels
against.
true
, if the given object is equal to this
EquivalentLabels
,
false
otherwisepublic int hashCode()
hashCode
in class ESSAttributeValue
public java.lang.String toString()
toString
in class AttributeValue
public java.lang.String toString(boolean detailed)
detailed
- whether to give some more detailed information
|
This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |