Joe
2005-09-15 02:57:09 UTC
Hi all,
I am currently using the CryptAcquireContext function to acquire a handle to
a particular key container within a particular CSP.
If I just use the default key container and CSP then the function can return
the handle no problem
CryptAcquireContext(&hCryptProv, NULL, NULL ,PROV_RSA_FULL, 0)
However, if I try to use a specific CSP and a specific container then I get
the following errors
1) CryptAcquireContext(&hCryptProv, "User1_Container", "Eracom RSA Full
Cryptographic Provider" ,PROV_RSA_FULL, 0):
error number "80090019" (NTE_KEYSET_NOT_DEF)
2) CryptAcquireContext(&hCryptProv, "User1_Container", "Eracom RSA Full
Cryptographic Provider" ,PROV_RSA_FULL, CRYPT_MACHINE_KEYSET):
error number "80090016" (NTE_BAD_KEYSET)
3) Try to create a default container:
CryptAcquireContext(&hCryptProv, NULL, "Eracom RSA Full Cryptographic
Provider" ,PROV_RSA_FULL, CRYPT_NEWKEYSET):
error number "80090019"
When I use CryptEnumProviders() to enumerate the available providers, the
"Eracom RSA Full Cryptographic Provider" was listed.
Any help would be greatly appreciated.
Joe
I am currently using the CryptAcquireContext function to acquire a handle to
a particular key container within a particular CSP.
If I just use the default key container and CSP then the function can return
the handle no problem
CryptAcquireContext(&hCryptProv, NULL, NULL ,PROV_RSA_FULL, 0)
However, if I try to use a specific CSP and a specific container then I get
the following errors
1) CryptAcquireContext(&hCryptProv, "User1_Container", "Eracom RSA Full
Cryptographic Provider" ,PROV_RSA_FULL, 0):
error number "80090019" (NTE_KEYSET_NOT_DEF)
2) CryptAcquireContext(&hCryptProv, "User1_Container", "Eracom RSA Full
Cryptographic Provider" ,PROV_RSA_FULL, CRYPT_MACHINE_KEYSET):
error number "80090016" (NTE_BAD_KEYSET)
3) Try to create a default container:
CryptAcquireContext(&hCryptProv, NULL, "Eracom RSA Full Cryptographic
Provider" ,PROV_RSA_FULL, CRYPT_NEWKEYSET):
error number "80090019"
When I use CryptEnumProviders() to enumerate the available providers, the
"Eracom RSA Full Cryptographic Provider" was listed.
Any help would be greatly appreciated.
Joe