aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-08-24 10:41:24 +0000
committerWerner Koch <[email protected]>2015-08-24 10:41:24 +0000
commit2b632bbb78eee2b94c122f66d171a7c80e9c4fb0 (patch)
tree5e49878e39a7f63eb9d311752e52c32ecc4ee091 /doc
parentParse INQUIRE_MAXLEN in the passphrase callback. (diff)
downloadgpgme-2b632bbb78eee2b94c122f66d171a7c80e9c4fb0.tar.gz
gpgme-2b632bbb78eee2b94c122f66d171a7c80e9c4fb0.zip
Add an export secret key feature.
* src/gpgme.h.in (GPGME_EXPORT_MODE_SECRET): New. (GPGME_EXPORT_MODE_RAW): New. (GPGME_EXPORT_MODE_PKCS12): New. * src/export.c (export_start, export_ext_start): Allow new flags. * src/engine-gpg.c (export_common): Support secret key export. * src/engine-gpgsm.c (gpgsm_export, gpgsm_export_ext): Ditto. * src/gpgme-tool.c (cmd_export): Add options --secret, --raw, and --pkcs12. * tests/run-export.c (main): Likewise. -- Note that exporting secret X.509 keys requires GnuPG 2.1.8. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'doc')
-rw-r--r--doc/gpgme.texi15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index 010b914d..20e1912b 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -3700,6 +3700,21 @@ keys it removes all signatures except for the latest self-signatures.
For X.509 keys it has no effect.
+@item GPGME_EXPORT_MODE_SECRET
+Instead of exporting the public key, the secret key is exported. This
+may not be combined with @code{GPGME_EXPORT_MODE_EXTERN}. For X.509
+the export format is PKCS#8.
+
+@item GPGME_EXPORT_MODE_RAW
+If this flag is used with @code{GPGME_EXPORT_MODE_SECRET} for an X.509
+key the export format will be changed to PKCS#1. This flag may not be
+used with OpenPGP.
+
+@item GPGME_EXPORT_MODE_PKCS12
+If this flag is used with @code{GPGME_EXPORT_MODE_SECRET} for an X.509
+key the export format will be changed to PKCS#12 which also includes
+the certificate. This flag may not be used with OpenPGP.
+
@end table