Re: How to make PKCS#7 signature using CryptoAPI?



Don't think .net directly handles b64 (which is what you generated below
if those are the only args you used). Default signall.vbs is b64.

So try this:
signall.vbs <filename> output.p7s A B
which generates attached (A) sig. in binary (B) format.

Just tried .NET 2 classes .. no problems verifying either way.

Also, signall uses the most common ASCII encoding of the datain pkcs7
signatures.

So use Encoding.ASCII if you convert string to byte[].

- Mitch Gallant


<deadlock@xxxxxxxx> wrote in message news:1144603036.265478.280170@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi, Mitch!

I have signed a simple text message using
signall <filename> output.p7s
that created detached signature with the certificate inside it. When I
try to verify it, using CryptoAPI VerifyMessageSignature, either .NET 2
namespace PKCS, I get the same error ASN1 bad tag value met. I cannot
understand what am I doing wrong :(

Anna



.


Quantcast