mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove make_key_attachment parameter.

The parameter is not actually used anywhere. The next commit will
convert the classic pgp implementation to use the buffer pool. This
change will simplify the logic.

+21 -19
+1 -1
compose.c
··· 1053 1053 break; 1054 1054 1055 1055 new = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR)); 1056 - if ((new->content = crypt_pgp_make_key_attachment(NULL)) != NULL) 1056 + if ((new->content = crypt_pgp_make_key_attachment()) != NULL) 1057 1057 { 1058 1058 update_idx (menu, actx, new); 1059 1059 menu->redraw |= REDRAW_INDEX;
+7 -6
crypt-gpgme.c
··· 5157 5157 return rv; 5158 5158 } 5159 5159 5160 - BODY *pgp_gpgme_make_key_attachment (char *tempf) 5160 + BODY *pgp_gpgme_make_key_attachment (void) 5161 5161 { 5162 5162 crypt_key_t *key = NULL; 5163 5163 gpgme_ctx_t context = NULL; ··· 5166 5166 gpgme_error_t err; 5167 5167 BODY *att = NULL; 5168 5168 char buff[LONG_STRING]; 5169 + char *attfilename; 5169 5170 struct stat sb; 5170 5171 5171 5172 unset_option (OPTPGPCHECKTRUST); ··· 5188 5189 goto bail; 5189 5190 } 5190 5191 5191 - tempf = data_object_to_tempfile (keydata, tempf, NULL); 5192 - if (!tempf) 5192 + attfilename = data_object_to_tempfile (keydata, NULL, NULL); 5193 + if (!attfilename) 5193 5194 goto bail; 5194 5195 5195 5196 att = mutt_new_body (); 5196 - /* tempf is a newly allocated string, so this is correct: */ 5197 - att->filename = tempf; 5197 + /* attfilename is a newly allocated string, so this is correct: */ 5198 + att->filename = attfilename; 5198 5199 att->unlink = 1; 5199 5200 att->use_disp = 0; 5200 5201 att->type = TYPEAPPLICATION; ··· 5207 5208 att->description = safe_strdup (buff); 5208 5209 mutt_update_encoding (att); 5209 5210 5210 - stat (tempf, &sb); 5211 + stat (attfilename, &sb); 5211 5212 att->length = sb.st_size; 5212 5213 5213 5214 bail:
+1 -1
crypt-gpgme.h
··· 40 40 int smime_gpgme_application_handler (BODY *a, STATE *s); 41 41 int pgp_gpgme_encrypted_handler (BODY *a, STATE *s); 42 42 43 - BODY *pgp_gpgme_make_key_attachment (char *tempf); 43 + BODY *pgp_gpgme_make_key_attachment (void); 44 44 45 45 BODY *pgp_gpgme_sign_message (BODY *a); 46 46 BODY *smime_gpgme_sign_message (BODY *a);
+2 -2
crypt-mod-pgp-classic.c
··· 71 71 return pgp_encrypt_message (a, keylist, sign); 72 72 } 73 73 74 - static BODY *crypt_mod_pgp_make_key_attachment (char *tempf) 74 + static BODY *crypt_mod_pgp_make_key_attachment (void) 75 75 { 76 - return pgp_make_key_attachment (tempf); 76 + return pgp_make_key_attachment (); 77 77 } 78 78 79 79 static int crypt_mod_pgp_check_traditional (FILE *fp, BODY *b, int just_one)
+2 -2
crypt-mod-pgp-gpgme.c
··· 95 95 return pgp_gpgme_encrypt_message (a, keylist, sign); 96 96 } 97 97 98 - static BODY *crypt_mod_pgp_make_key_attachment (char *tempf) 98 + static BODY *crypt_mod_pgp_make_key_attachment (void) 99 99 { 100 - return pgp_gpgme_make_key_attachment (tempf); 100 + return pgp_gpgme_make_key_attachment (); 101 101 } 102 102 103 103 static void crypt_mod_pgp_set_sender (const char *sender)
+1 -1
crypt-mod.h
··· 42 42 int just_one); 43 43 typedef BODY *(*crypt_func_pgp_traditional_encryptsign_t) (BODY *a, int flags, 44 44 char *keylist); 45 - typedef BODY *(*crypt_func_pgp_make_key_attachment_t) (char *tempf); 45 + typedef BODY *(*crypt_func_pgp_make_key_attachment_t) (void); 46 46 typedef char *(*crypt_func_findkeys_t) (ADDRESS *adrlist, int oppenc_mode); 47 47 typedef BODY *(*crypt_func_sign_message_t) (BODY *a); 48 48 typedef BODY *(*crypt_func_pgp_encrypt_message_t) (BODY *a, char *keylist,
+2 -2
cryptglue.c
··· 243 243 } 244 244 245 245 /* Generate a PGP public key attachment. */ 246 - BODY *crypt_pgp_make_key_attachment (char *tempf) 246 + BODY *crypt_pgp_make_key_attachment (void) 247 247 { 248 248 if (CRYPT_MOD_CALL_CHECK (PGP, pgp_make_key_attachment)) 249 - return (CRYPT_MOD_CALL (PGP, pgp_make_key_attachment)) (tempf); 249 + return (CRYPT_MOD_CALL (PGP, pgp_make_key_attachment)) (); 250 250 251 251 return NULL; 252 252 }
+1 -1
mutt_crypt.h
··· 231 231 void crypt_pgp_free_key (pgp_key_t *kpp); 232 232 233 233 /* Generate a PGP public key attachment. */ 234 - BODY *crypt_pgp_make_key_attachment (char *tempf); 234 + BODY *crypt_pgp_make_key_attachment (void); 235 235 236 236 /* This routine attempts to find the keyids of the recipients of a 237 237 message. It returns NULL if any of the keys can not be found.
+1 -1
pgp.h
··· 30 30 31 31 int pgp_check_traditional (FILE *, BODY *, int); 32 32 BODY *pgp_decrypt_part (BODY *, STATE *, FILE *, BODY *); 33 - BODY *pgp_make_key_attachment (char *); 33 + BODY *pgp_make_key_attachment (void); 34 34 const char *pgp_micalg (const char *fname); 35 35 36 36 char *_pgp_keyid (pgp_key_t);
+2 -1
pgpkey.c
··· 716 716 717 717 /* generate a public key attachment */ 718 718 719 - BODY *pgp_make_key_attachment (char *tempf) 719 + BODY *pgp_make_key_attachment (void) 720 720 { 721 721 BODY *att; 722 722 char buff[LONG_STRING]; ··· 727 727 pid_t thepid; 728 728 pgp_key_t key; 729 729 unset_option (OPTPGPCHECKTRUST); 730 + const char *tempf = NULL; 730 731 731 732 key = pgp_ask_for_key (_("Please enter the key ID: "), NULL, 0, PGP_PUBRING); 732 733
+1 -1
send.c
··· 966 966 BODY *tmp; 967 967 968 968 if ((WithCrypto & APPLICATION_PGP) 969 - && (tmp = crypt_pgp_make_key_attachment (NULL)) == NULL) 969 + && (tmp = crypt_pgp_make_key_attachment ()) == NULL) 970 970 return -1; 971 971 972 972 tmp->next = msg->content;