I'm trying to create GOSTR3410 public key. CKR_ATTRIBUTE_TYPE_INVALID exeption

老子叫甜甜 提交于 2019-12-06 09:12:26

GOST Public Key can't be imported onto ruToken - see docs note in the box.

Just change

objectAttributes.Add(new ObjectAttribute(CKA.CKA_TOKEN, **true**));

to

objectAttributes.Add(new ObjectAttribute(CKA.CKA_TOKEN, **false**));

Public key as a token object can only be 'created' as a result of C_GenerateKeyPair call.

By returning CKR_ATTRIBUTE_VALUE_INVALID your PKCS#11 library tells you that your template specifies an invalid value for a valid attribute(s).

Unfortunately PKCS#11 API does not provide details which attribute caused the error but many PKCS#11 libraries support some kind of internal logging mechanism which may reveal the real cause of error. Exact steps needed to enable logging should be present in the documentation provided by the PKCS#11 library vendor.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!