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.