Fix --output option used when with --export-secret-kety-p12.

This commit is contained in:
Werner Koch 2008-05-20 08:00:40 +00:00
parent 7d714a3788
commit ee3a1ec0d8
4 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2008-05-20 Werner Koch <wk@g10code.com>
* gpgsm.c (main) <aExportSecretKeyP12>: Pass FP and not stdout to
the export function. Reported by Marc Mutz.
2008-05-06 Werner Koch <wk@g10code.com>
* keylist.c (list_external_keys): Ignore NOT FOUND error code.

View File

@ -369,7 +369,7 @@ gpgsm_p12_export (ctrl_t ctrl, const char *name, FILE *fp)
goto leave;
}
/* Lookup the certificate an make sure that it is unique. */
/* Lookup the certificate and make sure that it is unique. */
rc = keydb_search (hd, desc, 1);
if (!rc)
{

View File

@ -1808,7 +1808,7 @@ main ( int argc, char **argv)
FILE *fp = open_fwrite (opt.outfile?opt.outfile:"-");
if (argc == 1)
gpgsm_p12_export (&ctrl, *argv, stdout);
gpgsm_p12_export (&ctrl, *argv, fp);
else
wrong_args ("--export-secret-key-p12 KEY-ID");
if (fp != stdout)

View File

@ -652,7 +652,7 @@ parse_p12 (ctrl_t ctrl, ksba_reader_t reader,
{
/* We only write a plain error code and not direct
BAD_PASSPHRASE because the pkcs12 parser might issue this
message multiple times, BAd_PASSPHRASE in general requires a
message multiple times, BAD_PASSPHRASE in general requires a
keyID and parts of the import might actually succeed so that
IMPORT_PROBLEM is also not appropriate. */
gpgsm_status_with_err_code (ctrl, STATUS_ERROR,