Просмотр исходного кода

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>
Dmitry Kasatkin 13 лет назад
Родитель
Сommit
59cca653a6
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      include/linux/digsig.h

+ 2 - 2
include/linux/digsig.h

@@ -30,7 +30,7 @@ enum digest_algo {
 
 
 struct pubkey_hdr {
 struct pubkey_hdr {
 	uint8_t		version;	/* key format version */
 	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		algo;
 	uint8_t		nmpi;
 	uint8_t		nmpi;
 	char		mpi[0];
 	char		mpi[0];
@@ -38,7 +38,7 @@ struct pubkey_hdr {
 
 
 struct signature_hdr {
 struct signature_hdr {
 	uint8_t		version;	/* signature format version */
 	uint8_t		version;	/* signature format version */
-	time_t		timestamp;	/* signature made */
+	uint32_t	timestamp;	/* signature made */
 	uint8_t		algo;
 	uint8_t		algo;
 	uint8_t		hash;
 	uint8_t		hash;
 	uint8_t		keyid[8];
 	uint8_t		keyid[8];