开发者

How to programatically add digital signature to multiple Open Office XML Docx documents?

开发者 https://www.devze.com 2023-02-04 20:24 出处:网络
I want to programatically add a digital signature to multiple DOCX files, using the standardized approach of the method Sign() from PackageDigitalSignatureManager object.

I want to programatically add a digital signature to multiple DOCX files, using the standardized approach of the method Sign() from PackageDigitalSignatureManager object.

As in for example: http://blogs.infosupport.com/blogs/wouterv/archive/2007/02/24/Signing-Office-Open-XML-documents-using-the-Packaging-API.aspx

The thing is that, when I user the method Sign, it prompts the user for PIN Key, because the Mic开发者_如何学Pythonrosoft Crypto API is trying to access the Private key in a SmartCard.

Is there any way where I can only use the method Sign once when adding a digital signature to multiple DOCX file, therefore the user is only prompted once when signing multiple files?


In your case PIN is prompted for each access to the token. Usually this is configurable on smartcard driver level, i.e. there's an option there to cache PIN value for a process. An alternative is to use PKCS#11 interface to access certificates. This is possible using our SecureBlackbox product, which offers signing of Office documents (this includes MS Office and OpenOffice) using certificates via PKCS#11 interface (as well as CryptoAPI).

0

精彩评论

暂无评论...
验证码 换一张
取 消