Tag: 智能卡

如何为多个进程缓存eToken PIN

我有一个.NET(c#)应用程序,它在’my’证书库中使用x509Certificate2,最初来自eToken设备。 当我使用证书(解密数据或将其用作Web请求的clientcert)时,它将要求设备PIN一次。 之后,它被缓存,用户不会每隔xx分钟打扰密码请求。 现在,我有多个进程,都使用证书。 这些过程中的每一个都将请求设备PIN。 (缓存似乎是每个进程)。 这有简单的方法吗? 我可以在某处“缓存”它,以便每个进程都可以访问令牌而无需反复请求PIN吗?

C# – 使用PCSC-Sharp在智能卡中写入

大家好日子,我想问一下如何用智能卡写字。 我只是依赖于文档中给出的示例,但它只有读取标记。 我按照https://github.com/danm-de/pcsc-sharp/blob/master/Examples/Transmit/Program.cs中的示例进行操作 using System; using PCSC; using PCSC.Iso7816; namespace Transmit { public class Program { public static void Main() { using (var context = new SCardContext()) { context.Establish(SCardScope.System); var readerNames = context.GetReaders(); if (readerNames == null || readerNames.Length < 1) { Console.WriteLine("You need at least one reader in order to run this example."); Console.ReadKey(); […]

如何在c#中从SmartCard读取凭据

在我的组织中,用户必须使用SmartCard进行交互式登录Windows工作站(95,Vista和7)。 几乎每天,我们都需要读取存储在SmartCard中的凭据,并将它们与ActiveDirectory进行比较,而无需实现自定义凭证管理器。 我们比较的字段是:userPrincialName和sAMAccountName。 你能告诉我一个代码,演示如何从智能卡读取凭据或引导我访问互联网上的文章/代码吗? 对互联网的搜索建议实施凭证管理器或使用其他语言(如C,C ++)。 另外,我遇​​到了这篇文章: http : //www.codeproject.com/Articles/17013/Smart-Card-Framework-for-NET由orouit编写,这是一个使用智能卡的框架 – 但我认为这太多了为了我的简单任务。 你怎么看?

在读卡器上找到智能卡上的证书

我使用Visual Studio 2013(C#)使用来自智能卡的证书对文档进行数字签名。 我无法识别当前插入读卡器的证书:( Windows复制插入读卡器中的所有卡的证书,并将其保存在商店中。 我想在读卡器中使用卡片。 我使用的代码是 public static byte[] Sign(Stream inData, string certSubject) { // Access Personal (MY) certificate store of current user X509Store my = new X509Store(StoreName.My, StoreLocation.CurrentUser); my.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly); // Find the certificate we’ll use to sign RSACryptoServiceProvider csp = null; foreach (X509Certificate2 cert in my.Certificates) { if (cert.Subject.Contains(certSubject)) { // […]