-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
c_initialize_ex() from the basic example returns an error #39
Comments
It's looking for a section in the |
Thanks @astraw38 for the reply, I created the environment variable CHRYSTOKI_CONF_DLL with the path to *.dll library of the PKCS_11 library, but I still get the same error. For the |
And per the following code: # depends on different product, lib path could be configured by pointing to path, or stored in a file
dll_path = os.environ.get(CRYSTOKI_CONF_DLL, parse_chrystoki_conf()) It should never search in crystoki.ini if you set the envvar correctly. |
@astraw38 thanks for the reply, So I added your suggestion and run the following script :
Somehow I still get the same issue : It seems I am still unable to to prevent it from looking for that |
The code I copy/pasted is from pycryptoki (https://github.com/ThalesGroup/pycryptoki/blob/master/pycryptoki/cryptoki/helpers.py#L189), showing you how it works internally. If it's still reading from the config file, then you do not have the environment variables set. You can view envvars by just printing Again, check the link I pasted before for info about crystoki.ini. |
Thanks @astraw38 for the reply, I checked that the env var is correctly set, what I noticed is that the parse_chrystoki_conf() is called even if the var is found (weird, right? ). I had to change the line :
to :
Only then, the |
That session # is rather high - what HSM are you using? And do other tools like ckdemo work? |
I am using an HSM simulator from UTIMACO, I haven't tested yet with Luna as I am not familiar with the tool/environment (hence the absence of |
I believe there's ways to demo DPOD? I can make no guarantees whatsosever about Utimaco HSMs & this project - there's a lot of Luna-specific handling. It's pretty close to pure P11, but I know defaults and a lot of constants are vendor-specific, and pretty much all |
Hi,
When trying to run the basic example in the readme file, the function call
c_initialize_ex()
returns the following error :... configparser.NoSectionError: No section: 'Chrystoki2'
I am using Pyhton 3.9.2 on a windows machine
Thanks in advance
The text was updated successfully, but these errors were encountered: