diff --git a/src/evmctl.c b/src/evmctl.c index 04955e0..c3048af 100644 --- a/src/evmctl.c +++ b/src/evmctl.c @@ -108,7 +108,7 @@ enum digest_algo { struct pubkey_hdr { uint8_t version; /* key format version */ - time_t timestamp; /* key made, always 0 for now */ + uint32_t timestamp; /* key made, always 0 for now */ uint8_t algo; uint8_t nmpi; char mpi[0]; @@ -116,7 +116,7 @@ struct pubkey_hdr { struct signature_hdr { uint8_t version; /* signature format version */ - time_t timestamp; /* signature made */ + uint32_t timestamp; /* signature made */ uint8_t algo; uint8_t hash; uint8_t keyid[8]; @@ -336,7 +336,7 @@ static int sign_hash(const unsigned char *hash, int size, const char *keyfile, u /* now create a new hash */ hdr->version = 1; - time(&hdr->timestamp); + hdr->timestamp = time(NULL); hdr->algo = PUBKEY_ALGO_RSA; hdr->hash = DIGEST_ALGO_SHA1;