问题
I'm using Belgian ID card to sign some stuff. The example sign_csp in the SDK failed with this error : CryptoAcquireFailed. Error=80090019.
//Get a context
if (!CryptAcquireContext(out hprov, container, provider, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
{
MessageBox.Show("CryptAcquireContext failed.\n\n(Error=" + Marshal.GetLastWin32Error().ToString("x") + ")");
return;
}
provider = "Belgium Identity Card CSP"
I'm on Windows 7 64 bit. The program is built for x86.
Thanks!
回答1:
Have you installed the CSP correctly?
Verify that you have the following key in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Defaults\Provider\Belgium Identity Card CSP
and that the Image Path entry contains the correct path to the CSP-dll.
来源:https://stackoverflow.com/questions/4826390/beid-c-sharp-cryptoacquirefailed-error-80090019