Beid : C# CryptoAcquireFailed Error=80090019

偶尔善良 提交于 2019-12-23 04:48:07

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!