Re: Signature verification with capicom
From: Michel Gallant (neutron_at_NOSPAMistar.ca)
Date: 02/02/04
- Next message: Krish Shenoy[MSFT]: "Re: CRL list"
- Previous message: Gemma: "Re: "Parameter is incorrect" on CCertView.SetRestriction method"
- Maybe in reply to: Marco: "Re: Signature verification with capicom"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 2 Feb 2004 17:19:02 -0500
"Ramesh Addanki" <rbaddanki@rediffmail.com> wrote in message
news:635d01c3e5c9$34e25060$a601280a@phx.gbl...
> Well, it looks like byte ordering problem - Big endian Vs
> Little endian. What you need to do is before calling the
> sign verify reverse the entire buffer.
>
>
> >-----Original Message-----
> >Hi everybody,
> >
> > I'm developing an application that signs a pdf file
> with iaik
> >libraries in java and verify the signature created in
> visual basic.
> >I'm using the capicom libraries, the sign process goes
> well but in the
> >verify process, capicom says that the hashes don't match.
> Iaik sends
> >an ans1 object encoded in base64, that match with the one
> generated
> >with capicom but the hash created from the original file.
> > If I make the hash with iaik with a plain text file, it
> returns the
> >correct hash, but i I do the same with capicom (with
> >CAPICOM.hashedData object), it returns other hash, and I
> have to call
> >this function (extracted from the capicom examples):
> >
> >Function Unicode2Ansi(unicodestring)
> > Dim lngLoop
> > Dim strChar
> > Ustr2Bstr = ""
> >
> > For lngLoop = 1 To Len(unicodestring)
> > strChar = Mid(unicodestring, lngLoop, 1)
> > Unicode2Ansi = Unicode2Ansi & ChrB(AscB(strChar))
> > Next
> >End Function
> >
> >and later do the hash to get the correct value. Finally I
> will use pdf
> >files (not plain text files, i use them only for
> tests). 'what can I
> >do to sing pdf files and make capicom understand the hash
> that iaik
> >creates (well created)??
> >
> >Thanks in advice,
> >
> >Marco Antonio Tabasco
> >.
> >
- Next message: Krish Shenoy[MSFT]: "Re: CRL list"
- Previous message: Gemma: "Re: "Parameter is incorrect" on CCertView.SetRestriction method"
- Maybe in reply to: Marco: "Re: Signature verification with capicom"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|