-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Hello Team,
I'm trying to use the etoken 5110 for authentication using SSH but I'm not able to load the dll file correctly as showen in my logs below . Could you please advise which dll should I be pointing to and where should I add the path to it. Please note that Cryptoki2.ini file does not exist so I think it's looking using defaults.py
Please advise how do I add this section to defaults.py
import logging
logging.basicConfig(level=logging.DEBUG)
from pycryptoki.default_templates import *
from pycryptoki.defines import *
from pycryptoki.key_generator import *
from pycryptoki.session_management import *c_initialize_ex()
INFO:pycryptoki.session_management:Initializing Cryptoki Library
WARNING:pycryptoki.cryptoki.helpers:No DLL Path or Chyrstoki.conf path set in defaults.py looking up DLL path in /etc/Chrystoki.conf
DEBUG:pycryptoki.cryptoki.helpers:Searching /etc/Chrystoki.conf for Chrystoki DLL path...
Traceback (most recent call last):
File "", line 1, in
File "C:\Users----\AppData\Local\Programs\Python\Python37\lib\site-packages\pycryptoki\exceptions.py", line 61, in luna_function_exception_handle
return_tuple = luna_function(*args, **kwargs)
File "C:\Users----\AppData\Local\Programs\Python\Python37\lib\site-packages\pycryptoki\session_management.py", line 83, in c_initialize
ret = C_Initialize(init_struct_p)
File "C:\Users----\AppData\Local\Programs\Python\Python37\lib\site-packages\pycryptoki\cryptoki\helpers.py", line 248, in luna_function
late_binded_function = getattr(CryptokiDLLSingleton().get_dll(), function_name)
File "C:\Users----\AppData\Local\Programs\Python\Python37\lib\site-packages\pycryptoki\cryptoki\helpers.py", line 189, in new
dll_path = os.environ.get(CRYSTOKI_CONF_DLL, parse_chrystoki_conf())
File "C:\Users----\AppData\Local\Programs\Python\Python37\lib\site-packages\pycryptoki\cryptoki\helpers.py", line 84, in parse_chrystoki_conf
dll_path = _search_for_dll_in_chrystoki_conf(conf_path)
File "C:\Users----\AppData\Local\Programs\Python\Python37\lib\site-packages\pycryptoki\cryptoki\helpers.py", line 108, in _search_for_dll_in_chrystoki_conf
dll_path = config.get("Chrystoki2", "LibNT")
File "C:\Users----\AppData\Local\Programs\Python\Python37\lib\configparser.py", line 780, in get
d = self._unify_values(section, vars)
File "C:\Users----\AppData\Local\Programs\Python\Python37\lib\configparser.py", line 1146, in _unify_values
raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'Chrystoki2'