[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-cryptoapi
Subject:    What is the problem with cryptSignMessage ?
From:       "Antonio Cesa da Silveira Jr." <silveira () DATALAN ! COM ! BR>
Date:       2001-07-27 18:37:32
[Download RAW message or body]


  Again:

 I build a simple windows application that retrieve a certificate of
CERT_SYSTEM_STORE_LOCAL_MACHINE using certOpenStore.  The application wor=
ks
fine, retrieve and sign messages with cryptSignMessage using it.

 Then I  created a activex that do the same thing. It runs over ASP/ IIS
5.0, but don't cryptSignMessage with LocalMachine keyset . I build too a
version that retrieve the certificate of CERT_SYSTEM_STORE_CURRENT_USER a=
nd
this works fine too.

 The code is identical and the activex can find the certificate, but when=
 I
call cryptSignMessage at first time ( for retrieve the size of signed
buffer) it fails ...

 I have read that the property CERT_KEY_CONTEXT_PROP_ID need be set, but =
if
it works in windows application fine, its not necessary, ok ?

What may be wrong ?  I need something especific for this in IIS to use
private keys ? I don't believe, but i don't know why don=B4t sign, if the=
 code
is correct ...

 Can somebody help me ?


-------------------------
BRy Tecnologia
-------------------------

----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:CryptoAPI-signoff-request@DISCUSS.MICROSOFT.COM



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic