password for batch processing with CryptoAPI
-
Hi all, I have a module that digitally signs, crypts, decrypts and verifies messages using Microsoft's CryptoAPI. Normally, when I install a certificate, I have to provide the password only once, and Microsoft stores this password, so that for each use of the certificate (when signing or decrypting) I do not have to enter the apssword again (the only thing you can then configure is the OS asking if it is OK to use the certificate). This is a necessary behaviour, since we use this module in an unattended system. We are now facing the chalenge that we have to use hard-token certificates (since our customer sends invoices to Germany and they demand this) However, I cannot install this token with a one-time password, so that the system now asks every time again for this password. Since there is no user, the system halts at that point. I can not find a way to pass the password in the call to either CryptSignMessage or any of its related functions. If I could do that, then I could store the password myself and pass it automatically. Does anyone have a suggestion? Thanks in advance William