From cvs at cvs.gnupg.org Wed Feb 5 10:40:48 2014 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 05 Feb 2014 10:40:48 +0100 Subject: [git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-298-g2c81480 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 2c814806d759e5cf611200e8210137cf8502a672 (commit) from 2ba818de1aa311ba8eb27012d69e93dd16e7d4ed (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2c814806d759e5cf611200e8210137cf8502a672 Author: Werner Koch Date: Wed Feb 5 10:37:59 2014 +0100 gpg: Change format for the key size in --list-key and --edit-key. * g10/gpg.c (oLegacyListMode, opts, main): Add --legacy-list-mode. * g10/options.h (struct opt): Add field legacy_list_mode. * g10/keydb.h (PUBKEY_STRING_SIZE): New. * g10/keyid.c (pubkey_string): New. * g10/import.c (import_one, import_secret_one): Use pubkey_string. * g10/keylist.c (print_seckey_info): Ditto. (print_pubkey_info, print_card_key_info): Ditto. (list_keyblock_print): Ditto. * g10/mainproc.c (list_node): Ditto. * g10/pkclist.c (do_edit_ownertrust, build_pk_list): Ditto. * g10/keyedit.c (show_key_with_all_names): Ditto. Also change the format. (show_basic_key_info): Ditto. * common/openpgp-oid.c (openpgp_curve_to_oid): Also allow "ed25519". (openpgp_oid_to_curve): Downcase "ed25519" -- For ECC it seems to be better to show the name of the curve and not just the size of the prime field. The curve name does not anymore fit into the "" descriptor (e.g. "2048R") and a fixed length format does not work either. Thus the new format uses "rsa2048" - RSA with 2048 bit "elg1024" - Elgamal with 1024 bit "ed25519" - ECC using the curve Ed25519. "E_1.2.3.4" - ECC using the unsupported curve with OID "1.2.3.4". unless --legacy-list-mode is given. In does not anymore line up nicely in columns thus I expect further changes to this new format. Signed-off-by: Werner Koch diff --git a/common/openpgp-oid.c b/common/openpgp-oid.c index 28567b7..a2a3617 100644 --- a/common/openpgp-oid.c +++ b/common/openpgp-oid.c @@ -275,7 +275,7 @@ openpgp_curve_to_oid (const char *name, unsigned int *r_nbits) if (!name) oidstr = NULL; - else if (!strcmp (name, "Ed25519")) + else if (!strcmp (name, "Ed25519") || !strcmp (name, "ed25519")) { oidstr = "1.3.6.1.4.1.11591.15.1"; nbits = 255; @@ -324,8 +324,7 @@ openpgp_curve_to_oid (const char *name, unsigned int *r_nbits) } -/* Map an OpenPGP OID to the Libgcrypt curve NAME. If R_NBITS is not - NULL store the bit size of the curve there. Returns "?" for +/* Map an OpenPGP OID to the Libgcrypt curve NAME. Returns "?" for unknown curve names. */ const char * openpgp_oid_to_curve (const char *oid) @@ -335,7 +334,7 @@ openpgp_oid_to_curve (const char *oid) if (!oid) name = ""; else if (!strcmp (oid, "1.3.6.1.4.1.11591.15.1")) - name = "Ed25519"; + name = "ed25519"; else if (!strcmp (oid, "1.2.840.10045.3.1.7")) name = "nistp256"; else if (!strcmp (oid, "1.3.132.0.10")) diff --git a/doc/gpg.texi b/doc/gpg.texi index 26179bd..c1ce07b 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -2053,6 +2053,15 @@ Since GnuPG 2.0.10, this mode is always used and thus this option is obsolete; it does not harm to use it though. @end ifclear + at ifset gpgtwoone + at item --legacy-list-mode + at opindex legacy-list-mode +Revert to the pre-2.1 public key list mode. This only affects the +human readable output and not the machine interface +(i.e. @code{--with-colons}). Note that the legacy format does not +allow to convey suitable information for elliptic curves. + at end ifset + @item --with-fingerprint @opindex with-fingerprint Same as the command @option{--fingerprint} but changes only the format diff --git a/g10/gpg.c b/g10/gpg.c index 5b33105..a487913 100644 --- a/g10/gpg.c +++ b/g10/gpg.c @@ -331,6 +331,7 @@ enum cmd_and_opt_values oTrustedKey, oNoExpensiveTrustChecks, oFixedListMode, + oLegacyListMode, oNoSigCache, oNoSigCreateCheck, oAutoCheckTrustDB, @@ -690,6 +691,7 @@ static ARGPARSE_OPTS opts[] = { ARGPARSE_s_n (oHonorHttpProxy, "honor-http-proxy", "@"), ARGPARSE_s_n (oFastListMode, "fast-list-mode", "@"), ARGPARSE_s_n (oFixedListMode, "fixed-list-mode", "@"), + ARGPARSE_s_n (oLegacyListMode, "legacy-list-mode", "@"), ARGPARSE_s_n (oListOnly, "list-only", "@"), ARGPARSE_s_n (oIgnoreTimeConflict, "ignore-time-conflict", "@"), ARGPARSE_s_n (oIgnoreValidFrom, "ignore-valid-from", "@"), @@ -2876,6 +2878,7 @@ main (int argc, char **argv) break; case oFastListMode: opt.fast_list_mode = 1; break; case oFixedListMode: /* Dummy */ break; + case oLegacyListMode: opt.legacy_list_mode = 1; break; case oListOnly: opt.list_only=1; break; case oIgnoreTimeConflict: opt.ignore_time_conflict = 1; break; case oIgnoreValidFrom: opt.ignore_valid_from = 1; break; diff --git a/g10/import.c b/g10/import.c index 7ba7303..9c14e8b 100644 --- a/g10/import.c +++ b/g10/import.c @@ -792,6 +792,7 @@ import_one (ctrl_t ctrl, int mod_key = 0; int same_key = 0; int non_self = 0; + char pkstrbuf[PUBKEY_STRING_SIZE]; /* get the key and print some info about it */ node = find_kbnode( keyblock, PKT_PUBLIC_KEY ); @@ -805,9 +806,8 @@ import_one (ctrl_t ctrl, if( opt.verbose && !opt.interactive ) { - log_info( "pub %4u%c/%s %s ", - nbits_from_pk( pk ), - pubkey_letter( pk->pubkey_algo ), + log_info( "pub %s/%s %s ", + pubkey_string (pk, pkstrbuf, sizeof pkstrbuf), keystr_from_pk(pk), datestr_from_pk(pk) ); if (uidnode) print_utf8_buffer (log_get_stream (), @@ -1539,6 +1539,7 @@ import_secret_one (ctrl_t ctrl, const char *fname, KBNODE keyblock, int rc = 0; int nr_prev; kbnode_t pub_keyblock; + char pkstrbuf[PUBKEY_STRING_SIZE]; /* Get the key and print some info about it */ node = find_kbnode (keyblock, PKT_SECRET_KEY); @@ -1552,9 +1553,8 @@ import_secret_one (ctrl_t ctrl, const char *fname, KBNODE keyblock, if (opt.verbose) { - log_info ("sec %4u%c/%s %s ", - nbits_from_pk (pk), - pubkey_letter (pk->pubkey_algo), + log_info ("sec %s/%s %s ", + pubkey_string (pk, pkstrbuf, sizeof pkstrbuf), keystr_from_pk (pk), datestr_from_pk (pk)); if (uidnode) print_utf8_buffer (log_get_stream (), uidnode->pkt->pkt.user_id->name, diff --git a/g10/keydb.h b/g10/keydb.h index 449d22e..6834fc9 100644 --- a/g10/keydb.h +++ b/g10/keydb.h @@ -256,6 +256,8 @@ int parse_auto_key_locate(char *options); /*-- keyid.c --*/ int pubkey_letter( int algo ); +char *pubkey_string (PKT_public_key *pk, char *buffer, size_t bufsize); +#define PUBKEY_STRING_SIZE 32 u32 v3_keyid (gcry_mpi_t a, u32 *ki); void hash_public_key( gcry_md_hd_t md, PKT_public_key *pk ); size_t keystrlen(void); diff --git a/g10/keyedit.c b/g10/keyedit.c index 08b71d8..e455e84 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -2683,6 +2683,7 @@ show_key_with_all_names (KBNODE keyblock, int only_marked, int with_revoker, int i; int do_warn = 0; PKT_public_key *primary = NULL; + char pkstrbuf[PUBKEY_STRING_SIZE]; if (opt.with_colons) { @@ -2761,15 +2762,20 @@ show_key_with_all_names (KBNODE keyblock, int only_marked, int with_revoker, } keyid_from_pk (pk, NULL); - tty_printf ("%s%c %4u%c/%s ", + tty_printf ("%s%c %s/%s", node->pkt->pkttype == PKT_PUBLIC_KEY ? "pub" : node->pkt->pkttype == PKT_PUBLIC_SUBKEY ? "sub" : node->pkt->pkttype == PKT_SECRET_KEY ? "sec" : "ssb", (node->flag & NODFLG_SELKEY) ? '*' : ' ', - nbits_from_pk (pk), - pubkey_letter (pk->pubkey_algo), keystr (pk->keyid)); + pubkey_string (pk, pkstrbuf, sizeof pkstrbuf), + keystr (pk->keyid)); - tty_printf (_("created: %s"), datestr_from_pk (pk)); + if (opt.legacy_list_mode) + tty_printf (" "); + else + tty_printf ("\n "); + + tty_printf (_("created: %s"), datestr_from_pk (pk)); tty_printf (" "); if (pk->flags.revoked) tty_printf (_("revoked: %s"), revokestr_from_pk (pk)); @@ -2785,8 +2791,8 @@ show_key_with_all_names (KBNODE keyblock, int only_marked, int with_revoker, && pk->seckey_info->is_protected && pk->seckey_info->s2k.mode == 1002) { - tty_printf (" "); - tty_printf (_("card-no: ")); + tty_printf ("%*s%s", opt.legacy_list_mode? 21:5, "", + _("card-no: ")); if (pk->seckey_info->ivlen == 16 && !memcmp (pk->seckey_info->iv, "\xD2\x76\x00\x01\x24\x01", 6)) @@ -2813,7 +2819,9 @@ show_key_with_all_names (KBNODE keyblock, int only_marked, int with_revoker, { if (opt.trust_model != TM_ALWAYS) { - tty_printf ("%*s", (int) keystrlen () + 13, ""); + tty_printf ("%*s", + opt.legacy_list_mode? + ((int) keystrlen () + 13):5, ""); /* Ownertrust is only meaningful for the PGP or classic trust models */ if (opt.trust_model == TM_PGP @@ -2865,6 +2873,7 @@ show_basic_key_info (KBNODE keyblock) { KBNODE node; int i; + char pkstrbuf[PUBKEY_STRING_SIZE]; /* The primary key */ for (node = keyblock; node; node = node->next) @@ -2876,12 +2885,12 @@ show_basic_key_info (KBNODE keyblock) /* Note, we use the same format string as in other show functions to make the translation job easier. */ - tty_printf ("%s %4u%c/%s ", + tty_printf ("%s %s/%s ", node->pkt->pkttype == PKT_PUBLIC_KEY ? "pub" : node->pkt->pkttype == PKT_PUBLIC_SUBKEY ? "sub" : node->pkt->pkttype == PKT_SECRET_KEY ? "sec" :"ssb", - nbits_from_pk (pk), - pubkey_letter (pk->pubkey_algo), keystr_from_pk (pk)); + pubkey_string (pk, pkstrbuf, sizeof pkstrbuf), + keystr_from_pk (pk)); tty_printf (_("created: %s"), datestr_from_pk (pk)); tty_printf (" "); tty_printf (_("expires: %s"), expirestr_from_pk (pk)); @@ -2915,16 +2924,17 @@ show_key_and_fingerprint (KBNODE keyblock) { KBNODE node; PKT_public_key *pk = NULL; + char pkstrbuf[PUBKEY_STRING_SIZE]; for (node = keyblock; node; node = node->next) { if (node->pkt->pkttype == PKT_PUBLIC_KEY) { pk = node->pkt->pkt.public_key; - tty_printf ("pub %4u%c/%s %s ", - nbits_from_pk (pk), - pubkey_letter (pk->pubkey_algo), - keystr_from_pk (pk), datestr_from_pk (pk)); + tty_printf ("pub %s/%s %s ", + pubkey_string (pk, pkstrbuf, sizeof pkstrbuf), + keystr_from_pk(pk), + datestr_from_pk (pk)); } else if (node->pkt->pkttype == PKT_USER_ID) { diff --git a/g10/keyid.c b/g10/keyid.c index 5fa44ef..9ed64a4 100644 --- a/g10/keyid.c +++ b/g10/keyid.c @@ -1,6 +1,7 @@ /* keyid.c - key ID and fingerprint handling * Copyright (C) 1998, 1999, 2000, 2001, 2003, * 2004, 2006, 2010 Free Software Foundation, Inc. + * Copyright (C) 2014 Werner Koch * * This file is part of GnuPG. * @@ -57,13 +58,81 @@ pubkey_letter( int algo ) case PUBKEY_ALGO_ELGAMAL_E: return 'g' ; case PUBKEY_ALGO_ELGAMAL: return 'G' ; case PUBKEY_ALGO_DSA: return 'D' ; - case PUBKEY_ALGO_EDDSA: return 'E' ; /* ECC EdDSA (sign only) */ - case PUBKEY_ALGO_ECDSA: return 'E' ; /* ECC DSA (sign only) */ case PUBKEY_ALGO_ECDH: return 'e' ; /* ECC DH (encrypt only) */ + case PUBKEY_ALGO_ECDSA: return 'E' ; /* ECC DSA (sign only) */ + case PUBKEY_ALGO_EDDSA: return 'E' ; /* ECC EdDSA (sign only) */ default: return '?'; } } +/* Return a string describing the public key algorithm and the + keysize. For elliptic curves the functions prints the name of the + curve because the keysize is a property of the curve. The string + is copied to the supplied buffer up a length of BUFSIZE-1. + Examples for the output are: + + "rsa2048" - RSA with 2048 bit + "elg1024" - Elgamal with 1024 bit + "ed25519" - ECC using the curve Ed25519. + "E_1.2.3.4" - ECC using the unsupported curve with OID "1.2.3.4". + "E_1.3.6.1.4.1.11591.2.12242973" ECC with a bogus OID. + "unknown_N" - Unknown OpenPGP algorithm N. + + If the option --legacy-list-mode is active, the output use the + legacy format: + + "2048R" - RSA with 2048 bit + "1024g" - Elgamal with 1024 bit + "256E" - ECDSA using a curve with 256 bit + + The macro PUBKEY_STRING_SIZE may be used to allocate a buffer with + a suitable size.*/ +char * +pubkey_string (PKT_public_key *pk, char *buffer, size_t bufsize) +{ + const char *prefix = NULL; + + if (opt.legacy_list_mode) + { + snprintf (buffer, bufsize, "%4u%c", + nbits_from_pk (pk), pubkey_letter (pk->pubkey_algo)); + return buffer; + } + + switch (pk->pubkey_algo) + { + case PUBKEY_ALGO_RSA: + case PUBKEY_ALGO_RSA_E: + case PUBKEY_ALGO_RSA_S: prefix = "rsa"; break; + case PUBKEY_ALGO_ELGAMAL_E: prefix = "elg"; break; + case PUBKEY_ALGO_DSA: prefix = "dsa"; break; + case PUBKEY_ALGO_ELGAMAL: prefix = "xxx"; break; + case PUBKEY_ALGO_ECDH: + case PUBKEY_ALGO_ECDSA: + case PUBKEY_ALGO_EDDSA: prefix = ""; break; + } + + if (prefix && *prefix) + snprintf (buffer, bufsize, "%s%u", prefix, nbits_from_pk (pk)); + else if (prefix) + { + char *curve = openpgp_oid_to_str (pk->pkey[0]); + const char *name = openpgp_oid_to_curve (curve); + + if (*name && *name != '?') + snprintf (buffer, bufsize, "%s", name); + else if (curve) + snprintf (buffer, bufsize, "E_%s", curve); + else + snprintf (buffer, bufsize, "E_error"); + xfree (curve); + } + else + snprintf (buffer, bufsize, "unknown_%u", (unsigned int)pk->pubkey_algo); + + return buffer; +} + /* Hash a public key. This function is useful for v4 fingerprints and for v3 or v4 key signing. */ diff --git a/g10/keylist.c b/g10/keylist.c index 9a96c87..82d60c2 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -136,13 +136,13 @@ print_seckey_info (PKT_public_key *pk) { u32 keyid[2]; char *p; + char pkstrbuf[PUBKEY_STRING_SIZE]; keyid_from_pk (pk, keyid); p = get_user_id_native (keyid); - tty_printf ("\nsec %4u%c/%s %s %s\n", - nbits_from_pk (pk), - pubkey_letter (pk->pubkey_algo), + tty_printf ("\nsec %s/%s %s %s\n", + pubkey_string (pk, pkstrbuf, sizeof pkstrbuf), keystr (keyid), datestr_from_pk (pk), p); xfree (p); @@ -156,6 +156,7 @@ print_pubkey_info (estream_t fp, PKT_public_key * pk) { u32 keyid[2]; char *p; + char pkstrbuf[PUBKEY_STRING_SIZE]; keyid_from_pk (pk, keyid); @@ -168,9 +169,8 @@ print_pubkey_info (estream_t fp, PKT_public_key * pk) if (fp) tty_printf ("\n"); - tty_fprintf (fp, "pub %4u%c/%s %s %s\n", - nbits_from_pk (pk), - pubkey_letter (pk->pubkey_algo), + tty_fprintf (fp, "pub %s/%s %s %s\n", + pubkey_string (pk, pkstrbuf, sizeof pkstrbuf), keystr (keyid), datestr_from_pk (pk), p); xfree (p); } @@ -186,6 +186,7 @@ print_card_key_info (estream_t fp, kbnode_t keyblock) char *hexgrip; char *serialno; int s2k_char; + char pkstrbuf[PUBKEY_STRING_SIZE]; for (node = keyblock; node; node = node->next) { @@ -207,10 +208,11 @@ print_card_key_info (estream_t fp, kbnode_t keyblock) else s2k_char = '#'; /* Key not found. */ - tty_fprintf (fp, "%s%c %4u%c/%s ", + tty_fprintf (fp, "%s%c %s/%s ", node->pkt->pkttype == PKT_PUBLIC_KEY ? "sec" : "ssb", - s2k_char, nbits_from_pk (pk), - pubkey_letter (pk->pubkey_algo), keystr_from_pk (pk)); + s2k_char, + pubkey_string (pk, pkstrbuf, sizeof pkstrbuf), + keystr_from_pk (pk)); tty_fprintf (fp, _("created: %s"), datestr_from_pk (pk)); tty_fprintf (fp, " "); tty_fprintf (fp, _("expires: %s"), expirestr_from_pk (pk)); @@ -780,6 +782,7 @@ list_keyblock_print (KBNODE keyblock, int secret, int fpr, void *opaque) int s2k_char; char *hexgrip = NULL; char *serialno = NULL; + char pkstrbuf[PUBKEY_STRING_SIZE]; /* Get the keyid from the keyblock. */ node = find_kbnode (keyblock, PKT_PUBLIC_KEY); @@ -811,11 +814,12 @@ list_keyblock_print (KBNODE keyblock, int secret, int fpr, void *opaque) check_trustdb_stale (); - es_fprintf (es_stdout, "%s%c %4u%c/%s %s", - secret? "sec":"pub", - s2k_char, - nbits_from_pk (pk), pubkey_letter (pk->pubkey_algo), - keystr_from_pk (pk), datestr_from_pk (pk)); + + es_fprintf (es_stdout, "%s%c %s/%s %s", + secret? "sec":"pub", + s2k_char, + pubkey_string (pk, pkstrbuf, sizeof pkstrbuf), + keystr_from_pk (pk), datestr_from_pk (pk)); if (pk->pubkey_algo == PUBKEY_ALGO_ECDSA || pk->pubkey_algo == PUBKEY_ALGO_EDDSA @@ -947,10 +951,10 @@ list_keyblock_print (KBNODE keyblock, int secret, int fpr, void *opaque) else s2k_char = ' '; - es_fprintf (es_stdout, "%s%c %4u%c/%s %s", + es_fprintf (es_stdout, "%s%c %s/%s %s", secret? "ssb":"sub", s2k_char, - nbits_from_pk (pk2), pubkey_letter (pk2->pubkey_algo), + pubkey_string (pk2, pkstrbuf, sizeof pkstrbuf), keystr_from_pk (pk2), datestr_from_pk (pk2)); if (pk2->pubkey_algo == PUBKEY_ALGO_ECDSA diff --git a/g10/mainproc.c b/g10/mainproc.c index 5f8d119..6bd475b 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -923,6 +923,7 @@ list_node( CTX c, KBNODE node ) { int any=0; int mainkey; + char pkstrbuf[PUBKEY_STRING_SIZE]; if( !node ) ; @@ -958,9 +959,10 @@ list_node( CTX c, KBNODE node ) } } else - printf("%s %4u%c/%s %s%s", - mainkey? "pub":"sub", nbits_from_pk( pk ), - pubkey_letter( pk->pubkey_algo ), keystr_from_pk( pk ), + printf("%s %s/%s %s%s", + mainkey? "pub":"sub", + pubkey_string (pk, pkstrbuf, sizeof pkstrbuf), + keystr_from_pk( pk ), datestr_from_pk( pk ), mainkey?" ":""); if( mainkey ) { diff --git a/g10/options.h b/g10/options.h index 4a7eca2..15ae412 100644 --- a/g10/options.h +++ b/g10/options.h @@ -177,6 +177,7 @@ struct int no_literal; ulong set_filesize; int fast_list_mode; + int legacy_list_mode; int ignore_time_conflict; int ignore_valid_from; int ignore_crc_error; diff --git a/g10/pkclist.c b/g10/pkclist.c index e1a4428..d94f59e 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -188,6 +188,7 @@ do_edit_ownertrust (PKT_public_key *pk, int mode, int min_num; int did_help=defer_help; unsigned int minimum=get_min_ownertrust(pk); + char pkstrbuf[PUBKEY_STRING_SIZE]; switch(minimum) { @@ -221,8 +222,8 @@ do_edit_ownertrust (PKT_public_key *pk, int mode, KBNODE keyblock, un; tty_printf(_("No trust value assigned to:\n")); - tty_printf("%4u%c/%s %s\n",nbits_from_pk( pk ), - pubkey_letter( pk->pubkey_algo ), + tty_printf("%s/%s %s\n", + pubkey_string (pk, pkstrbuf, sizeof pkstrbuf), keystr(keyid), datestr_from_pk( pk ) ); p=get_user_id_native(keyid); tty_printf(_(" \"%s\"\n"),p); @@ -893,6 +894,7 @@ build_pk_list (ctrl_t ctrl, int any_recipients=0; strlist_t rov,remusr; char *def_rec = NULL; + char pkstrbuf[PUBKEY_STRING_SIZE]; /* Try to expand groups if any have been defined. */ if (opt.grouplist) @@ -1027,11 +1029,11 @@ build_pk_list (ctrl_t ctrl, u32 keyid[2]; keyid_from_pk(iter->pk,keyid); - tty_printf("%4u%c/%s %s \"", - nbits_from_pk(iter->pk), - pubkey_letter(iter->pk->pubkey_algo), - keystr(keyid), - datestr_from_pk(iter->pk)); + tty_printf ("%s/%s %s \"", + pubkey_string (iter->pk, + pkstrbuf, sizeof pkstrbuf), + keystr(keyid), + datestr_from_pk (iter->pk)); if (iter->pk->user_id) tty_print_utf8_string(iter->pk->user_id->name, ----------------------------------------------------------------------- Summary of changes: common/openpgp-oid.c | 7 +++-- doc/gpg.texi | 9 +++++++ g10/gpg.c | 3 +++ g10/import.c | 12 ++++----- g10/keydb.h | 2 ++ g10/keyedit.c | 38 ++++++++++++++++---------- g10/keyid.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++-- g10/keylist.c | 36 ++++++++++++++----------- g10/mainproc.c | 8 +++--- g10/options.h | 1 + g10/pkclist.c | 16 ++++++----- 11 files changed, 153 insertions(+), 52 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Feb 6 13:34:58 2014 From: cvs at cvs.gnupg.org (by Sam Tuke) Date: Thu, 06 Feb 2014 13:34:58 +0100 Subject: [git] gnupg-doc - branch, master, updated. 4fe393b3efd30d624cbb3ecd6995a998445e5d19 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GnuPG website and other docs". The branch, master has been updated via 4fe393b3efd30d624cbb3ecd6995a998445e5d19 (commit) from 7b17aa6d546251e04257bea9dc7c8e2b343726e2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4fe393b3efd30d624cbb3ecd6995a998445e5d19 Author: Sam Tuke Date: Thu Feb 6 13:35:46 2014 +0100 Added new blog post "crowdfunding complete" diff --git a/misc/blog.gnupg.org/20140206-crowdfunding-complete.html b/misc/blog.gnupg.org/20140206-crowdfunding-complete.html new file mode 100644 index 0000000..1307bfb --- /dev/null +++ b/misc/blog.gnupg.org/20140206-crowdfunding-complete.html @@ -0,0 +1,187 @@ + + + + + + Crowdfunding complete - Blog - GnuPG + + + + ++ + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
  + [GnuPG Logo]  
+ · English ·   +    
+
+ + + + + + + + + + + + + + + +
Links + +  
  
 
+
+ + + + + + + + + + + + + + + +
+ + + +
+

Mission complete: campaign ends, closing stats

+
Posted 6th February 2014 by Sam Tuke
+ +

After 50 days of crowdfunding, the GnuPG campaign for new website and infrastructure will close tomorrow. That means rewards for backers can now be ordered and preparations for dispatch can begin. Here are the results so far:

+ +
    +
  • 36.741 EUR raised out of 24.000 target
  • +
  • 1.081 people donated in support
  • +
  • 350 EUR Largest single donation
  • +
  • 33 EUR average donation
  • +
  • 365 Stickers claimed
  • +
  • 300 T-shirts claimed
  • +
  • 191 GnuPG email addresses claimed
  • +
  • 793 Additional Twitter followers (from 60)
  • +
+ +

Goteo, the Free Software platform hosting the campaign, usually required two 40 day rounds of funding, but in our case we're ending early, after just 50 days. This will enable us to deliver the new site and GnuPG 2.1 faster, and is possible thanks to reaching our goal so quickly (in just 26 hours).

+ +

We're currently preparing a system for collecting donor preferences for their rewards (sizes, addresses, etc.), so expect to be contacted in the next week or two if that includes you.

+ +

Thanks again to all our backers for the overwhelming support that GnuPG has received!

+ +
+ + + +
 
  
 
+
  +
+ + + + + + + + + + + + +
 Technical resources for this
+ service are sponsered by
 
  + OpenIT +  
+
+ +

+ + Valid XHTML 1.0! +     + + Digital Respect for the Masses +     + + Peace! +     + + Valid CSS! +

+ + + +
+
+ + + + + + + \ No newline at end of file diff --git a/misc/blog.gnupg.org/index.html b/misc/blog.gnupg.org/index.html index dd1ad1c..888bcea 100644 --- a/misc/blog.gnupg.org/index.html +++ b/misc/blog.gnupg.org/index.html @@ -73,6 +73,36 @@
+ +

Mission complete: campaign ends, closing stats

+
+
Posted 6th February 2014 by Sam Tuke
+ +

After 50 days of crowdfunding, the GnuPG campaign for new website and infrastructure will close tomorrow. That means rewards for backers can now be ordered and preparations for dispatch can begin. Here are the results so far:

+ +
    +
  • 36.741 EUR raised out of 24.000 target
  • +
  • 1.081 people donated in support
  • +
  • 350 EUR Largest single donation
  • +
  • 33 EUR average donation
  • +
  • 365 Stickers claimed
  • +
  • 300 T-shirts claimed
  • +
  • 191 GnuPG email addresses claimed
  • +
  • 793 Additional Twitter followers (from 60)
  • +
+ +

Goteo, the Free Software platform hosting the campaign, usually required two 40 day rounds of funding, but in our case we're ending early, after just 50 days. This will enable us to deliver the new site and GnuPG 2.1 faster, and is possible thanks to reaching our goal so quickly (in just 26 hours).

+ +

We're currently preparing a system for collecting donor preferences for their rewards (sizes, addresses, etc.), so expect to be contacted in the next week or two if that includes you.

+ +

Thanks again to all our backers for the overwhelming support that GnuPG has received!

+ +

+ +
+ +
+

Keysigning at FOSDEM

----------------------------------------------------------------------- Summary of changes: ...em.html => 20140206-crowdfunding-complete.html} | 29 +++++++++++-------- misc/blog.gnupg.org/index.html | 30 ++++++++++++++++++++ 2 files changed, 47 insertions(+), 12 deletions(-) copy misc/blog.gnupg.org/{20140127-find-fosdem.html => 20140206-crowdfunding-complete.html} (73%) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Thu Feb 6 13:46:45 2014 From: cvs at cvs.gnupg.org (by Sam Tuke) Date: Thu, 06 Feb 2014 13:46:45 +0100 Subject: [git] gnupg-doc - branch, master, updated. 836b79cccb6903e7975add585f4d3752d4843020 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GnuPG website and other docs". The branch, master has been updated via 836b79cccb6903e7975add585f4d3752d4843020 (commit) from 4fe393b3efd30d624cbb3ecd6995a998445e5d19 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 836b79cccb6903e7975add585f4d3752d4843020 Author: Sam Tuke Date: Thu Feb 6 13:48:01 2014 +0100 Added links to latest posts diff --git a/web/index.org b/web/index.org index 86e700b..b1a5931 100644 --- a/web/index.org +++ b/web/index.org @@ -44,6 +44,14 @@ all [[file:news.org][news of previous years]] is also available. # GnuPG's latest news are available as [[http://feedvalidator.org/check.cgi?url%3Dhttp://www.gnupg.org/news.en.rss][RSS 2.0 compliant]] feed. Just # point or paste the [[news.en.rss][RSS file]] into your aggregator. +** Mission complete: campaign ends, closing stats (2014-02-06) + +After 50 days of crowdfunding, the GnuPG campaign for new website and infrastructure will close tomorrow. That means rewards for backers can now be ordered and preparations for dispatch can begin. Here are the results so far. [[http://blog.gnupg.org/20140206-crowdfunding-complete.html][{more}]] + +** Find us at FOSDEM (2014-01-27) + +On Friday Werner and Sam are heading to FOSDEM, the largest Free Software conference in Europe, along with many GnuPG hackers, users, and supporters. Get in touch if you'd like to talk about the existing or future campaigns while we're there. [[http://blog.gnupg.org/20140127-find-fosdem.html][{more}]] + ** How good is Goteo? An appraisal (2013-12-30) "One question: why did you choose the quite unknown Spanish crowdfunding site Goteo?" So shot back the reply to the press release I had just sent to a few dozen selected journalists announcing the launch of the GnuPG crowdfunding campaign. This is my experience of the Goteo crowfunding platform and conclusions. ----------------------------------------------------------------------- Summary of changes: web/index.org | 8 ++++++++ 1 file changed, 8 insertions(+) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Thu Feb 6 15:15:00 2014 From: cvs at cvs.gnupg.org (by Sam Tuke) Date: Thu, 06 Feb 2014 15:15:00 +0100 Subject: [git] gnupg-doc - branch, master, updated. 6fcdbb6f1b32f77b80701f241c240481e9b05da6 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GnuPG website and other docs". The branch, master has been updated via 6fcdbb6f1b32f77b80701f241c240481e9b05da6 (commit) from 836b79cccb6903e7975add585f4d3752d4843020 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6fcdbb6f1b32f77b80701f241c240481e9b05da6 Author: Sam Tuke Date: Thu Feb 6 15:15:41 2014 +0100 Added image of funding to blog post diff --git a/misc/blog.gnupg.org/20140206-crowdfunding-complete.html b/misc/blog.gnupg.org/20140206-crowdfunding-complete.html index 1307bfb..c3b77a5 100644 --- a/misc/blog.gnupg.org/20140206-crowdfunding-complete.html +++ b/misc/blog.gnupg.org/20140206-crowdfunding-complete.html @@ -72,9 +72,15 @@
+

Mission complete: campaign ends, closing stats

Posted 6th February 2014 by Sam Tuke
+
+ +

Today's donation totals

+
+

After 50 days of crowdfunding, the GnuPG campaign for new website and infrastructure will close tomorrow. That means rewards for backers can now be ordered and preparations for dispatch can begin. Here are the results so far:

    diff --git a/misc/blog.gnupg.org/img/funding-chart.png b/misc/blog.gnupg.org/img/funding-chart.png new file mode 100644 index 0000000..1348563 Binary files /dev/null and b/misc/blog.gnupg.org/img/funding-chart.png differ diff --git a/misc/blog.gnupg.org/img/keysigning-party.jpg b/misc/blog.gnupg.org/img/keysigning-party.jpg new file mode 100644 index 0000000..b50ca00 Binary files /dev/null and b/misc/blog.gnupg.org/img/keysigning-party.jpg differ diff --git a/misc/blog.gnupg.org/index.html b/misc/blog.gnupg.org/index.html index 888bcea..a6f8dc3 100644 --- a/misc/blog.gnupg.org/index.html +++ b/misc/blog.gnupg.org/index.html @@ -78,6 +78,11 @@
    Posted 6th February 2014 by Sam Tuke
    +
    + +

    Today's donation totals

    +
    +

    After 50 days of crowdfunding, the GnuPG campaign for new website and infrastructure will close tomorrow. That means rewards for backers can now be ordered and preparations for dispatch can begin. Here are the results so far:

      ----------------------------------------------------------------------- Summary of changes: misc/blog.gnupg.org/20140206-crowdfunding-complete.html | 6 ++++++ misc/blog.gnupg.org/img/funding-chart.png | Bin 0 -> 20808 bytes misc/blog.gnupg.org/img/keysigning-party.jpg | Bin 0 -> 2016369 bytes misc/blog.gnupg.org/index.html | 5 +++++ 4 files changed, 11 insertions(+) create mode 100644 misc/blog.gnupg.org/img/funding-chart.png create mode 100644 misc/blog.gnupg.org/img/keysigning-party.jpg hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Thu Feb 6 17:54:20 2014 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 06 Feb 2014 17:54:20 +0100 Subject: [git] gnupg-doc - branch, master, updated. a99298a88016b76934f8d857d6310135cf08ffcf Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GnuPG website and other docs". The branch, master has been updated via a99298a88016b76934f8d857d6310135cf08ffcf (commit) via 0f11313d3ac0bd558b16f54aa6845ffeb414ac10 (commit) via d39b82b3a832711c6b600cccbb444b912c03bdfc (commit) from 6fcdbb6f1b32f77b80701f241c240481e9b05da6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a99298a88016b76934f8d857d6310135cf08ffcf Author: Werner Koch Date: Thu Feb 6 17:45:53 2014 +0100 Move most news from 2013 the list of last years news. diff --git a/web/index.org b/web/index.org index b1a5931..e571fbb 100644 --- a/web/index.org +++ b/web/index.org @@ -46,16 +46,10 @@ all [[file:news.org][news of previous years]] is also available. ** Mission complete: campaign ends, closing stats (2014-02-06) -After 50 days of crowdfunding, the GnuPG campaign for new website and infrastructure will close tomorrow. That means rewards for backers can now be ordered and preparations for dispatch can begin. Here are the results so far. [[http://blog.gnupg.org/20140206-crowdfunding-complete.html][{more}]] - -** Find us at FOSDEM (2014-01-27) - -On Friday Werner and Sam are heading to FOSDEM, the largest Free Software conference in Europe, along with many GnuPG hackers, users, and supporters. Get in touch if you'd like to talk about the existing or future campaigns while we're there. [[http://blog.gnupg.org/20140127-find-fosdem.html][{more}]] - -** How good is Goteo? An appraisal (2013-12-30) - -"One question: why did you choose the quite unknown Spanish crowdfunding site Goteo?" So shot back the reply to the press release I had just sent to a few dozen selected journalists announcing the launch of the GnuPG crowdfunding campaign. This is my experience of the Goteo crowfunding platform and conclusions. -liberties. [[http://blog.gnupg.org/20131230-how-good-is-goteo.html][{more}]] +After 50 days of crowdfunding, the GnuPG campaign for new website and +infrastructure will close tomorrow. That means rewards for backers can +now be ordered and preparations for dispatch can begin. Here are the +results so far. [[http://blog.gnupg.org/20140206-crowdfunding-complete.html][{more}]] ** 16 Years of protecting privacy (2013-12-20) @@ -65,121 +59,18 @@ world?s most critical anti-surveillance tools. Today GnuPG stands at the front line of the battle between invasive surveillance and civil liberties. [[http://blog.gnupg.org/20131220-gnupg-turned-0x10.html][{more}]] - ** GnuPG launches crowdfunding campaign (2013-12-19) Today GNU Privacy Guard (GnuPG) has launched its first [[http://goteo.org/project/gnupg-new-website-and-infrastructure][crowdfunding campaign]] with the aim of building a new website and long term infrastructure. [[http://lists.gnupg.org/pipermail/gnupg-announce/2013q4/000338.html][{more}]] [[http://blog.gnupg.org/20131219-gnupg-launches-crowfunding.de.html][{deutsch}]] [[http://blog.gnupg.org/20131219-gnupg-launches-crowfunding.fr.html][{francaise}]] -** Blog: Getting Goteo crowdfunding approval (2013-12-18) - -The targets are set, the rewards are prepared, the press release has -been edited and translated, and now we're waiting for approval from -the crowdfunding platform Goteo ... [[http://blog.gnupg.org/20131218-getting-goteo-approval.html][{more}]] - ** GnuPG 1.4.16 released (2013-12-18) :important: Along with the publication of an interesting new [[http://www.cs.tau.ac.il/~tromer/acoustic/][side channel attack]] by Genkin, Shamir, and Tromer we announce the availability of a new stable GnuPG release to relieve this bug: Version 1.4.16 ... [[http://lists.gnupg.org/pipermail/gnupg-announce/2013q4/000337.html][{more}]] -** Libgcrypt 1.6.0 released (2013-10-16) - -The GNU project is pleased to announce the availability of Libgcrypt -version 1.6.0. This is the new stable version of Libgcrypt with the API -being mostly compatible to previous versions. Due to the removal of -certain long deprecated functions this version introduces an ABI -change. - -The main features of this version are performance improvements, -better support for elliptic curves, new algorithms and modes, as well as -API and internal cleanups. [[http://lists.gnupg.org/pipermail/gnupg-announce/2013q4/000336.html][{more}]] - -** Blog: Preparing for launch (2013-12-13) - -Mid December, giving season, and nearly time for the GnuPG Crowdfunding -to commence. We've been working hard on preparations ... -[[http://blog.gnupg.org/][{more}]] - -** Blog: Friends tell friends they love GnuPG (2013-11-13) - -Using GnuPG for email encryption takes two to tango. That's why -we're asking users to share their stories using #iloveGPG ... -[[http://blog.gnupg.org/][{more}]] - -** New website infrastructure (2013-11-12) - -After more than a decade we switched from the legacy WML based website -system to a new [[http://org-mode.org][org-mode]] based one. The old WML code was not anymore -maintainable and building the website took way to long. The new -system uses plain text files and will make it way easier to keep -information up to date. Unfortunately the translations are gone for -now --- most of them have not been updated for many years anyway. - -** Blog: Securing the future of GPG (2013-11-05) - -We have a plan for securing the long term stability of GnuPG -development by giving more to our users, and asking more from them in -return ... [[http://blog.gnupg.org/][{more}]] - -** Security update for GnuPG (2013-10-05) :important: - -We are pleased to announce the availability of a new stable GnuPG -release: Version 2.0.22 ... -[[http://lists.gnupg.org/pipermail/gnupg-announce/2013q4/000333.html][{more}]] - -** Security update for GnuPG (2013-10-05) :important: - -We are pleased to announce the availability of a new stable GnuPG -release: Version 1.4.15 ... -[[http://lists.gnupg.org/pipermail/gnupg-announce/2013q4/000334.html][{more}]] - - -** GnuPG 2.0.21 released (2013-08-19) - -We are pleased to announce the availability of GnuPG 2.0.21. ... -[[http://lists.gnupg.org/pipermail/gnupg-announce/2013q3/000332.html][{more}]] - - -** Security update for GnuPG (2013-07-25) :important: - -We are pleased to announce the availability of a new stable GnuPG -release: Version 1.4.14 ... -[[http://lists.gnupg.org/pipermail/gnupg-announce/2013q3/000329.html][{more}]] - - -** Security update for Libgcrypt (2013-07-25) :important: - -We are pleased to announce the availability of a new stable Libgcrypt -release: Version 1.5.3 ... -[[http://lists.gnupg.org/pipermail/gnupg-announce/2013q3/000329.html][{more}]] - - -** GnuPG 2.0.20 released (2013-05-10 18:59:01) - -We are pleased to announce the availability of GnuPG 2.0.20. ... -[[http://lists.gnupg.org/pipermail/gnupg-announce/2013q2/000328.html][{more}]] - - -** GnuPG 1.4.13 released (2012-12-20 21:51:56) - -We are pleased to announce the availability of a new stable GnuPG -release: Version 1.4.13 ... -[[http://lists.gnupg.org/pipermail/gnupg-announce/2012q4/000319.html][{more}]] - - -** GnuPG 2.0.19 released (2012-03-27 11:22:13) - -We are pleased to announce the availability of GnuPG 2.0.19. ... -[[http://lists.gnupg.org/pipermail/gnupg-announce/2012q1/000314.html][{more}]] - -** GnuPG 1.4.12 released (2012-01-30 17:39:22) - -We are pleased to announce the availability of a new stable GnuPG -release: Version 1.4.12 ... -[[http://lists.gnupg.org/pipermail/gnupg-announce/2012q1/000313.html][{more}]] - * COMMENT diff --git a/web/news.org b/web/news.org index 25d7891..f32e0fc 100644 --- a/web/news.org +++ b/web/news.org @@ -7,6 +7,114 @@ On this page you'll find all the news of previous years in reverse chronological order. News for the current year are found at the [[index][main page]]. +** Blog: Getting Goteo crowdfunding approval (2013-12-18) + +The targets are set, the rewards are prepared, the press release has +been edited and translated, and now we're waiting for approval from +the crowdfunding platform Goteo ... [[http://blog.gnupg.org/20131218-getting-goteo-approval.html][{more}]] + +** GnuPG 1.4.16 released (2013-12-18) :important: + +Along with the publication of an interesting new [[http://www.cs.tau.ac.il/~tromer/acoustic/][side channel attack]] +by Genkin, Shamir, and Tromer we announce the availability of a new +stable GnuPG release to relieve this bug: Version 1.4.16 ... [[http://lists.gnupg.org/pipermail/gnupg-announce/2013q4/000337.html][{more}]] + +** Libgcrypt 1.6.0 released (2013-10-16) + +The GNU project is pleased to announce the availability of Libgcrypt +version 1.6.0. This is the new stable version of Libgcrypt with the API +being mostly compatible to previous versions. Due to the removal of +certain long deprecated functions this version introduces an ABI +change. + +The main features of this version are performance improvements, +better support for elliptic curves, new algorithms and modes, as well as +API and internal cleanups. [[http://lists.gnupg.org/pipermail/gnupg-announce/2013q4/000336.html][{more}]] + +** Blog: Preparing for launch (2013-12-13) + +Mid December, giving season, and nearly time for the GnuPG Crowdfunding +to commence. We've been working hard on preparations ... +[[http://blog.gnupg.org/][{more}]] + +** Blog: Friends tell friends they love GnuPG (2013-11-13) + +Using GnuPG for email encryption takes two to tango. That's why +we're asking users to share their stories using #iloveGPG ... +[[http://blog.gnupg.org/][{more}]] + +** New website infrastructure (2013-11-12) + +After more than a decade we switched from the legacy WML based website +system to a new [[http://org-mode.org][org-mode]] based one. The old WML code was not anymore +maintainable and building the website took way to long. The new +system uses plain text files and will make it way easier to keep +information up to date. Unfortunately the translations are gone for +now --- most of them have not been updated for many years anyway. + +** Blog: Securing the future of GPG (2013-11-05) + +We have a plan for securing the long term stability of GnuPG +development by giving more to our users, and asking more from them in +return ... [[http://blog.gnupg.org/][{more}]] + +** Security update for GnuPG (2013-10-05) :important: + +We are pleased to announce the availability of a new stable GnuPG +release: Version 2.0.22 ... +[[http://lists.gnupg.org/pipermail/gnupg-announce/2013q4/000333.html][{more}]] + +** Security update for GnuPG (2013-10-05) :important: + +We are pleased to announce the availability of a new stable GnuPG +release: Version 1.4.15 ... +[[http://lists.gnupg.org/pipermail/gnupg-announce/2013q4/000334.html][{more}]] + + +** GnuPG 2.0.21 released (2013-08-19) + +We are pleased to announce the availability of GnuPG 2.0.21. ... +[[http://lists.gnupg.org/pipermail/gnupg-announce/2013q3/000332.html][{more}]] + + +** Security update for GnuPG (2013-07-25) :important: + +We are pleased to announce the availability of a new stable GnuPG +release: Version 1.4.14 ... +[[http://lists.gnupg.org/pipermail/gnupg-announce/2013q3/000329.html][{more}]] + + +** Security update for Libgcrypt (2013-07-25) :important: + +We are pleased to announce the availability of a new stable Libgcrypt +release: Version 1.5.3 ... +[[http://lists.gnupg.org/pipermail/gnupg-announce/2013q3/000329.html][{more}]] + + +** GnuPG 2.0.20 released (2013-05-10 18:59:01) + +We are pleased to announce the availability of GnuPG 2.0.20. ... +[[http://lists.gnupg.org/pipermail/gnupg-announce/2013q2/000328.html][{more}]] + + +** GnuPG 1.4.13 released (2012-12-20 21:51:56) + +We are pleased to announce the availability of a new stable GnuPG +release: Version 1.4.13 ... +[[http://lists.gnupg.org/pipermail/gnupg-announce/2012q4/000319.html][{more}]] + + +** GnuPG 2.0.19 released (2012-03-27 11:22:13) + +We are pleased to announce the availability of GnuPG 2.0.19. ... +[[http://lists.gnupg.org/pipermail/gnupg-announce/2012q1/000314.html][{more}]] + +** GnuPG 1.4.12 released (2012-01-30 17:39:22) + +We are pleased to announce the availability of a new stable GnuPG +release: Version 1.4.12 ... +[[http://lists.gnupg.org/pipermail/gnupg-announce/2012q1/000313.html][{more}]] + ** GnuPG 1.4.13 released (2012-12-20 21:51:56) commit 0f11313d3ac0bd558b16f54aa6845ffeb414ac10 Author: Werner Koch Date: Thu Feb 6 17:45:25 2014 +0100 Add release infor Libgcrypt 1.6.1. diff --git a/web/share/gpgweb.el b/web/share/gpgweb.el index 6f5555d..930df34 100644 --- a/web/share/gpgweb.el +++ b/web/share/gpgweb.el @@ -1,4 +1,4 @@ -s/;;; gpgweb.el --- elisp helper code for the GnuPG web pages +;;; gpgweb.el --- elisp helper code for the GnuPG web pages (require 'org-exp) ;; cl-macs is required by ox-html.el but for whatever reasons not diff --git a/web/swdb.mac b/web/swdb.mac index ae2558d..70a063e 100644 --- a/web/swdb.mac +++ b/web/swdb.mac @@ -59,9 +59,9 @@ # # LIBGCRYPT # -#+macro: libgcrypt_ver 1.6.0 -#+macro: libgcrypt_size 2441k -#+macro: libgcrypt_sha1 43283c0b41c41e3d3bc13c2d8f937dfe2aaa1a77 +#+macro: libgcrypt_ver 1.6.1 +#+macro: libgcrypt_size 2413k +#+macro: libgcrypt_sha1 f03d9b63ac3b17a6972fc11150d136925b702f02 # commit d39b82b3a832711c6b600cccbb444b912c03bdfc Author: Werner Koch Date: Thu Feb 6 17:34:45 2014 +0100 Add Goteo data collect scripts. diff --git a/misc/accounts.gnupg.net/htbin/goteo-collect.cgi b/misc/accounts.gnupg.net/htbin/goteo-collect.cgi new file mode 100755 index 0000000..146d606 --- /dev/null +++ b/misc/accounts.gnupg.net/htbin/goteo-collect.cgi @@ -0,0 +1,260 @@ +#!/usr/bin/perl -T + +# goteo-collect.cgi - Collect data for rewards of the 2013 Goteo campaign +# Copyright (C) 2014 g10 Code GmbH +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# This scripts presents a customized page to collect information for +# the Goteo campaign rewards. it expects a template file +# goteo-collect.html.in with certain '@' delimited variables and data +# file /var/log/gnupg.net/goteo-collect.input with the information to +# be presented to the user. The result will be logged to the file +# /var/log/gnupg.net/goteo-collect in a mail header like format to be +# later processed using GNU recutils or addrutil. The input is +# expected to be colon separated with one record per line. All values +# use percent encoding but may use unencoded spaces. The fields are: +# +# 1. id := A random string to identify the record. This is +# part of the URL send by mail to the respective +# contributor. +# 2. account := The Goteo account name +# 3. name := Name of the contributor +# 4. reward := Type of the reward: 't' = t-shirt +# 'm' = mail address +# 's' = sticker +# 5. mail := real mail address +# 6. address := The address data (only required for 't') + +# +# Note that this script needs libmime-base32-perl. + +# Preparing the inpout data. We received the Input data as +# spreadshit. The follwoing steps have been used to create the input +# data: +# - Use gnumeric to create a CSV file. +# - Run addrutil like this +# +# tail -n+2 FILE \ +# ./addrutil -FGoteo-ID -FUser -FName -FMail -FAmount -FProblem \ +# -FAnon -FReward -FAddress -FDate --readcsv \ +# | sed '/^Address:/ s/ , , ,//' | sed '/^Address:/ s/,/\n/g' > data +# +# Now we have the data in an easy to read format. The tool addrutil is +# available at 'http://git.gnupg.org/cgi-bin/gitweb.cgi\ +# ?p=wk-misc.git;f=addrutil.c;a=blob_plain' +# +# - Change some more strings: +# cat data \ +# | sed 's/^Reward: An @GnuPG.*/Reward: m/' \ +# | sed 's/^Reward: .*sticker.*/Reward: s/' \ +# | sed 's/^Reward: .*tshirt.*/Reward: t/' \ +# | sed 's/^Reward: .*Listed.*/Reward: l/' > newdata +# +# cat data | sed 's/^Reward: An @GnuPG.*/Reward: m/' | sed 's/^Reward: .*sticker.*/Reward: s/'| sed 's/^Reward: .*tshirt.*/Reward: t/' | sed 's/^Reward: .*Listed.*/Reward: l/' +# +# - To add a unique ID use this command +# +# awk '/^Goteo-ID:/ {cmd="gpg -a --gen-random 0 15 | tr +/ 42"; cmd | getline foo; print "Id: " foo; close(cmd); }; {print}' data >newdata +# +# - To finally create the input data +# fields="-FId -FUser -FName -FReward -FMail -FAddress" +# ( ./addrutil -SReward=t $fields data \ +# && ./addrutil -SReward=m $fields data) > goteo-collect.input +# + + + +use CGI; +use POSIX qw(strftime); +use Fcntl qw(:flock SEEK_END); +use MIME::Base32 qw( RFC ); + +my $time = strftime "%Y-%m-%d %H:%M:%S", gmtime; +my $htdocs = '/var/www/all/accounts.gnupg.net/htdocs/'; + +my $q = new CGI; + +my $id = $q->param("id"); +my $mode = $q->param("mode"); +my $address = ""; +my $txid = ""; +my $errorstr = ""; +my $tsize= ""; + +sub get_txid { + local $data; + + open (DEVRAND, "<", "/dev/urandom"); + read (DEVRAND, $data, 6); + close (DEVRAND); + MIME::Base32::encode($data); +} + +# Write the collected data out to the log file. On return +# $txid has the transaction id. +sub write_logfile { + open(LOGFILE, ">>", "/var/log/gnupg.net/goteo-collect") + || die "error opening log file: $!"; + flock(LOGFILE, LOCK_EX) || die "error locking log file: $!"; + seek(LOGFILE, 0, SEEK_END) || die "error seek to end of log file: $!"; + + $txid = &get_txid(); + + print LOGFILE "Start: $time\n"; + print LOGFILE "txid: $txid\n"; + print LOGFILE "reward: $reward\n"; + foreach $name ($q->param) { + $value = $q->param($name); + if ($name !~ /^Start/i) { + $value =~ s/\r//g; + chomp $value; + $value =~ s/\n/\n /g; + print LOGFILE "$name: $value\n"; + } + } + print LOGFILE "\n"; + + flock(LOGFILE, LOCK_UN) || die "error unlocking log file: $!"; + close(LOGFILE) || die "error closing log file: $!"; +} + + +# Find the item for $id and fill in all numbers. Return false if not +# found. +sub find_item { + local $tmpid; + open(INPUTFILE, "<", "/var/log/gnupg.net/goteo-collect.input") + || die "error opening input file: $!"; + while () { + chomp; + ($tmpid, $account, $name, $reward, $mail, $address) = split (/:/); + if ($tmpid eq $id) { + close(INPUTFILE); + $account =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/ge; + $name =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/ge; + $mail =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/ge; + $address =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/ge; + return 1; + } + } + close(INPUTFILE); + 0; +} + + +sub write_template { + local $fname = shift; + local $indel = 0; + local $fulladdress; + + + if ( "$address" =~ /^$name/ ) { + $fulladdress = $address; + } else { + $fulladdress = "$name\n$address"; + } + + open TEMPLATE, $htdocs . $fname; + while (