public class MSOEEncryptionKeyPreference
extends iaik.asn1.structures.AttributeValue
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);
IssuerAndSerialNumber| Modifier and Type | Field and Description |
|---|---|
static iaik.asn1.ObjectID |
oid
The attributeType object identifier of this
MSOEEncryptionKeyPreference attribute. |
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final iaik.asn1.ObjectID oid
MSOEEncryptionKeyPreference attribute.
The corresponding OID string is "1.3.6.1.4.1.311.16.4".public MSOEEncryptionKeyPreference()
public MSOEEncryptionKeyPreference(IssuerAndSerialNumber encryptionCertID)
encryptionCertID - the IssuerAndSerialNumber identifying the
encryption cert of the senderpublic MSOEEncryptionKeyPreference(iaik.asn1.ASN1Object obj)
throws iaik.asn1.CodingException
obj - the MSOEEncryptionKeyPreference as ASN1Objectiaik.asn1.CodingException - if the encoding is invalidpublic IssuerAndSerialNumber getEncryptionCertID()
public void decode(iaik.asn1.ASN1Object obj)
throws iaik.asn1.CodingException
MSOEEncryptionKeyPreference object for
parsing the internal structure.obj - the MSOEEncryptionKeyPreference as ASN1Objectiaik.asn1.CodingException - if the ASN1Object cannot be parsedpublic iaik.asn1.ASN1Object toASN1Object()
throws iaik.asn1.CodingException
iaik.asn1.CodingException - if the ASN.1 object cannot be builtpublic iaik.asn1.ObjectID getAttributeType()
getAttributeType in class iaik.asn1.structures.AttributeValuepublic boolean equals(java.lang.Object obj)
MSOEEncryptionKeyPreference to the specified object.equals in class java.lang.Objectobj - the object to compare this MSOEEncryptionKeyPreference
against.true, if the given object is equal to this
MSOEEncryptionKeyPreference,
false otherwisepublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class iaik.asn1.structures.AttributeValue