if(!CryptAcquireContext(&hCryptProv,
NULL,
NULL,
PROV_RSA_FULL,
0))
{
if(!CryptAcquireContext(&hCryptProv,
NULL,
NULL,
PROV_RSA_FULL,
CRYPT_NEWKEYSET))
{
Error("Error during CryptAcquireContext.");
return false;
}
}
Thank you.
Oddly enough, one of my customers also reported the same problem yesterday.
I came up with this post from a few months ago: http://tinyurl.com/s0oo It
appears to be a bug in the CryptoAPI.
I'm interested in an answer from someone from Microsoft. Is this a known
problem in the CryptoAPI? Are there any workarounds [except deleting the
default keyset]? Will it be fixed in a future service pack? Does it happen
on all platforms?
Regards,
Pieter Philippaerts
Managed SSL/TLS: http://www.mentalis.org/go.php?sl
You shouldn't delete the entire folder but only the corrupted key stores.
And yes, you will lose keys, but what good is a store if no application can
open it [keep in mind that it's not only your application that fails to open
the store -- others won't be able to open it either]?
However mind you that the theory of a corrupted key store is not the
'official' explanation. It would be wise to wait for someone from Microsoft
to respond to this thread before you start deleting things.
> What is in this folder? Only (encrypted?) default keys. No
> certificate (from Personal cert. store) keys?
The folder contains keys [private keys, symmetric keys.. I'm not sure about
public keys].
I believe certificates are stored somewhere else.
That folder, for W2k, will contain your EFS keys also, so if you delete it,
you won't be able to open your encrypted local folders (except via your administrator
account recovery keys).
If you want to delete *specific* key containers, you can use this utility I
created for this purpose:
http://pages.istar.ca/~neutron/KeyContainerTool/ (requires CAPICOM)
- Michel Gallant
Visual Security MVP
"Oliver Young" <none> wrote in message news:eJTFE1Um...@tk2msftngp13.phx.gbl...
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Oliver Young" <none> wrote in message
news:ueJ6XOUm...@TK2MSFTNGP10.phx.gbl...
NTE_BAD_KEYSET on my client's computer.
>.
>
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Pieter Philippaerts" <Pie...@nospam.mentalis.org> wrote in message
news:O4kKhCam...@TK2MSFTNGP10.phx.gbl...
>.
>
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Daryn Kiely" <anon...@discussions.microsoft.com> wrote in message
news:040101c399bd$4a32fcb0$a501...@phx.gbl...
What I did to fix the problem was moved the Application
Data\...crypto\RSA folder, added the keys that were
failing, and used them to overwrite the old ones in the
RSA folder after I moved the RSA folder back into place.
>.
>
"Pieter Philippaerts" <Pie...@nospam.mentalis.org> wrote in message
news:eEJCroUm...@TK2MSFTNGP11.phx.gbl...