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

Delete key container with CryptAcquireContext(...,CRYPT_DELETEKEYSET)

247 views
Skip to first unread message

Miro Masnoglav

unread,
Sep 20, 2005, 8:19:24 AM9/20/05
to
We have NT service on win2000 professional which reads user info from flat
text file, connects to CA server, generate key and request certificate for
user, install certificate on local machine store, then prepare data
including private key and certificate for user's smart card. At the end
service delete certificate and key container with CryptAcquireContext(...,
CRYPT_MACHINE_KEYSET|CRYPT_DELETEKEYSET) . Then service process next user
from text file...
Function CryptAcquireContext returns TRUE, but registry entry for cryptokey
under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SystemCertificates\My\Keys
remains. The problem is that after a while registry exceed space limit (100
MB).
Is this bug and can it be resolved with SP, upgrade...?
If not, is there a way to find registry key name under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SystemCertificates\My\Keys from
CryptoAPI container name or from, to delete registry key directly with
RegDeleteKey.


Miro Masnoglav

unread,
Sep 21, 2005, 5:14:26 AM9/21/05
to
0 new messages