Re: Capicom envelopeddata.decrypt failing when content > 64k
From: Michel Gallant (neutron_at_NOSPAMistar.ca)
Date: 03/24/04
- Next message: MJ: "Getting the Windows Groups for the Logged On User"
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Windows Auth -- double hop issue??"
- In reply to: David Pinz: "Capicom envelopeddata.decrypt failing when content > 64k"
- Next in thread: David Pinz: "Re: Capicom envelopeddata.decrypt failing when content > 64k"
- Reply: David Pinz: "Re: Capicom envelopeddata.decrypt failing when content > 64k"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 24 Mar 2004 14:08:20 -0500
What version of CAPICOM?
I just tried a vbs and enveloped/denveloped a bin file with 1,234,111 bytes
with no problems.
Maybe an implemention issue in your COM interop?
Cheers,
- Mitch
"David Pinz" <anonymous@discussions.microsoft.com> wrote in message
news:12b0601c411bb$ba86f5e0$a401280a@phx.gbl...
> Hi group,
>
> I am using C# and interop.Capicom to envelope and
> deenvelope data, the enveloped data is in binary format.
> All works fine until the enveloped content reaches a size
> greater than 65536 bytes, when this happens the decrypt
> method fails. This happens for both even and odd count of
> bytes (interop issue)
>
> This is the exception I'm getting:
> System.Runtime.InteropServices.COMException (0x80093102):
> ASN1 unexpected end of data.
>
> at CAPICOM.EnvelopedDataClass.Decrypt(String
> EnvelopedMessage)
>
> I am clueless about this size limit, this behavior is
> happenning for both the interop.capicom and a workaround
> version of it that I am using (the binary interop
> workaround)
>
> Any insigth would be greatly appreciated.
>
> Code:
>
> EnvMessage.Content =
> System.Text.Encoding.Unicode.GetString (bytesMsg);
> EnvMessage.Recipients.Add(oCert);
> EnvMessage.Algorithm.Name =
> CAPICOM_ENCRYPTION_ALGORITHM.CAPICOM_ENCRYPTION_ALGORITHM_3
> DES;
>
> result = EnvMessage.Encrypt
> (CAPICOM_ENCODING_TYPE.CAPICOM_ENCODE_BINARY);
>
> EnvMessage.Decrypt(result)
- Next message: MJ: "Getting the Windows Groups for the Logged On User"
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Windows Auth -- double hop issue??"
- In reply to: David Pinz: "Capicom envelopeddata.decrypt failing when content > 64k"
- Next in thread: David Pinz: "Re: Capicom envelopeddata.decrypt failing when content > 64k"
- Reply: David Pinz: "Re: Capicom envelopeddata.decrypt failing when content > 64k"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|