Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Interop / July 2007

Tip: Looking for answers? Try searching our database.

Using Outlook Object Model to check if a message is digitally signed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
João Maia - 05 Jul 2007 17:49 GMT
Hello there,

Does anyone know if there is a way, in the Outlook object model, to
check whether a Message (a msg file) is digitally signed ?

I know that messages that are digitally signed have an attachment
called "smime.p7m", and I could just check the message for such an
attachment, but I wanted something more. If the message is signed, I
wanted to get some information from the certificate that was used to
sign it (such as the name of the user it was issued to, the issuer
Certificate Authority, the date of expiry, etc).

Please let me know if you know of anyway to do this from .NET 1.1
code.

Thanks in advance.

Cheers from Portugal,

Joao Maia
Sue Mosher [MVP-Outlook] - 05 Jul 2007 18:43 GMT
Checking for that attachment is certainly a viable strategy. IIRC, the MessageClass value will also be something other than IPM.Note.

The Outlook object model exposes no information about certificates, though.

Signature

Sue Mosher, Outlook MVP
  Author of Microsoft Outlook 2007 Programming:
    Jumpstart for Power Users and Administrators
   http://www.outlookcode.com/article.aspx?id=54

> Hello there,
>
[quoted text clipped - 16 lines]
>
> Joao Maia
Dmitry Streblechenko - 06 Jul 2007 22:32 GMT
I don't think you'd be able to do that - Outlook goes to great lengths to
make encrypted/signed messages appear as regular MailItem objects.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

> Hello there,
>
[quoted text clipped - 16 lines]
>
> Joao Maia
Mark J. McGinty - 07 Jul 2007 01:48 GMT
>I don't think you'd be able to do that - Outlook goes to great lengths to
>make encrypted/signed messages appear as regular MailItem objects.

Not that great, signed messages in Outlook have a visible attachment, which
is unfortunate as it makes signed email unusable to me (clients complain
that they can't distinguish emails from me that have explicit attachments,
from the rest, when all of my emails have the paperclip icon, by virtue of
being signed.)

The disturbing thing is, OE does it right, signed emails do not appear to
have a spurious attachment. Perhaps even more disturbing, I have to assume
that spurious attachment in Outlook is by design, as it has persisted across
at least 4 versions of Outlook.  Could they be unaware that this usability
flaw is putting users off of signed email?

Anyway, whether the attachment is accessible I couldn't say, but if it is,
try using CAPICOM to extract details from the attached cert.  (CAPICOM is a
crypto API COM object, freely available on MSDN.)

-Mark

> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
[quoted text clipped - 21 lines]
>>
>> Joao Maia
Dmitry Streblechenko - 07 Jul 2007 02:38 GMT
I mean "goes to great lengths" in the Object Model. In the UI you can of
course see that this is not a regular message.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

>>I don't think you'd be able to do that - Outlook goes to great lengths to
>>make encrypted/signed messages appear as regular MailItem objects.
[quoted text clipped - 42 lines]
>>>
>>> Joao Maia
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.