Hi Samir,
thanks for your reply. Maybe I get something wrong or maybe I am not the double plus perfect C programmer. (At least I know the last is true
Obviously this is exactly what is used for the ubuntu package yubikey-personalization.
And the functions of interest are contained in the ykpers.c file. Which will be compiled and statically linked into the command line tool ykpersonalize.
But I do not want to compile these functions statically but I'd rather use a shared library. In fact, i can not compile it into my project, since it is a python programm. And there I'd like to use a .so or .dll. And I'd like to do the same function calls for Linux and Windows.
When I take a look at ykpersonalize.c to get an idea which functions need to be called, those functions are not contained in any shared lib. I modified a ykpersonalize.c this way, to make it easy in some simple steps to enroll a YK with HOTP without userinteraction - this would be:
Code:
yk_init()
yk = yk_open_first_key()
yk_get_status(yk, st)
yk_check_firmware_version(yk)
ykp_configure_for(cfg, 1, st)
ykp_set_tktflag_OATH_HOTP(cfg, true)
ykp_write_config(cfg, writer, stderr)
yk_write_config(yk,ykp_core_config(cfg), ykp_config_num(cfg),use_access_code ? access_code : NULL)
done.
Again, I'd like to have those necessary functions in a shared lib (so/dll). What do you think about this?
Kind regards
Cornelius
Kind regards
Cornelius