开发者

What is 'name' in M2Crypto Engine class methods

The following 3 Engine methods require 'name' as an argument.

load_private_key(self, name, pin=None)  
load_public_key(self, name, pin=None)   
load_certificate(self, name)

What exactly is 'name'? From examples I've found it appears to be som开发者_StackOverflow社区e type of slot id for the USB token. How do I find the id?


I found some information on the following website: http://www.etokenonlinux.org/et/FAQ

pkcs11-tool --module /usr/lib/libeTPkcs11.so --slot 0 -O --login

In the ouput search for a private key object and its ID.

Private Key Object; RSA
  label:      eTCAPI private key
  ID:         39453945373335312d333545442d343031612d384637302d3238463636393036363042303a35
  Usage:      decrypt, sign, unwrap

When I use the ID from this command as the arg, I don't get errors.


Those are probably referring to the private key file, public key file, and signed certificate respectively. There are examples for creating those at this site.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜