Skip to content

Commit bbd3656

Browse files
Dmitry Kasatkinxjamesmorris
authored andcommitted
digsig: changed type of the timestamp
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>
1 parent 2d51448 commit bbd3656

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎include/linux/digsig.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ enum digest_algo {
3030

3131
struct pubkey_hdr {
3232
uint8_t version; /* key format version */
33-
time_t timestamp; /* key made, always 0 for now */
33+
uint32_t timestamp; /* key made, always 0 for now */
3434
uint8_t algo;
3535
uint8_t nmpi;
3636
char mpi[0];
3737
} __packed;
3838

3939
struct signature_hdr {
4040
uint8_t version; /* signature format version */
41-
time_t timestamp; /* signature made */
41+
uint32_t timestamp; /* signature made */
4242
uint8_t algo;
4343
uint8_t hash;
4444
uint8_t keyid[8];

0 commit comments

Comments
 (0)