无法将PFX导入到Microsoft示例密钥存储提供程序(加密提供程序开发套件) [英] Can't import PFX to Microsoft Sample Key Storage Provider (Cryptographic Provider Development Kit)

查看:62
本文介绍了无法将PFX导入到Microsoft示例密钥存储提供程序(加密提供程序开发套件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行密码提供程序开发套件"提供的示例;在这种情况下,一个示例专门称为KeyStorageProviderSample.在此示例中,只需通过使用-register参数执行.exe,即可​​在系统中创建一个称为"Microsoft示例密钥存储提供程序"的新密钥存储提供程序:

  symmclient-注册 

此时一切正常.如果我在系统中列出了KSP,则会得到完整的列表:

  symmclient-枚举 

列出了刚创建的一个"Microsoft示例密钥存储提供程序".但是,当我尝试将PFX证书导入其中时,它不起作用:

  Certutil -CSP"Microsoft示例密钥存储提供程序" -user -importPFX"mycert.pfx" 

我收到0x80090009错误.对"Microsoft软件密钥存储提供程序"执行的同一命令可以完美运行.看来此示例中创建的KSP缺少"Microsoft软件密钥存储提供程序"所具有的功能.

创建自己的KSP需要什么?我正在使用Windows 7专业版.

谢谢.

我认为原因是因为示例KSP使用自定义结构( SAMPLEKSP_KEY )来存储密钥,而不是与PFX兼容一个,例如 _BCRYPT_RSAKEY_BLOB .

I'm trying to execute samples provided with "Cryptographic Provider Development Kit"; in this case an example specifically called KeyStorageProviderSample. In this sample, a new Key Storage Provider called "Microsoft Sample Key Storage Provider" is created in the system simply by executing the .exe with the -register param:

symmclient -register

At this point everything is ok; if I list the KSPs in the system I get the complete list:

symmclient -enum

The one just created, "Microsoft Sample Key Storage Provider" is listed. However, when I try to import a PFX certificate into it, it doesn't work:

Certutil -CSP "Microsoft Sample Key Storage Provider" -user -importPFX  "mycert.pfx"

I get a 0x80090009 error. The same command executed against "Microsoft Software Key Storage Provider" works perfectly. It seems that the KSP created in this sample lacks from something that "Microsoft Software Key Storage Provider" has.

What do I need to create my own KSP? I'm using Windows 7 Professional.

Thanks.

解决方案

I think the reason if because the Sample KSP uses a custom structure (SAMPLEKSP_KEY) for storing the key, and not a PFX compatible one, for instance a _BCRYPT_RSAKEY_BLOB.

这篇关于无法将PFX导入到Microsoft示例密钥存储提供程序(加密提供程序开发套件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆