]> granicus.if.org Git - neomutt/commitdiff
replace 'pgp_sig_t' with 'struct PgpSignature'
authorRichard Russon <rich@flatcap.org>
Tue, 16 May 2017 01:04:25 +0000 (02:04 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 16 May 2017 11:12:58 +0000 (12:12 +0100)
pgplib.c
pgplib.h
pgppubring.c

index 68e3e895c34b082c27160e15f600b313b62981c3..4a2f6ed226fc80c09761bbf39dc76022e0cf79ae 100644 (file)
--- a/pgplib.c
+++ b/pgplib.c
@@ -88,9 +88,9 @@ short pgp_get_abilities(unsigned char type)
   return (pgp_canencrypt(type) << 1) | pgp_cansign(type);
 }
 
-static void pgp_free_sig(pgp_sig_t **sigp)
+static void pgp_free_sig(struct PgpSignature **sigp)
 {
-  pgp_sig_t *sp = NULL, *q = NULL;
+  struct PgpSignature *sp = NULL, *q = NULL;
 
   if (!sigp || !*sigp)
     return;
index 7bfbffdc4003ff17f0225fd26871e1ff15a80fa1..9d657380c8ca0105fe9ea8a183339261717732b2 100644 (file)
--- a/pgplib.h
+++ b/pgplib.h
 #include "mutt_crypt.h"
 
 
-typedef struct pgp_signature
+struct PgpSignature
 {
-  struct pgp_signature *next;
+  struct PgpSignature *next;
   unsigned char sigtype;
   unsigned long sid1;
   unsigned long sid2;
-} pgp_sig_t;
+};
 
 struct PgpKeyInfo
 {
@@ -43,7 +43,7 @@ struct PgpKeyInfo
   int numalg;
   const char *algorithm;
   struct PgpKeyInfo *parent;
-  struct pgp_signature *sigs;
+  struct PgpSignature *sigs;
   struct PgpKeyInfo *next;
 };
 
@@ -54,7 +54,7 @@ typedef struct pgp_uid
   int flags;
   struct PgpKeyInfo *parent;
   struct pgp_uid *next;
-  struct pgp_signature *sigs;
+  struct PgpSignature *sigs;
 } pgp_uid_t;
 
 enum pgp_version
index 0ec6f13574a733a4e8878cd3adf85b12cf7fc90a..0065fe50e41d45a5384dc7b1a77e56c7316ef381 100644 (file)
@@ -84,7 +84,7 @@ static void print_fingerprint(struct PgpKeyInfo *p)
   printf("fpr:::::::::%s:\n", p->fingerprint);
 }
 
-static void pgpring_dump_signatures(pgp_sig_t *sig)
+static void pgpring_dump_signatures(struct PgpSignature *sig)
 {
   for (; sig; sig = sig->next)
   {
@@ -415,7 +415,7 @@ static struct PgpKeyInfo *pgp_parse_keyinfo(unsigned char *buff, size_t l)
   }
 }
 
-static int pgp_parse_pgp2_sig(unsigned char *buff, size_t l, struct PgpKeyInfo *p, pgp_sig_t *s)
+static int pgp_parse_pgp2_sig(unsigned char *buff, size_t l, struct PgpKeyInfo *p, struct PgpSignature *s)
 {
   unsigned char sigtype;
   time_t sig_gen_time;
@@ -455,7 +455,7 @@ static int pgp_parse_pgp2_sig(unsigned char *buff, size_t l, struct PgpKeyInfo *
   return 0;
 }
 
-static int pgp_parse_pgp3_sig(unsigned char *buff, size_t l, struct PgpKeyInfo *p, pgp_sig_t *s)
+static int pgp_parse_pgp3_sig(unsigned char *buff, size_t l, struct PgpKeyInfo *p, struct PgpSignature *s)
 {
   unsigned char sigtype;
   unsigned char skt;
@@ -594,7 +594,7 @@ static int pgp_parse_pgp3_sig(unsigned char *buff, size_t l, struct PgpKeyInfo *
   return 0;
 }
 
-static int pgp_parse_sig(unsigned char *buff, size_t l, struct PgpKeyInfo *p, pgp_sig_t *sig)
+static int pgp_parse_sig(unsigned char *buff, size_t l, struct PgpKeyInfo *p, struct PgpSignature *sig)
 {
   if (!buff || l < 2 || !p)
     return -1;
@@ -628,7 +628,7 @@ static struct PgpKeyInfo *pgp_parse_keyblock(FILE *fp)
   struct PgpKeyInfo *p = NULL;
   pgp_uid_t *uid = NULL;
   pgp_uid_t **addr = NULL;
-  pgp_sig_t **lsig = NULL;
+  struct PgpSignature **lsig = NULL;
 
   fgetpos(fp, &pos);
 
@@ -684,7 +684,7 @@ static struct PgpKeyInfo *pgp_parse_keyblock(FILE *fp)
       {
         if (lsig)
         {
-          pgp_sig_t *signature = safe_calloc(sizeof(pgp_sig_t), 1);
+          struct PgpSignature *signature = safe_calloc(sizeof(struct PgpSignature), 1);
           *lsig = signature;
           lsig = &signature->next;