Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CAPICOM 2 on NT4: invalid flags specified on decrypt

16 views
Skip to first unread message

AL

unread,
Jul 7, 2004, 4:57:42 AM7/7/04
to
Hello,
I have a VB6 application using capicom to encode and decode files it
exchanges with a 2003 server (using X.509 certificates), running perfectly
on Windows 2000 or XP but failing on NT4 when it tries to decode data.
When I call evelopeddata.decrypt I get an "invalid flags specified", and
cannot understand nor what it means nor how to solve.
My code is like:

Dim sigver As New CAPICOM.SignedData
Call sigver.Verify(bytesString, False, CAPICOM_VERIFY_SIGNATURE_ONLY)
Dim decoder As New CAPICOM.EnvelopedData
decoder.Recipients.Add serverCert
decoder.Algorithm = CAPICOM_ENCRYPTION_ALGORITHM_3DES
Call decoder.Decrypt(sigver.Content)

here I get the error, but only on NT4.
servercert is a CAPICOM.Certificate containing the certificate of the server
(encoding data for the client).
Looking at the registry, I see the default CSP on NT is Base CSP, while on
my XP it's Strong CSP: could this cause the problem? If yes, is there a way
to force my server and client to use the base csp?
Can anybody help? Also, if this is not supported on NT4, could somebody
provide an alternative solution?

thank you,
AL.


AL

unread,
Jul 7, 2004, 5:27:11 AM7/7/04
to
Hi,
if anybody interested, I solved changing the encryption algorythm from 3DES
to DES: now I can use the app also on NT4.
bye,
al.

"AL" <al...@ihnet.it> wrote in message
news:eHAcDGAZ...@TK2MSFTNGP09.phx.gbl...

Slava

unread,
Aug 10, 2004, 9:03:29 AM8/10/04
to
"AL" <al...@ihnet.it> wrote in message
news:eD7aiWAZ...@TK2MSFTNGP11.phx.gbl...

> if anybody interested, I solved changing the encryption algorythm from
3DES
> to DES: now I can use the app also on NT4.
> > Looking at the registry, I see the default CSP on NT is Base CSP,


yes, it's the problem, Base CSP; 3DES is not supported.,

only Strong or Enhanced CSP.

slava


--
Květoslav Jansta
LCS International, a.s.
KJ(at_at).Lcs.cz , http://www.Lcs.cz,
icq : 51076087


0 new messages