diff options
author | Werner Koch <[email protected]> | 2004-02-19 16:26:32 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2004-02-19 16:26:32 +0000 |
commit | a1b487a17a084b3d8d652d4feabb7de2d67ad292 (patch) | |
tree | f0a4fbb66f6b7d89de99fc8e69c20dc96f7db0d4 /sm/gpgsm.c | |
parent | * acinclude.m4: Removed macros to detect gpg-error, libgcrypt, (diff) | |
download | gnupg-a1b487a17a084b3d8d652d4feabb7de2d67ad292.tar.gz gnupg-a1b487a17a084b3d8d652d4feabb7de2d67ad292.zip |
* protect-tool.c: New options --have-cert and --prompt.
(export_p12_file): Read a certificate from STDIN and pass it to
p12_build. Detect a keygrip and construct the filename in that
case. Unprotcet a key if needed. Print error messages for key
formats we can't handle.
(release_passphrase): New.
(get_passphrase): New arg PROMPTNO. Return the allocated
string. Changed all callers.
* minip12.c: Revamped the build part.
(p12_build): New args CERT and CERTLEN.
* simple-pwquery.c (agent_open): Don't mangle INFOSTR.
* export.c (export_p12, popen_protect_tool)
(gpgsm_p12_export): New.
* gpgsm.c (main): New command --export-secret-key-p12.
Diffstat (limited to '')
-rw-r--r-- | sm/gpgsm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sm/gpgsm.c b/sm/gpgsm.c index de265c128..ede432b1b 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -74,6 +74,7 @@ enum cmd_and_opt_values { aSendKeys, aRecvKeys, aExport, + aExportSecretKeyP12, aCheckKeys, /* nyi */ aServer, aLearnCard, @@ -344,6 +345,8 @@ static ARGPARSE_OPTS opts[] = { #endif { aDummy, "throw-keyid", 0, "@"}, { aDummy, "notation-data", 2, "@"}, + { aExportSecretKeyP12, "export-secret-key-p12", 256, "@"}, + { 302, NULL, 0, N_( "@\n(See the man page for a complete listing of all commands and options)\n" @@ -869,6 +872,7 @@ main ( int argc, char **argv) case aSendKeys: case aRecvKeys: case aExport: + case aExportSecretKeyP12: case aListKeys: case aListExternalKeys: case aListSecretKeys: @@ -1406,6 +1410,12 @@ main ( int argc, char **argv) free_strlist(sl); break; + case aExportSecretKeyP12: + if (argc == 1) + gpgsm_p12_export (&ctrl, *argv, stdout); + else + wrong_args (_("--export-secret-key-p12 KEY-ID")); + break; case aSendKeys: case aRecvKeys: |