Troubles with CAPICOM.EnvelopedData.decode

Troubles with CAPICOM.EnvelopedData.decode

Post by Alexei Pas » Wed, 02 Jul 2003 17:43:32

Hello, I am developing Web-site. Some customers' information must be
and stored in database. I use EnvelopedData from CAPICOM library to encrypt
decrypt security info. I got and installed test VerySign certificate on my
server in Personal
store and successfully encrypt data. As a recipient I used this certificate.
But I can not decrypt encrypted date.
I try to make this in such way:
1 Create objects: Store, Certificates, Certificate, EnvelopedData
3 Get certificates
4 Find my recipient's certificate (I display certificate information and
check existing private key
for this certificate)
5 Add certificate to store
6 Try to decrypt data
At this moment I get Error message:
"Certificate for recipient(s) specified in the EnvelopedData object cannot
be found. "

I looked through MSDN on my local machine, Microsoft site knowledge database
all links which I got via google. There are not answer on my question.

Help me please and explain my mistake. What do I do wrongly?
I shall appreciate code samples or text description.

Thank you in advance.
Alexey Pashin