简体   繁体   中英

digital signature with php on excel

I'm trying to add a digital sign to an excel document with the function openssl_pkcs7_sign. The problem is that the output file has wrong format and excel open it with wrong characters.

Somebody knows how to keep the format on the signed file?

Thanks

The function you used creates a wrapping PKCS#7/CMS signature. Office files are signed in a very different way (using their own format, where the signature is embedded into the document) and you can't sign office files with OpenSSL.

I don't know if there exist any libraries for signing office documents from PHP. You might need to create a native or .NET/Mono executable to sign a file and call it from your PHP script. Our SecureBlackbox offers components and classes that let you do signing of Office documents.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM