summaryrefslogtreecommitdiffstats
path: root/crypt-gpgme.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2019-10-20 14:06:24 +0800
committerKevin McCarthy <kevin@8t8.us>2019-10-20 15:08:06 +0800
commit15f89f8e6b4a2388065c09665813e95c9464db3e (patch)
tree766756bb921b1d38d75340eca848fd8521413ffd /crypt-gpgme.c
parente3408a0032d0f25d503ca6dfcdfcd161ad5bcd74 (diff)
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.
Diffstat (limited to 'crypt-gpgme.c')
-rw-r--r--crypt-gpgme.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/crypt-gpgme.c b/crypt-gpgme.c
index 697da3f5..35441d2c 100644
--- a/crypt-gpgme.c
+++ b/crypt-gpgme.c
@@ -5157,7 +5157,7 @@ cleanup:
return rv;
}
-BODY *pgp_gpgme_make_key_attachment (char *tempf)
+BODY *pgp_gpgme_make_key_attachment (void)
{
crypt_key_t *key = NULL;
gpgme_ctx_t context = NULL;
@@ -5166,6 +5166,7 @@ BODY *pgp_gpgme_make_key_attachment (char *tempf)
gpgme_error_t err;
BODY *att = NULL;
char buff[LONG_STRING];
+ char *attfilename;
struct stat sb;
unset_option (OPTPGPCHECKTRUST);
@@ -5188,13 +5189,13 @@ BODY *pgp_gpgme_make_key_attachment (char *tempf)
goto bail;
}
- tempf = data_object_to_tempfile (keydata, tempf, NULL);
- if (!tempf)
+ attfilename = data_object_to_tempfile (keydata, NULL, NULL);
+ if (!attfilename)
goto bail;
att = mutt_new_body ();
- /* tempf is a newly allocated string, so this is correct: */
- att->filename = tempf;
+ /* attfilename is a newly allocated string, so this is correct: */
+ att->filename = attfilename;
att->unlink = 1;
att->use_disp = 0;
att->type = TYPEAPPLICATION;
@@ -5207,7 +5208,7 @@ BODY *pgp_gpgme_make_key_attachment (char *tempf)
att->description = safe_strdup (buff);
mutt_update_encoding (att);
- stat (tempf, &sb);
+ stat (attfilename, &sb);
att->length = sb.st_size;
bail: