aboutsummaryrefslogtreecommitdiffstats
path: root/sm/export.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-03-08 18:19:21 +0000
committerWerner Koch <[email protected]>2010-03-08 18:19:21 +0000
commit6216d33e8cc1c2d01533b3e9b97dc7009b4f3553 (patch)
tree062bf701637025088b83a9e8684aa7a1eae68fb5 /sm/export.c
parentUse macros for iobuf ioctls. (diff)
downloadgnupg-6216d33e8cc1c2d01533b3e9b97dc7009b4f3553.tar.gz
gnupg-6216d33e8cc1c2d01533b3e9b97dc7009b4f3553.zip
Removed almost al dup calls.
Diffstat (limited to 'sm/export.c')
-rw-r--r--sm/export.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/sm/export.c b/sm/export.c
index 9a05b5176..2c8e57b5d 100644
--- a/sm/export.c
+++ b/sm/export.c
@@ -125,12 +125,10 @@ insert_duptable (duptable_t *table, unsigned char *fpr, int *exists)
}
-
-
-/* Export all certificates or just those given in NAMES. If STREAM is
- not NULL the output is send to this extended stream. */
+/* Export all certificates or just those given in NAMES. The output
+ is written to STREAM. */
void
-gpgsm_export (ctrl_t ctrl, strlist_t names, FILE *fp, estream_t stream)
+gpgsm_export (ctrl_t ctrl, strlist_t names, estream_t stream)
{
KEYDB_HANDLE hd = NULL;
KEYDB_SEARCH_DESC *desc = NULL;
@@ -256,24 +254,17 @@ gpgsm_export (ctrl_t ctrl, strlist_t names, FILE *fp, estream_t stream)
if (ctrl->create_pem)
{
if (count)
- {
- if (stream)
- es_putc ('\n', stream);
- else
- putc ('\n', fp);
- }
- print_short_info (cert, fp, stream);
- if (stream)
es_putc ('\n', stream);
- else
- putc ('\n', fp);
+ print_short_info (cert, NULL, stream);
+ es_putc ('\n', stream);
}
count++;
if (!b64writer)
{
ctrl->pem_name = "CERTIFICATE";
- rc = gpgsm_create_writer (&b64writer, ctrl, fp, stream, &writer);
+ rc = gpgsm_create_writer (&b64writer, ctrl,
+ NULL, stream, &writer);
if (rc)
{
log_error ("can't create writer: %s\n", gpg_strerror (rc));