Archived Forum Post

Index of archived forum posts

Question:

IMAP: accessing Crypto-Api / Message

Sep 09 '14 at 19:29

While downloading Mails from IMAP I receive a message that wants me to "auth." the access to Crypto-Api.

Not sure, but I think it might have to do with the cert, and if the cert that Chilkat wants to use to decrypt a mail has the rights to "Export" the private key?!

As I am not able to check it in Details atm, I wanted to ask if another user can confirm this?


Accepted Answer

Check the LastErrorText. Chilkat will only fallback to using the MS Crypto API (internally) on a Windows system if the cert comes from a Windows registry cert store AND the private key is marked non-exportable. There is also an option when installing the cert + private key (onto a Windows system) for "high security", which means that any program accessing the private key will cause the OS to popup a dialog box to confirm the access. This dialog box is completely external to Chilkat and your app -- it is something entirely generated by the OS.


Answer

I noticed while downloading my mails that there was a very old mail (encrypted) which cert is no longer stored in the windows certmanager.

For this single mail I receive 2 popup Windows which ask me to click "OK". I fear if I am forcing a background task (every 20 minutes) to check all this mails, the user needs to click on every of this messages or the program gets stuck :-(

Maybe I should check if the cert is available via LoadByEmailAddress() and if there is no match I have to skip this mail? Someone got an idea on how to prevent this otherwise?