diff --git a/src/mdn/receivedMDNInfos.cpp b/src/mdn/receivedMDNInfos.cpp index 48665696..876ba3d9 100644 --- a/src/mdn/receivedMDNInfos.cpp +++ b/src/mdn/receivedMDNInfos.cpp @@ -69,11 +69,18 @@ const disposition receivedMDNInfos::getDisposition() const } +const string receivedMDNInfos::getContentMIC() const +{ + return m_contentMIC; +} + + void receivedMDNInfos::copyFrom(const receivedMDNInfos& other) { m_msg = other.m_msg; m_omid = other.m_omid; m_disp = other.m_disp; + m_contentMIC = other.m_contentMIC; } @@ -109,6 +116,13 @@ void receivedMDNInfos::extract() try { m_disp = *fields.Disposition()->getValue().dynamicCast (); } catch (exceptions::no_such_field&) { /* Ignore */ } + + try + { + text t = *fields.findField("Received-content-MIC")->getValue().dynamicCast (); + m_contentMIC = t.generate(); + } + catch (exceptions::no_such_field&) { /* Ignore */ } } } } diff --git a/vmime/mdn/receivedMDNInfos.hpp b/vmime/mdn/receivedMDNInfos.hpp index 23cf77f2..c836f23c 100644 --- a/vmime/mdn/receivedMDNInfos.hpp +++ b/vmime/mdn/receivedMDNInfos.hpp @@ -65,6 +65,13 @@ public: */ const disposition getDisposition() const; + /** Return the Message Integrity Check (MIC), that is the value + * of the "Received-content-MIC" field. + * + * @return MIC hash value, or an empty string if not specified + */ + const string getContentMIC() const; + private: void copyFrom(const receivedMDNInfos& other); @@ -76,6 +83,7 @@ private: disposition m_disp; messageId m_omid; + string m_contentMIC; };