mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* 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.
This commit is contained in:
parent
640688c4e2
commit
5c5a3f689a
5 changed files with 53 additions and 49 deletions
42
sm/export.c
42
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue