Skip to content

Commit

Permalink
digsig: changed type of the timestamp
Browse files Browse the repository at this point in the history
time_t was used in the signature and key packet headers,
which is typedef of long and is different on 32 and 64 bit architectures.
Signature and key format should be independent of architecture.
Similar to GPG, I have changed the type to uint32_t.

Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
Dmitry Kasatkin authored and James Morris committed Feb 20, 2012
1 parent b01543d commit 59cca65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/digsig.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ 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];
} __packed;

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];
Expand Down

0 comments on commit 59cca65

Please sign in to comment.