[seahorse] Fix subkey creation on newer GnuPG versions
- From: Stefan Walter <stefw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [seahorse] Fix subkey creation on newer GnuPG versions
- Date: Sat, 10 Oct 2009 02:53:11 +0000 (UTC)
commit 433bb13701b754f3cb2c0e8b93ec8b52744685b8
Author: nobled <nobled dreamwidth org>
Date: Thu Sep 10 13:59:52 2009 -0400
Fix subkey creation on newer GnuPG versions
gpg 2.0.12 and 1.4.10 and later, changed their --edit-key options
for creating subkeys. The prompts have changed in a backwards
incompatible manner.
Closes: bgo#594809
Signed-off-by: Stef Walter <stef memberwebs com>
pgp/seahorse-gpgme-key-op.h | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/pgp/seahorse-gpgme-key-op.h b/pgp/seahorse-gpgme-key-op.h
index b2a874f..591427e 100644
--- a/pgp/seahorse-gpgme-key-op.h
+++ b/pgp/seahorse-gpgme-key-op.h
@@ -34,7 +34,13 @@
#include "pgp/seahorse-gpgme-source.h"
#include "pgp/seahorse-gpgme-photo.h"
-/* Key type options. */
+/*
+ * Key type options.
+ * Sadly these are not consistent between versions of GPG.
+ */
+#if ( GPG_MAJOR_VERSION == 2 && GPG_MINOR_VERSION == 0 && GPG_MICRO_VERSION < 12 ) || \
+ ( GPG_MAJOR_VERSION == 1 && ( GPG_MINOR_VERSION < 4 || GPG_MICRO_VERSION < 10 ) )
+
typedef enum {
/* DSA key with ElGamal subkey. The DSA key will have length of 1024,
* while the ElGamal length is variable within #ELGAMAL_MIN and
@@ -59,6 +65,19 @@ typedef enum {
RSA_ENCRYPT = 6
} SeahorseKeyEncType;
+#else /* GPG version >=1.4.10 or >=2.0.12 */
+
+typedef enum {
+ RSA_RSA = 1,
+ DSA_ELGAMAL = 2,
+ DSA = 3,
+ RSA_SIGN = 4,
+ ELGAMAL = 5,
+ RSA_ENCRYPT = 6
+} SeahorseKeyEncType;
+
+#endif /* GPG version >=1.4.10 or >=2.0.12 */
+
/* Length ranges for key types */
typedef enum {
/* Minimum length for #DSA. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]