aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 00dbf5283..8c1aa96d4 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -158,6 +158,7 @@ enum cmd_and_opt_values
aExportSecret,
aExportSecretSub,
aExportSshKey,
+ aExportSecretSshKey,
aCheckKeys,
aGenRevoke,
aDesigRevoke,
@@ -527,6 +528,7 @@ static gpgrt_opt_t opts[] = {
ARGPARSE_c (aExportSecret, "export-secret-keys" , "@" ),
ARGPARSE_c (aExportSecretSub, "export-secret-subkeys" , "@" ),
ARGPARSE_c (aExportSshKey, "export-ssh-key", "@" ),
+ ARGPARSE_c (aExportSecretSshKey, "export-secret-ssh-key", "@" ),
ARGPARSE_c (aImport, "import", N_("import/merge keys")),
ARGPARSE_c (aFastImport, "fast-import", "@"),
#ifdef ENABLE_CARD_SUPPORT
@@ -2676,6 +2678,7 @@ main (int argc, char **argv)
case aExportSecret:
case aExportSecretSub:
case aExportSshKey:
+ case aExportSecretSshKey:
case aSym:
case aClearsign:
case aGenRevoke:
@@ -4893,6 +4896,17 @@ main (int argc, char **argv)
}
break;
+ case aExportSecretSshKey:
+ if (argc != 1)
+ wrong_args ("--export-secret-ssh-key <user-id>");
+ rc = export_secret_ssh_key (ctrl, argv[0]);
+ if (rc)
+ {
+ write_status_failure ("export-ssh-key", rc);
+ log_error (_("export as ssh key failed: %s\n"), gpg_strerror (rc));
+ }
+ break;
+
case aSearchKeys:
sl = NULL;
for (; argc; argc--, argv++)