开发者

Does smart card in the reader corresponds to certificate, c#

开发者 https://www.devze.com 2022-12-29 00:32 出处:网络
I have certificate imported from smart card into my certificate store I would like to check (c# 开发者_运维技巧code) whether certificate is active i.e. does the smart card in the reader corresponds t

I have certificate imported from smart card into my certificate store

I would like to check (c# 开发者_运维技巧code) whether certificate is active i.e. does the smart card in the reader corresponds to my certificate


I don't have smart card reader at hand but from what I remember when you try to access private key (eg. when trying to sign or decrypt) UI from CSP will pop up asking that you insert correct card and/or provide pin number. If you use different card (so that certificate/private key won't match) then the operation will fail (my guess is that CryptographicException will be thrown). I haven't heard of generic way to query smart cards (which of course doesn't mean there isn't any).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号