PKCS#11 HSM记住密码 [英] PKCS#11 HSM Remember Password

查看:26
本文介绍了PKCS#11 HSM记住密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要的是,在第一次窗口要求输入HSM PIN后,系统会记住该PIN以备下次呼叫使用

cert = Cert.GetCertificateFromStore();

RSA rsa = RSA.Create();
rsa = (RSA)cert.PrivateKey;

byte[] text = System.Text.Encoding.ASCII.GetBytes("Assinged"); ;
ContentInfo content = new ContentInfo(text);
SignedCms signedCms = new SignedCms(content, false);
CmsSigner signer = new CmsSigner(SubjectIdentifierType.IssuerAndSerialNumber, cert);
signer.DigestAlgorithm = new Oid(CryptoConfig.MapNameToOID("SHA256"));
signer.SignedAttributes.Add(new Pkcs9SigningTime());

// create the signature
signedCms.ComputeSignature(signer);

推荐答案

每次我调用函数进行签名时都会显示此屏幕我想记住密码,在某些程序中我注意到它只询问一次

这篇关于PKCS#11 HSM记住密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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