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/certdump.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/certdump.c')
-rw-r--r-- | sm/certdump.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/sm/certdump.c b/sm/certdump.c index 11e9f659f..dfd4e330e 100644 --- a/sm/certdump.c +++ b/sm/certdump.c @@ -364,9 +364,8 @@ parse_dn (const unsigned char *string) } -static int -print_dn_part (FILE *fp, struct dn_array_s *dn, const char *key, - int need_delim) +static void +print_dn_part (FILE *fp, struct dn_array_s *dn, const char *key) { int any = 0; @@ -374,11 +373,7 @@ print_dn_part (FILE *fp, struct dn_array_s *dn, const char *key, { if (!strcmp (dn->key, key) && dn->value && *dn->value) { - if (need_delim) - { - putc ('/', fp); - need_delim = 0; - } + putc ('/', fp); if (any) fputs (" + ", fp); else @@ -387,7 +382,6 @@ print_dn_part (FILE *fp, struct dn_array_s *dn, const char *key, any = 1; } } - return any; } /* Print all parts of a DN in a "standard" sequence. We first print @@ -398,13 +392,10 @@ print_dn_parts (FILE *fp, struct dn_array_s *dn) const char *stdpart[] = { "CN", "OU", "O", "STREET", "L", "ST", "C", "EMail", NULL }; - int any=0, i; + int i; for (i=0; stdpart[i]; i++) - { - if (print_dn_part (fp, dn, stdpart[i], any)) - any = 1; - } + print_dn_part (fp, dn, stdpart[i]); /* now print the rest without any specific ordering */ for (; dn->key; dn++) @@ -415,10 +406,7 @@ print_dn_parts (FILE *fp, struct dn_array_s *dn) break; } if (!stdpart[i]) - { - if (print_dn_part (fp, dn, dn->key, any)) - any = 1; - } + print_dn_part (fp, dn, dn->key); } } |