0

我有一个签署 PDF 文件的应用程序,我需要从令牌证书和私钥中提取来执行此操作。

我需要一个带有Pkcs11InteropLowLevel API 的 C# 代码。我试过这段代码:

bool success = true; 
CK_ATTRIBUTE[] template = new CK_ATTRIBUTE[2]; 
template[0] = CkaUtils.CreateAttribute(CKA.CKA_CLASS, CKO.CKO_CERTIFICATE); 
template[1] = CkaUtils.CreateAttribute(CKA.CKA_TOKEN, true);
List<IObjectHandle> foundObjects = new List<IObjectHandle>();
CKR test = pkcs11.C_FindObjectsInit(SessionOpened, template, Convert.ToUInt32(template.Length)); 
4

0 回答 0