[svn] gpgme - r1297 - trunk/gpgme
svn author marcus
cvs at cvs.gnupg.org
Mon Jan 28 20:25:39 CET 2008
Author: marcus
Date: 2008-01-28 20:25:35 +0100 (Mon, 28 Jan 2008)
New Revision: 1297
Modified:
trunk/gpgme/ChangeLog
trunk/gpgme/engine-gpgsm.c
Log:
2008-01-28 Marcus Brinkmann <marcus at g10code.de>
* engine-gpgsm.c (map_input_enc): Rename to ...
(map_data_enc): ... this. Also change all callers.
(gpgsm_encrypt, gpgsm_export, gpgsm_export_ext, gpgsm_genkey)
(gpgsm_sign): Set encoding for output.
Modified: trunk/gpgme/ChangeLog
===================================================================
--- trunk/gpgme/ChangeLog 2008-01-28 18:46:08 UTC (rev 1296)
+++ trunk/gpgme/ChangeLog 2008-01-28 19:25:35 UTC (rev 1297)
@@ -1,3 +1,10 @@
+2008-01-28 Marcus Brinkmann <marcus at g10code.de>
+
+ * engine-gpgsm.c (map_input_enc): Rename to ...
+ (map_data_enc): ... this. Also change all callers.
+ (gpgsm_encrypt, gpgsm_export, gpgsm_export_ext, gpgsm_genkey)
+ (gpgsm_sign): Set encoding for output.
+
2008-01-28 Werner Koch <wk at g10code.com>
* keylist.c (gpgme_get_key): Skip duplicated keys. Fixes bug 876.
Modified: trunk/gpgme/engine-gpgsm.c
===================================================================
--- trunk/gpgme/engine-gpgsm.c 2008-01-28 18:46:08 UTC (rev 1296)
+++ trunk/gpgme/engine-gpgsm.c 2008-01-28 19:25:35 UTC (rev 1297)
@@ -788,7 +788,7 @@
static const char *
-map_input_enc (gpgme_data_t d)
+map_data_enc (gpgme_data_t d)
{
switch (gpgme_data_get_encoding (d))
{
@@ -1132,7 +1132,7 @@
return gpg_error (GPG_ERR_INV_VALUE);
gpgsm->input_cb.data = ciph;
- err = gpgsm_set_fd (gpgsm, INPUT_FD, map_input_enc (gpgsm->input_cb.data));
+ err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data));
if (err)
return gpg_error (GPG_ERR_GENERAL); /* FIXME */
gpgsm->output_cb.data = plain;
@@ -1288,11 +1288,12 @@
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
gpgsm->input_cb.data = plain;
- err = gpgsm_set_fd (gpgsm, INPUT_FD, map_input_enc (gpgsm->input_cb.data));
+ err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data));
if (err)
return err;
gpgsm->output_cb.data = ciph;
- err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" : 0);
+ err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor"
+ : map_data_enc (gpgsm->output_cb.data));
if (err)
return err;
gpgsm_clear_fd (gpgsm, MESSAGE_FD);
@@ -1328,7 +1329,8 @@
strcpy (&cmd[7], pattern);
gpgsm->output_cb.data = keydata;
- err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" : 0);
+ err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor"
+ : map_data_enc (gpgsm->output_cb.data));
if (err)
return err;
gpgsm_clear_fd (gpgsm, INPUT_FD);
@@ -1420,7 +1422,8 @@
*linep = '\0';
gpgsm->output_cb.data = keydata;
- err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" : 0);
+ err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor"
+ : map_data_enc (gpgsm->output_cb.data));
if (err)
return err;
gpgsm_clear_fd (gpgsm, INPUT_FD);
@@ -1444,11 +1447,12 @@
return gpg_error (GPG_ERR_INV_VALUE);
gpgsm->input_cb.data = help_data;
- err = gpgsm_set_fd (gpgsm, INPUT_FD, map_input_enc (gpgsm->input_cb.data));
+ err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data));
if (err)
return err;
gpgsm->output_cb.data = pubkey;
- err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" : 0);
+ err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor"
+ : map_data_enc (gpgsm->output_cb.data));
if (err)
return err;
gpgsm_clear_fd (gpgsm, MESSAGE_FD);
@@ -1469,7 +1473,7 @@
return gpg_error (GPG_ERR_INV_VALUE);
gpgsm->input_cb.data = keydata;
- err = gpgsm_set_fd (gpgsm, INPUT_FD, map_input_enc (gpgsm->input_cb.data));
+ err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data));
if (err)
return err;
gpgsm_clear_fd (gpgsm, OUTPUT_FD);
@@ -1717,11 +1721,12 @@
}
gpgsm->input_cb.data = in;
- err = gpgsm_set_fd (gpgsm, INPUT_FD, map_input_enc (gpgsm->input_cb.data));
+ err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data));
if (err)
return err;
gpgsm->output_cb.data = out;
- err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" : 0);
+ err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor"
+ : map_data_enc (gpgsm->output_cb.data));
if (err)
return err;
gpgsm_clear_fd (gpgsm, MESSAGE_FD);
@@ -1744,7 +1749,7 @@
return gpg_error (GPG_ERR_INV_VALUE);
gpgsm->input_cb.data = sig;
- err = gpgsm_set_fd (gpgsm, INPUT_FD, map_input_enc (gpgsm->input_cb.data));
+ err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data));
if (err)
return err;
if (plaintext)
More information about the Gnupg-commits
mailing list