aboutsummaryrefslogtreecommitdiffstats
path: root/common/miscellaneous.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-12-02 15:49:02 +0000
committerWerner Koch <[email protected]>2010-12-02 15:49:02 +0000
commitfcb5f7d08f25a2ca962b1f9ad7dbb332cc241f38 (patch)
tree19982dc1f1c8a0c4a88ca4e06974d70fc47caad9 /common/miscellaneous.c
parentDescribe new log facilities. (diff)
downloadgnupg-fcb5f7d08f25a2ca962b1f9ad7dbb332cc241f38.tar.gz
gnupg-fcb5f7d08f25a2ca962b1f9ad7dbb332cc241f38.zip
s/AES/AES128/ in diagnostics and --list-config
Diffstat (limited to 'common/miscellaneous.c')
-rw-r--r--common/miscellaneous.c17
1 files changed, 17 insertions, 0 deletions
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. */