Environment : Windows Operating System
I am trying to access the smart card using PyKCS11 module and not able to generate the key pair as per the below link.
https://pkcs11wrap.sourceforge.io/api/samples.html#generate-a-key-pair
I am having difficulty in pointing the lib file for PYKCS11LIB file.
import PyKCS11
pkcs11 = PyKCS11.PyKCS11Lib()
pkcs11.load('C:\Program Files\OpenSCProject\OpenSC\pkcs11\onepin-opensc-pkcs11.dll')
or
pkcs11.load('C:\Program Files\OpenSCProject\OpenSC\pkcs11\opensc-pkcs11.dll')
No matter whatever the file is being used, Below is the error:
raise PyKCS11Error(rv, pkcs11dll_filename)
PyKCS11.PyKCS11Error: Load (C:\Program Files\OpenSCProject\OpenSC\pkcs11\onepin-opensc-pkcs11.dll)
LoadLibrary() failed with error 193: %1 is not a valid Win32 application.
Please help me with any pointers to get the library file error resolution on Windows operating system.