Hi,
I am trying to use Nitrokey Storage HOTP feature using python library. I am using Ubuntu 16.04 inside Virtualbox 5.2, running on mac.
I am running into following issue.
First when I try compile the libnitrokey, -DLIBNITROKEY_STATIC=OFF doesn’t seem to exist.
zs@mac:~/libnitrokey/build$ cmake … -DLIBNITROKEY_STATIC=OFF
libnitrokey: Build type: RelWithDebInfo
– Configuring done
– Generating done
CMake Warning:
Manually-specified variables were not used by the project:
LIBNITROKEY_STATIC
– Build files have been written to: /home/zs/libnitrokey/build
zs@mac:~/libnitrokey/build$ cmake … -L
libnitrokey: Build type: RelWithDebInfo
– Configuring done
– Generating done
– Build files have been written to: /home/zs/libnitrokey/build
– Cache values
ADD_ASAN:BOOL=OFF
ADD_TSAN:BOOL=OFF
BUILD_SHARED_LIBS:BOOL=ON
CMAKE_BUILD_TYPE:STRING=
CMAKE_INSTALL_PREFIX:PATH=/usr/local
COMPILE_OFFLINE_TESTS:BOOL=OFF
COMPILE_TESTS:BOOL=OFF
ERROR_ON_WARNING:BOOL=OFF
LOG_VOLATILE_DATA:BOOL=OFF
NO_LOG:BOOL=OFF
So when I continued with compiling using cmake ..
zs@mac:~/libnitrokey$ lsusb
Bus 001 Device 002: ID 20a0:4109 Clay Logic
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
I had to also comment out like 74 regarding the debug log message. But after that I get the following error.
zs@mac:~/libnitrokey$ ./python_bindings_example.py
Warning!
This example will change your configuration on inserted stick and overwrite your HOTP#2 slot.
Please write “continue” to continue or any other string to quit
continue
Please enter your admin PIN (empty string uses 12345678)12345678
Should log messages be shown (please write “yes” to enable)?yes
./build/libnitrokey-log.so
File does not exist: ./build/libnitrokey-log.so
Trying another
./build/libnitrokey.so
Traceback (most recent call last):
File “./python_bindings_example.py”, line 83, in
device_connected = libnitrokey.NK_login_auto() # connect to any Nitrokey Stick
File “/home/zs/.local/lib/python2.7/site-packages/cffi/api.py”, line 875, in getattr
make_accessor(name)
File “/home/zs/.local/lib/python2.7/site-packages/cffi/api.py”, line 870, in make_accessor
raise AttributeError(name)
AttributeError: NK_login_auto