Forcing a Digital Signature in Outlook 2003

M

Mark Wilson

I recently read the following BLOG.

http://blogs.msdn.com/dvespa/archiv...rypt-a-message-programmatically-from-oom.aspx

It showed how to sign or encrypt a message in Outlook 2007 using
SetPropertyAccessor. I need to do the same for a native C++ Outlook 2003 COM
addin so SetPropertyAccessor is not an available method in the object model.
I'm assuming that it can be done with HrSetOneProp but I can't find a
definition for either PR_SECURITY or PR_SECURITY_FLAGS. Do you know what
that definition is?

Using MFCMAPI I've looked at the properties of draft messages in the Drafts
folder with both encryption and digital signature either selected or turned
off. There seems to be no property related to these two flags. Setting
those bits in Outlook 2007 with SetPropertyAccessor must change something on
the message properties. Why can't I find it?
 
K

Ken Slovak - [MVP - Outlook]

Try these values with HrSetOneProp():

int const PR_SECURITY_FLAGS = 0x6E010003;
bit const SECFLAG_ENCRYPTED = 0x01;
bit const SECFLAG_SIGNED = 0x02;
 
M

Mark Wilson

Thanks Ken.

I added the following definition

#define PR_SECURITY_FLAGS PROP_TAG(PT_LONG, 0x6E01)

Now I can read and write the bits with HrGetOneProp and HrSetOneProp.

Even after the message is saved to the Drafts folder, I still can't find
that property in MFCMAPI. But that's a moot point.
 
G

gregg1ep00

Greetings Ken/Mark,

I have a similar requirement in our application, which is attempting to
encrypt/sign messages using MAPI. I have used HrSetOneProp to set the
PR_SECURITY_FLAGS on my IMessage interface, but the mail is still sent
unencrypted/unsigned. I used MFCMapi to look at the properties of the
message, and I see the tag 0x6E010003 listed with a value of 3.

If I may ask some questions regarding this:
1. How are you creating the message?
2. How are you submitting the message?
3. Are you encrypting/signing anything yourself using the CryptoAPI?
4. Is there anything else I must do in order to send an encrypted/signed
message using MAPI?

Outlook 2007 is the mail client installed on the machine. I've got to be
missing something here. Any help you can provide will be most appreciated.

Thanks in advance,
Greg
 
K

Ken Slovak - [MVP - Outlook]

I'd recommend posting your query at
microsoft.public.win32.programmer.messaging instead of here. The MAPI
experts hang out there, including the authors of OutlookSpy and MFCMAPI.
You're likely to get a better answer, sooner, there than here.
 
G

gregg1ep00

Thanks Ken, I will post a question there.

Ken Slovak - said:
I'd recommend posting your query at
microsoft.public.win32.programmer.messaging instead of here. The MAPI
experts hang out there, including the authors of OutlookSpy and MFCMAPI.
You're likely to get a better answer, sooner, there than here.






.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top