]> err.no Git - yubikey-personalization.old/commitdiff
Don't forget to make sure time_t gets properly declared, and actually get the time...
authorlevitte <levitte@b62f149e-849f-11dd-9899-c7ba65f7c4c7>
Wed, 8 Oct 2008 19:11:22 +0000 (19:11 +0000)
committerlevitte <levitte@b62f149e-849f-11dd-9899-c7ba65f7c4c7>
Wed, 8 Oct 2008 19:11:22 +0000 (19:11 +0000)
git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@32 b62f149e-849f-11dd-9899-c7ba65f7c4c7

ykpers.c

index 095cfae22033501c734d35b56d7b8ae69dd0171b..1e56e15f99fcd2e8a2a4655c5c0e5397632ab185 100644 (file)
--- a/ykpers.c
+++ b/ykpers.c
@@ -34,6 +34,7 @@
 
 #include <stdio.h>
 #include <string.h>
+#include <time.h>
 
 static const CONFIG default_config = {
        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* fixed */
@@ -115,7 +116,7 @@ int ykp_AES_key_from_passphrase(CONFIG *cfg, const char *passphrase,
                           salt from time */
 #                       include <ykpbkdf2.h>
 
-                       time_t t;
+                       time_t t = time(NULL);
                        uint8_t output[256]; /* 2048 bits is a lot! */
 
                        yk_hmac_sha1.prf_fn(passphrase, strlen(passphrase),