【发布时间】:2015-03-23 06:25:57
【问题描述】:
我正在尝试使用 CryptImportKey 函数将 PFX 导入 Gemalto .NET IDPrime 智能购物车,但我收到“指定的类型无效”(2148073482) 错误。我怀疑 RSACryptoServiceProvider.ExportCspBlob(true) 调用以错误的格式返回密钥。我正在使用来自http://www.idrix.fr/Root/Samples/PfxImporter.cs 的示例代码。注意:我已经将 Microsoft Base Smart Card Crypto Provider 的 AllowPrivateExchangeKeyImport 和 AllowPrivateSignatureKeyImport 设置为 0x1,但仍然没有变化。我正在运行 Windows Server 2012,但不认为这是问题所在。
谁能告诉我这个代码示例有什么问题?
【问题讨论】:
标签: c# certificate smartcard advapi32 gemalto