Need help using M2Crypto.Engine to access USB Token

前端 未结 6 729
自闭症患者
自闭症患者 2021-01-07 00:09

I am using M2Crypto-0.20.2. I want to use engine_pkcs11 from the OpenSC project and the Aladdin PKI client for token based authentication making xmlrpc calls over ssl.

6条回答
  •  时光取名叫无心
    2021-01-07 01:05

    That is exactly the code I've tried. But It ended with the following error:

    Traceback (most recent call last):
      File "prog9.py", line 13, in 
        key = pkcs11.load_private_key("id_45")
      File "/usr/lib/pymodules/python2.5/M2Crypto/Engine.py", line 70, in load_private_key
        return self._engine_load_key(m2.engine_load_private_key, name, pin)
      File "/usr/lib/pymodules/python2.5/M2Crypto/Engine.py", line 60, in _engine_load_key
        raise EngineError(Err.get_error())
    M2Crypto.Engine.EngineError: 11814:error:26096075:engine outines:ENGINE_load_private_key:not initialised:eng_pkey.c:112:
    

    I'm using OpenSC PKCS11 lib, not aladdin lib. But I don't think the problem is closed.

提交回复
热议问题