aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2008-05-20 08:00:40 +0000
committerWerner Koch <[email protected]>2008-05-20 08:00:40 +0000
commitee3a1ec0d84eec6804fa188c0de292e06a49d7ec (patch)
tree6384674eafb4fb47545df65fcd28f816ae4d28b9
parentdoc/ (diff)
downloadgnupg-ee3a1ec0d84eec6804fa188c0de292e06a49d7ec.tar.gz
gnupg-ee3a1ec0d84eec6804fa188c0de292e06a49d7ec.zip
Fix --output option used when with --export-secret-kety-p12.
-rw-r--r--sm/ChangeLog5
-rw-r--r--sm/export.c2
-rw-r--r--sm/gpgsm.c2
-rw-r--r--sm/import.c2
4 files changed, 8 insertions, 3 deletions
diff --git a/sm/ChangeLog b/sm/ChangeLog
index 09e249dd2..fa6f0b791 100644
--- a/sm/ChangeLog
+++ b/sm/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-20 Werner Koch <[email protected]>
+
+ * gpgsm.c (main) <aExportSecretKeyP12>: Pass FP and not stdout to
+ the export function. Reported by Marc Mutz.
+
2008-05-06 Werner Koch <[email protected]>
* keylist.c (list_external_keys): Ignore NOT FOUND error code.
diff --git a/sm/export.c b/sm/export.c
index 1e8e95a2c..c1b9eaaf0 100644
--- a/sm/export.c
+++ b/sm/export.c
@@ -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)
{
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index 64629bfaf..a26775a58 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -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)
diff --git a/sm/import.c b/sm/import.c
index ba49da5dd..3045c89d5 100644
--- a/sm/import.c
+++ b/sm/import.c
@@ -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,