aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--NEWS5
-rw-r--r--agent/cvt-openpgp.c2
-rw-r--r--common/ChangeLog3
-rw-r--r--common/audit.c6
-rw-r--r--common/miscellaneous.c17
-rw-r--r--common/util.h3
-rw-r--r--g10/ChangeLog4
-rw-r--r--g10/misc.c2
-rw-r--r--sm/encrypt.c2
-rw-r--r--sm/gpgsm.c2
-rw-r--r--tools/ChangeLog6
-rw-r--r--tools/no-libgcrypt.c7
12 files changed, 51 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index e2627fb4a..afd9053c2 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,11 @@ Noteworthy changes in version 2.1.0beta2 (unreleased)
* Fixed a bug where SCdaemon sends a signal to Gpg-agent running in
non-daemon mode.
+ * Print "AES128" instead of "AES". This change introduces a little
+ incompatibility for tools using "gpg --list-config". We hope that
+ these tools are written robust enough to accept this new algorithm
+ name as well.
+
Noteworthy changes in version 2.1.0beta1 (2010-10-26)
-----------------------------------------------------
diff --git a/agent/cvt-openpgp.c b/agent/cvt-openpgp.c
index 6cedc88ea..e6a14c436 100644
--- a/agent/cvt-openpgp.c
+++ b/agent/cvt-openpgp.c
@@ -283,7 +283,7 @@ do_unprotect (const char *passphrase,
the OpenPGP algorithm numbers map one-to-one to the Libgcrypt
numbers. */
log_info (_("protection algorithm %d (%s) is not supported\n"),
- protect_algo, gcry_cipher_algo_name (protect_algo));
+ protect_algo, gnupg_cipher_algo_name (protect_algo));
return gpg_error (GPG_ERR_CIPHER_ALGO);
}
diff --git a/common/ChangeLog b/common/ChangeLog
index 8d03e35db..5b4f1074c 100644
--- a/common/ChangeLog
+++ b/common/ChangeLog
@@ -1,5 +1,8 @@
2010-12-02 Werner Koch <[email protected]>
+ * miscellaneous.c (gnupg_cipher_algo_name): New. Replace all
+ users of gcry_cipher_algo_name by this one.
+
* logging.c (fun_cookie_s) [W32CE]: Add field USE_WRITEFILE.
(fun_writer) [W32CE]: Make use of it.
(set_file_fd) [W32CE]: Implement special filename "GPG2:".
diff --git a/common/audit.c b/common/audit.c
index 02a0a2b22..38d0c0c3d 100644
--- a/common/audit.c
+++ b/common/audit.c
@@ -769,7 +769,7 @@ proc_type_encrypt (audit_ctx_t ctx)
{
algo = gcry_cipher_map_name (item->string);
if (algo)
- writeout_rem (ctx, _("algorithm: %s"), gcry_cipher_algo_name (algo));
+ writeout_rem (ctx, _("algorithm: %s"), gnupg_cipher_algo_name (algo));
else if (item->string && !strcmp (item->string, "1.2.840.113549.3.2"))
writeout_rem (ctx, _("unsupported algorithm: %s"), "RC2");
else if (item->string)
@@ -909,14 +909,14 @@ proc_type_decrypt (audit_ctx_t ctx)
algo = item? item->intvalue : 0;
writeout_li (ctx, algo?"Yes":"No", "%s", _("Encryption algorithm supported"));
if (algo)
- writeout_rem (ctx, _("algorithm: %s"), gcry_cipher_algo_name (algo));
+ writeout_rem (ctx, _("algorithm: %s"), gnupg_cipher_algo_name (algo));
item = find_log_item (ctx, AUDIT_BAD_DATA_CIPHER_ALGO, 0);
if (item && item->string)
{
algo = gcry_cipher_map_name (item->string);
if (algo)
- writeout_rem (ctx, _("algorithm: %s"), gcry_cipher_algo_name (algo));
+ writeout_rem (ctx, _("algorithm: %s"), gnupg_cipher_algo_name (algo));
else if (item->string && !strcmp (item->string, "1.2.840.113549.3.2"))
writeout_rem (ctx, _("unsupported algorithm: %s"), "RC2");
else if (item->string)
diff --git a/common/miscellaneous.c b/common/miscellaneous.c
index fe065e653..0ff7d98d7 100644
--- a/common/miscellaneous.c
+++ b/common/miscellaneous.c
@@ -95,6 +95,23 @@ setup_libgcrypt_logging (void)
gcry_set_outofcore_handler (my_gcry_outofcore_handler, NULL);
}
+/* A wrapper around gcry_cipher_algo_name to return the string
+ "AES-128" instead of "AES". Given that we have an alias in
+ libgcrypt for it, it does not harm to too much to return this other
+ string. Some users complained that we print "AES" but "AES192"
+ and "AES256". We can't fix that in libgcrypt but it is pretty
+ safe to do it in an application. */
+const char *
+gnupg_cipher_algo_name (int algo)
+{
+ const char *s;
+
+ s = gcry_cipher_algo_name (algo);
+ if (!strcmp (s, "AES"))
+ s = "AES128";
+ return s;
+}
+
/* Decide whether the filename is stdout or a real filename and return
* an appropriate string. */
diff --git a/common/util.h b/common/util.h
index 10fac88f2..7c58b15c5 100644
--- a/common/util.h
+++ b/common/util.h
@@ -255,6 +255,9 @@ char *xasprintf (const char *fmt, ...) JNLIB_GCC_A_PRINTF(1,2);
/* This is now an alias to estream_asprintf. */
char *xtryasprintf (const char *fmt, ...) JNLIB_GCC_A_PRINTF(1,2);
+/* Replacement for gcry_cipher_algo_name. */
+const char *gnupg_cipher_algo_name (int algo);
+
const char *print_fname_stdout (const char *s);
const char *print_fname_stdin (const char *s);
void print_utf8_buffer2 (estream_t fp, const void *p, size_t n, int delim);
diff --git a/g10/ChangeLog b/g10/ChangeLog
index ddc9ba0e0..0af97c45e 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,7 @@
+2010-12-02 Werner Koch <[email protected]>
+
+ * misc.c (openpgp_cipher_algo_name): Use gnupg_cipher_algo_name.
+
2010-11-23 Werner Koch <[email protected]>
* Makefile.am (gpg2_LDFLAGS, gpgv2_LDFLAGS): Add extra_bin_ldflags.
diff --git a/g10/misc.c b/g10/misc.c
index b3b73ed67..1725258c5 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -409,7 +409,7 @@ openpgp_cipher_test_algo( int algo )
const char *
openpgp_cipher_algo_name (int algo)
{
- return gcry_cipher_algo_name (map_cipher_openpgp_to_gcry (algo));
+ return gnupg_cipher_algo_name (map_cipher_openpgp_to_gcry (algo));
}
int
diff --git a/sm/encrypt.c b/sm/encrypt.c
index a049a50ac..ffe88a790 100644
--- a/sm/encrypt.c
+++ b/sm/encrypt.c
@@ -86,7 +86,7 @@ init_dek (DEK dek)
case GCRY_CIPHER_DES:
case GCRY_CIPHER_RFC2268_40:
log_error ("cipher algorithm `%s' not allowed: too weak\n",
- gcry_cipher_algo_name (dek->algo));
+ gnupg_cipher_algo_name (dek->algo));
return gpg_error (GPG_ERR_UNSUPPORTED_ALGORITHM);
default:
break;
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index d1b09f422..f3718ae9f 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -553,7 +553,7 @@ my_strusage( int level )
case 33: p = _("\nSupported algorithms:\n"); break;
case 34:
if (!ciphers)
- ciphers = build_list ("Cipher: ", gcry_cipher_algo_name,
+ ciphers = build_list ("Cipher: ", gnupg_cipher_algo_name,
our_cipher_test_algo );
p = ciphers;
break;
diff --git a/tools/ChangeLog b/tools/ChangeLog
index 98e2329ca..c6ac33207 100644
--- a/tools/ChangeLog
+++ b/tools/ChangeLog
@@ -1,3 +1,7 @@
+2010-12-02 Werner Koch <[email protected]>
+
+ * no-libgcrypt.c (gcry_cipher_algo_name): New.
+
2010-11-23 Werner Koch <[email protected]>
* Makefile.am (gpgconf_LDFLAGS): Add extra_bin_ldflags.
@@ -1218,7 +1222,7 @@
2004-01-10 Werner Koch <[email protected]>
* Makefile.am: Use GPG_ERROR_CFLAGS
-
+
2004-01-05 Werner Koch <[email protected]>
* Manifest: New.
diff --git a/tools/no-libgcrypt.c b/tools/no-libgcrypt.c
index fbbfd40ed..e4b304a51 100644
--- a/tools/no-libgcrypt.c
+++ b/tools/no-libgcrypt.c
@@ -152,3 +152,10 @@ gcry_create_nonce (void *buffer, size_t length)
log_fatal ("unexpected call to gcry_create_nonce\n");
}
+
+
+const char *
+gcry_cipher_algo_name (int algo)
+{
+ return "?";
+}