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

List:       ms-cryptoapi
Subject:    Re: CryptAcquireContext returns "Keyset does not exist"
From:       "Diego A. Giocondo" <diegoAG () MAILANDNEWS ! COM>
Date:       2001-04-21 16:16:33
[Download RAW message or body]


hi,

A friend of mine had the same problem on his machine, while it worked on mine.
We solved it by using the inituser.exe program quoted somewhere in the msdn.
It creates a keyset for the administrator, which is needed for
CryptAcquireContext calls with the Microsoft Provider. I'm not sure where the
source for inituser is though?

>===== Original Message From Microsoft Cryptographic API
<CryptoAPI@DISCUSS.MICROSOFT.COM> =====
>Hi,
>        anyone have an idea on this one.  On some Win2K systems, calls
>to CryptAcquireContext with the Microsoft Base Cryptographic Provider
>returns
>"Keyset does not exist".
>
>This happens even if the flag CRYPT_NEWKEYSET is specified as shown in
>the code below.
>************************************************
>if(!CryptAcquireContext(&hProv, "testcontainer", "Microsoft Base
>Cryptographic Provider v1.0", PROV_RSA_FULL, 0))
>{
>        // Key container probably doesn't exist, create it
>        if(!CryptAcquireContext(&hProv, "testcontainer", "Microsoft Base
>Cryptographic Provider v1.0", PROV_RSA_FULL, CRYPT_NEWKEYSET))
>        {
>                //Cannot create the key container
>                Error = GetLastError();
>        }
>********************************************
>What puzzle me most is that the same code works fine on these
>systems with the Strong Cryptographic Provider.  Any idea?
>
>Thank you,
>
>Guy Dumais
>Silanis Technology
>mailto:guy_dumais@silanis.com
>
>Silanis introduces 3 new electronic signature solutions for
>100% eBusiness automation and B2B processing . Visit
><http://www.silanis.com/>.
>
>----------------------------------------------------------------
>Users Guide http://msdn.microsoft.com/workshop/essentials/mail.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

Diego A. Giocondo

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.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