summaryrefslogtreecommitdiff
path: root/unoxml/qa
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-12-11 02:11:35 +0200
committerTor Lillqvist <tml@collabora.com>2014-12-11 02:32:51 +0200
commit6e91763769a562b88882a4c2a94b1367c6ed4866 (patch)
tree8258859be9b0d3dc3eff9bfa250f7058263d7c66 /unoxml/qa
parent070c93af73df9aa4eb333265c81060d123b530b9 (diff)
fdo#87030: Generate a proper PKCS#7 signature
The signature should be in DER-encoded PKCS#7 format and what CryptSignHash() produces is nothing like that. Luckily CryptSignMessage() is actually almost easier to use and is capable of doing what we need. This also means that we won't need any HCRYPTPROV or HCRYPTHASH after all so all the code related to that can be removed. CryptSignMessage() handles both calculating the hash and signing it. One less than ideal issue with CryptSignMessage() is that it needs all the data to be hashed and signed at the same time, so we need to keep both buffers around for signing. It also turns out that we don't need to look up the certificate anew from the user's certificate store after all. Now Adobe Reader doesn't complain any longer about the signature's format and contents. Change-Id: I25cfb93b516ffa723c6228d068d9ffa8e7cc4790
Diffstat (limited to 'unoxml/qa')
0 files changed, 0 insertions, 0 deletions