]> err.no Git - yubikey-personalization.old/commitdiff
Don't forget to make sure time_t gets properly declared, and actually get the time...
authorRichard Levitte <levitte@lp.se>
Wed, 8 Oct 2008 19:11:22 +0000 (19:11 +0000)
committerRichard Levitte <levitte@lp.se>
Wed, 8 Oct 2008 19:11:22 +0000 (19:11 +0000)
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),