login about faq

Hello,

is it possibile to store file size information in .p7s file when signing a document using CreateP7S method?

Thanks

asked Aug 12 '13 at 03:49

dexx's gravatar image

dexx
1112

edited Aug 13 '13 at 05:13


More info: CryptVerifyMessageSignature is function that does not work with verification my signed .p7s file. It's missing output file size information.

link

answered Aug 12 '13 at 04:26

dexx's gravatar image

dexx
1112

I don't understand the problem.

1) The CreateP7S method produces a PCKS7 signature output file. It does not make sense to arbitrarily try to store additional information in an already-defined file format. PCKS7 is well defined, and one cannot simply inject new information into it unless it's part of the format..

2) CryptVerifyMessageSignature is a Microsoft Crypto API method and you should seek help regarding Crypto API methods in a more appropriate Microsoft forum. If the "size" of the PCKS7 signature is what you need, then it's simply the size of the file produced by CreateP7S. Writing code to get the size of a file should not be a challenge for any reasonably competent programmer...

link

answered Aug 12 '13 at 11:05

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

After investigating more problem, it seems im getting error "Incorrect hash value". Another application is verifying my signed p7s file and it's returning that error (80091007 - Incorrect hash value). Any ideas? Thanks on fast response!

link

answered Aug 13 '13 at 03:32

dexx's gravatar image

dexx
1112

edited Aug 13 '13 at 03:33

When i sign something simple (like 1234567) in my text file im getting some kind wierd chinese(?) letters in p7s file (舰옉आ蘪虈෷܁ꀂংシংʳā଱रԆหȃԚ) i know that's encoded, but it seems that's my problem? is it possible to change encoding type?

link

answered Aug 13 '13 at 08:19

dexx's gravatar image

dexx
1112

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×48
×8
×1

Asked: Aug 12 '13 at 03:49

Seen: 1,420 times

Last updated: Aug 13 '13 at 08:19

powered by OSQA