[seahorse] Set usage flags during unattended key generation
- From: Stefan Walter <stefw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [seahorse] Set usage flags during unattended key generation
- Date: Sun, 11 Oct 2009 01:03:06 +0000 (UTC)
commit 9065861cdb314a6351fe241145c73436f9252a8f
Author: nobled <nobled dreamwidth org>
Date: Sat Oct 10 16:27:24 2009 -0400
Set usage flags during unattended key generation
Add lines for "Key-Usage:" and "Subkey-Usage:" to the standard input
to `gpg --batch --gen-key`, as documented in GnuPG's doc/DETAILS.
Closes: bgo#555205
pgp/seahorse-gpgme-key-op.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/pgp/seahorse-gpgme-key-op.c b/pgp/seahorse-gpgme-key-op.c
index f45c5de..af90f4e 100644
--- a/pgp/seahorse-gpgme-key-op.c
+++ b/pgp/seahorse-gpgme-key-op.c
@@ -135,15 +135,15 @@ seahorse_gpgme_key_op_generate (SeahorseGpgmeSource *psrc, const gchar *name,
common = g_strdup_printf ("Name-Comment: %s\n%s", comment, common);
if (type == RSA_SIGN)
- key_type = "Key-Type: RSA";
+ key_type = "Key-Type: RSA\nKey-Usage: sign";
else
- key_type = "Key-Type: DSA";
+ key_type = "Key-Type: DSA\nKey-Usage: sign";
start = g_strdup_printf ("<GnupgKeyParms format=\"internal\">\n%s\nKey-Length: ", key_type);
/* Subkey xml */
if (type == DSA_ELGAMAL)
- parms = g_strdup_printf ("%s%d\nSubkey-Type: ELG-E\nSubkey-Length: %d\n%s",
+ parms = g_strdup_printf ("%s%d\nSubkey-Type: ELG-E\nSubkey-Length: %d\nSubkey-Usage: encrypt\n%s",
start, (length < DSA_MAX) ? length : DSA_MAX, length, common);
else
parms = g_strdup_printf ("%s%d\n%s", start, length, common);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]