aboutsummaryrefslogtreecommitdiffstats
path: root/sm/encrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sm/encrypt.c')
-rw-r--r--sm/encrypt.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/sm/encrypt.c b/sm/encrypt.c
index 3c43edf61..16c48c8d5 100644
--- a/sm/encrypt.c
+++ b/sm/encrypt.c
@@ -574,7 +574,8 @@ encrypt_cb (void *cb_value, char *buffer, size_t count, size_t *nread)
recipients are take from the certificate given in recplist; if this
is NULL it will be encrypted for a default recipient */
int
-gpgsm_encrypt (ctrl_t ctrl, certlist_t recplist, int data_fd, estream_t out_fp)
+gpgsm_encrypt (ctrl_t ctrl, certlist_t recplist, estream_t data_fp,
+ estream_t out_fp)
{
gpg_error_t err = 0;
gnupg_ksba_io_t b64writer = NULL;
@@ -586,7 +587,6 @@ gpgsm_encrypt (ctrl_t ctrl, certlist_t recplist, int data_fd, estream_t out_fp)
struct encrypt_cb_parm_s encparm;
DEK dek = NULL;
int recpno;
- estream_t data_fp = NULL;
certlist_t cl;
int count;
int compliant;
@@ -622,15 +622,6 @@ gpgsm_encrypt (ctrl_t ctrl, certlist_t recplist, int data_fd, estream_t out_fp)
goto leave;
}
- /* Fixme: We should use the unlocked version of the es functions. */
- data_fp = es_fdopen_nc (data_fd, "rb");
- if (!data_fp)
- {
- err = gpg_error_from_syserror ();
- log_error ("fdopen() failed: %s\n", gpg_strerror (err));
- goto leave;
- }
-
err = ksba_reader_new (&reader);
if (!err)
err = ksba_reader_set_cb (reader, encrypt_cb, &encparm);
@@ -855,7 +846,6 @@ gpgsm_encrypt (ctrl_t ctrl, certlist_t recplist, int data_fd, estream_t out_fp)
ksba_reader_release (reader);
keydb_release (kh);
xfree (dek);
- es_fclose (data_fp);
xfree (encparm.buffer);
return err;
}