IAIK CMS/SMIME Toolkit API Documentation
Version 6.1

iaik.smime.attributes
Class MSOEEncryptionKeyPreference

java.lang.Object
  extended by iaik.asn1.structures.AttributeValue
      extended by iaik.smime.attributes.MSOEEncryptionKeyPreference
All Implemented Interfaces:
iaik.asn1.ASN1Type

public class MSOEEncryptionKeyPreference
extends iaik.asn1.structures.AttributeValue

The MSOEEncryptionKeyPreference attribute.

MSOEEncryptionKeyPreference is a private ("1.3.6.1.4.1.311.16.4") attribute that is required by some versions of Microsoft Outlook (e.g. Express) to recognize the encryption cert in a signed message of a sender using different certs for encryption and signing. The encryption cert can be announced by an IssuerAndSerialNumber:

 MSOEEncryptionKeyPreference ::= IssuerAndSerialNumber
 

When creating a MSOEEncryptionKeyPreference object specify the IssuerAndSerialNumber for the encryption certificate of the sender, e.g.:

 X509Certificate encyrptionCert = ...;
 IssuerAndSerialNumber ias = new IssuerAndSerialNumber(encryptionCert);
 MSOEEncryptionKeyPreference MSOEEncryptionKeyPreference = 
   new MSOEEncryptionKeyPreference(ias);
 

See Also:
IssuerAndSerialNumber

Field Summary
static iaik.asn1.ObjectID oid
          The attributeType object identifier of this MSOEEncryptionKeyPreference attribute.
 
Constructor Summary
MSOEEncryptionKeyPreference()
          Empty default constructor.
MSOEEncryptionKeyPreference(iaik.asn1.ASN1Object obj)
          Creates an MSOEEncryptionKeyPreference from its ASN.1 representation.
MSOEEncryptionKeyPreference(IssuerAndSerialNumber encryptionCertID)
          Creates an MSOEEncryptionKeyPreference for the given encryption cert identifier.
 
Method Summary
 void decode(iaik.asn1.ASN1Object obj)
          Decodes the given ASN.1 MSOEEncryptionKeyPreference object for parsing the internal structure.
 boolean equals(java.lang.Object obj)
          Compares this MSOEEncryptionKeyPreference to the specified object.
 iaik.asn1.ObjectID getAttributeType()
          Returns the OID identifying the MSOEEncryptionKeyPreference attribute type.
 IssuerAndSerialNumber getEncryptionCertID()
          Returns the the encryption cert id.
 int hashCode()
          Returns a hashcode for this MSOEEncryptionKeyPreference.
 iaik.asn1.ASN1Object toASN1Object()
          Returns this MSOEEncryptionKeyPreference as ASN1Object.
 java.lang.String toString()
          Returns a string representation of this MSOEEncryptionKeyPreference.
 
Methods inherited from class iaik.asn1.structures.AttributeValue
getName, multipleAllowed
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

oid

public static final iaik.asn1.ObjectID oid
The attributeType object identifier of this MSOEEncryptionKeyPreference attribute. The corresponding OID string is "1.3.6.1.4.1.311.16.4".

Constructor Detail

MSOEEncryptionKeyPreference

public MSOEEncryptionKeyPreference()
Empty default constructor. Required for dynamic object creation. Shall NOT be used by an application.


MSOEEncryptionKeyPreference

public MSOEEncryptionKeyPreference(IssuerAndSerialNumber encryptionCertID)
Creates an MSOEEncryptionKeyPreference for the given encryption cert identifier.

Parameters:
encryptionCertID - the IssuerAndSerialNumber identifying the encryption cert of the sender

MSOEEncryptionKeyPreference

public MSOEEncryptionKeyPreference(iaik.asn1.ASN1Object obj)
                            throws iaik.asn1.CodingException
Creates an MSOEEncryptionKeyPreference from its ASN.1 representation.

Parameters:
obj - the MSOEEncryptionKeyPreference as ASN1Object
Throws:
iaik.asn1.CodingException - if the encoding is invalid
Method Detail

getEncryptionCertID

public IssuerAndSerialNumber getEncryptionCertID()
Returns the the encryption cert id.

Returns:
the IssuerAndSerialNumber identifying the encryption cert of the sender

decode

public void decode(iaik.asn1.ASN1Object obj)
            throws iaik.asn1.CodingException
Decodes the given ASN.1 MSOEEncryptionKeyPreference object for parsing the internal structure.

Parameters:
obj - the MSOEEncryptionKeyPreference as ASN1Object
Throws:
iaik.asn1.CodingException - if the ASN1Object cannot be parsed

toASN1Object

public iaik.asn1.ASN1Object toASN1Object()
                                  throws iaik.asn1.CodingException
Returns this MSOEEncryptionKeyPreference as ASN1Object.

Returns:
this MSOEEncryptionKeyPreference as ASN1Object
Throws:
iaik.asn1.CodingException - if the ASN.1 object cannot be built

getAttributeType

public iaik.asn1.ObjectID getAttributeType()
Returns the OID identifying the MSOEEncryptionKeyPreference attribute type.

Specified by:
getAttributeType in class iaik.asn1.structures.AttributeValue
Returns:
the OID identifying the MSOEEncryptionKeyPreference attribute type.

equals

public boolean equals(java.lang.Object obj)
Compares this MSOEEncryptionKeyPreference to the specified object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare this MSOEEncryptionKeyPreference against.
Returns:
true, if the given object is equal to this MSOEEncryptionKeyPreference, false otherwise

hashCode

public int hashCode()
Returns a hashcode for this MSOEEncryptionKeyPreference.

Overrides:
hashCode in class java.lang.Object
Returns:
a hashcode for this MSOEEncryptionKeyPreference

toString

public java.lang.String toString()
Returns a string representation of this MSOEEncryptionKeyPreference.

Specified by:
toString in class iaik.asn1.structures.AttributeValue
Returns:
this MSOEEncryptionKeyPreference as string

IAIK CMS/SMIME Toolkit API Documentation
Version 6.1

v6.1
(c) 2002 IAIK, (c) 2003 - 2025 SIC