From f24bbcc54f6f8e0b62b9776f5dea790b23c2681f Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Tue, 25 Jun 2002 11:14:44 +0000 Subject: [PATCH] 2002-06-25 Marcus Brinkmann * engine-gpgsm.c (_gpgme_gpgsm_op_export): Implement. --- trunk/gpgme/ChangeLog | 4 ++++ trunk/gpgme/engine-gpgsm.c | 20 ++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index b896650..cd73a3e 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,7 @@ +2002-06-25 Marcus Brinkmann + + * engine-gpgsm.c (_gpgme_gpgsm_op_export): Implement. + 2002-06-21 Marcus Brinkmann * engine-gpgsm.c (gpgsm_assuan_simple_command): Return ERR. diff --git a/trunk/gpgme/engine-gpgsm.c b/trunk/gpgme/engine-gpgsm.c index 7e26f0d..6115b25 100644 --- a/trunk/gpgme/engine-gpgsm.c +++ b/trunk/gpgme/engine-gpgsm.c @@ -759,8 +759,24 @@ GpgmeError _gpgme_gpgsm_op_export (GpgsmObject gpgsm, GpgmeRecipients recp, GpgmeData keydata, int use_armor) { - /* FIXME */ - return mk_error (Not_Implemented); + GpgmeError err; + + if (!gpgsm) + return mk_error (Invalid_Value); + + gpgsm->command = xtrystrdup ("EXPORT"); + if (!gpgsm->command) + return mk_error (Out_Of_Core); + + gpgsm->output_cb.data = keydata; + err = gpgsm_set_fd (gpgsm->assuan_ctx, "OUTPUT", gpgsm->output_fd_server, + use_armor ? "--armor" : 0); + if (err) + return err; + _gpgme_io_close (gpgsm->input_cb.fd); + _gpgme_io_close (gpgsm->message_cb.fd); + + return 0; } -- 2.26.2