diff options
author | Werner Koch <wk@gnupg.org> | 2002-06-25 11:34:10 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2002-06-25 11:34:10 +0200 |
commit | 5c5a3f689a8d96872e055d8e384a5684e4fd096c (patch) | |
tree | 0c5801d3a1e66b84788c427a69b4944b47957d9e /sm/export.c | |
parent | * gpgsm.c, gpgsm.h: New option --debug-no-path-validation. (diff) | |
download | gnupg2-5c5a3f689a8d96872e055d8e384a5684e4fd096c.tar.xz gnupg2-5c5a3f689a8d96872e055d8e384a5684e4fd096c.zip |
* certdump.c (print_dn_part): Always print a leading slash,
removed NEED_DELIM arg and changed caller.
* export.c (gpgsm_export): Print LFs to FP and not stdout.
(print_short_info): Ditto. Make use of gpgsm_print_name.
* server.c (cmd_export): Use output-fd instead of data lines; this
was actually the specified way.
Diffstat (limited to 'sm/export.c')
-rw-r--r-- | sm/export.c | 42 |
1 files changed, 16 insertions, 26 deletions
diff --git a/sm/export.c b/sm/export.c index fc82b7e6c..042850752 100644 --- a/sm/export.c +++ b/sm/export.c @@ -136,7 +136,7 @@ gpgsm_export (CTRL ctrl, STRLIST names, FILE *fp) if (count) putc ('\n', fp); print_short_info (cert, fp); - putc ('\n', stdout); + putc ('\n', fp); } count++; @@ -202,20 +202,14 @@ print_short_info (KsbaCert cert, FILE *fp) KsbaSexp sexp; int idx; - fputs ("Issuer ...: ", fp); - p = ksba_cert_get_issuer (cert, 0); - if (p) + for (idx=0; (p = ksba_cert_get_issuer (cert, idx)); idx++) { - print_sanitized_string (fp, p, '\n'); + fputs (!idx? "Issuer ...: " + : "\n aka ...: ", fp); + gpgsm_print_name (fp, p); xfree (p); - for (idx=1; (p = ksba_cert_get_issuer (cert, idx)); idx++) - { - fputs ("\n aka ...: ", fp); - print_sanitized_string (fp, p, '\n'); - xfree (p); - } } - putc ('\n', stdout); + putc ('\n', fp); fputs ("Serial ...: ", fp); sexp = ksba_cert_get_serial (cert); @@ -235,24 +229,20 @@ print_short_info (KsbaCert cert, FILE *fp) } xfree (sexp); } - putc ('\n', stdout); + putc ('\n', fp); - fputs ("Subject ..: ", fp); - p = ksba_cert_get_subject (cert, 0); - if (p) + for (idx=0; (p = ksba_cert_get_subject (cert, idx)); idx++) { - print_sanitized_string (fp, p, '\n'); + fputs (!idx? "Subject ..: " + : "\n aka ..: ", fp); + gpgsm_print_name (fp, p); xfree (p); - for (idx=1; (p = ksba_cert_get_subject (cert, idx)); idx++) - { - fputs ("\n aka ..: ", fp); - print_sanitized_string (fp, p, '\n'); - xfree (p); - } } - else - fputs ("none", fp); - putc ('\n', stdout); + putc ('\n', fp); } + + + + |