]> err.no Git - yubikey-personalization.old/commitdiff
Use modhex from libyubikey.
authorsimon75j <simon75j@b62f149e-849f-11dd-9899-c7ba65f7c4c7>
Thu, 30 Apr 2009 14:22:01 +0000 (14:22 +0000)
committersimon75j <simon75j@b62f149e-849f-11dd-9899-c7ba65f7c4c7>
Thu, 30 Apr 2009 14:22:01 +0000 (14:22 +0000)
git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@52 b62f149e-849f-11dd-9899-c7ba65f7c4c7

Makefile.am
ykpers.c

index 7a324a88925f1233a2f85581e7ea69c9c41d6775..e99c6083d10c6130f09b132593e507a1113b7f04 100644 (file)
@@ -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
 
index abaccc7903cc08f18dcfca4be637a969ea96a3cf..5310d6319eb96792a5583582f05d2d901e6af60e 100644 (file)
--- a/ykpers.c
+++ b/ykpers.c
@@ -36,6 +36,8 @@
 #include <string.h>
 #include <time.h>
 
+#include <yubikey.h>
+
 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);