From 8e03f2ebc966bd923ec5c66050755971bbc280ae Mon Sep 17 00:00:00 2001 From: simon75j Date: Thu, 30 Apr 2009 14:22:01 +0000 Subject: [PATCH] Use modhex from libyubikey. git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@52 b62f149e-849f-11dd-9899-c7ba65f7c4c7 --- Makefile.am | 4 +--- ykpers.c | 10 ++++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index 7a324a8..e99c608 100644 --- a/Makefile.am +++ b/Makefile.am @@ -43,7 +43,7 @@ lib_LTLIBRARIES = libykpers.la libykpers_la_SOURCES = ykpers.h ykpers.c ykpbkdf2.h ykpbkdf2.c \ rfc4634/hmac.c rfc4634/usha.c rfc4634/sha.h \ rfc4634/sha1.c rfc4634/sha224-256.c rfc4634/sha384-512.c -libykpers_la_LIBADD = ./yubikey-core/libykcore.la -lusb +libykpers_la_LIBADD = $(LTLIBYUBIKEY) ./yubikey-core/libykcore.la -lusb libykpers_la_LDFLAGS = -no-undefined \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) @@ -65,8 +65,6 @@ TESTS = $(ctests) # Release -#EXTRA_DIST = simple.mk - ChangeLog: svn2cl diff --git a/ykpers.c b/ykpers.c index abaccc7..5310d63 100644 --- a/ykpers.c +++ b/ykpers.c @@ -36,6 +36,8 @@ #include #include +#include + static const CONFIG default_config = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* fixed */ { 0, 0, 0, 0, 0, 0 }, /* uid */ @@ -308,7 +310,7 @@ int ykp_write_config(const CONFIG *cfg, writer(str_key_value_separator, strlen(str_key_value_separator), userdata); - yk_modhex_encode(buffer, cfg->fixed, cfg->fixedSize); + yubikey_modhex_encode(buffer, cfg->fixed, cfg->fixedSize); writer(buffer, strlen(buffer), userdata); writer("\n", 1, userdata); @@ -316,7 +318,7 @@ int ykp_write_config(const CONFIG *cfg, writer(str_key_value_separator, strlen(str_key_value_separator), userdata); - yk_modhex_encode(buffer, cfg->uid, UID_SIZE); + yubikey_modhex_encode(buffer, cfg->uid, UID_SIZE); writer(buffer, strlen(buffer), userdata); writer("\n", 1, userdata); @@ -324,7 +326,7 @@ int ykp_write_config(const CONFIG *cfg, writer(str_key_value_separator, strlen(str_key_value_separator), userdata); - yk_modhex_encode(buffer, cfg->key, KEY_SIZE); + yubikey_modhex_encode(buffer, cfg->key, KEY_SIZE); writer(buffer, strlen(buffer), userdata); writer("\n", 1, userdata); @@ -332,7 +334,7 @@ int ykp_write_config(const CONFIG *cfg, writer(str_key_value_separator, strlen(str_key_value_separator), userdata); - yk_modhex_encode(buffer, cfg->accCode, ACC_CODE_SIZE); + yubikey_modhex_encode(buffer, cfg->accCode, ACC_CODE_SIZE); writer(buffer, strlen(buffer), userdata); writer("\n", 1, userdata); -- 2.39.5