aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-08-28 14:01:22 +0000
committerWerner Koch <[email protected]>2014-08-28 14:01:22 +0000
commit40ad42dbe3c67d8103aedb6b584f4bedc5f93307 (patch)
treebb40d4b8008a2d475ad442f413426f25c3cd6d1f
parentgpg: Allow for positional parameters in the passphrase prompt. (diff)
downloadgnupg-40ad42dbe3c67d8103aedb6b584f4bedc5f93307.tar.gz
gnupg-40ad42dbe3c67d8103aedb6b584f4bedc5f93307.zip
gpg: Do not show "MD5" and triplicated "RSA" in --version.
* g10/gpg.c (build_list_pk_test_algo): Ignore RSA aliases (build_list_md_test_algo): Ignore MD5.
Diffstat (limited to '')
-rw-r--r--g10/gpg.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index ce1a87fbd..8d69da047 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -842,6 +842,12 @@ make_libversion (const char *libname, const char *(*getfnc)(const char*))
static int
build_list_pk_test_algo (int algo)
{
+ /* Show only one "RSA" string. If RSA_E or RSA_S is available RSA
+ is also available. */
+ if (algo == PUBKEY_ALGO_RSA_E
+ || algo == PUBKEY_ALGO_RSA_S)
+ return GPG_ERR_DIGEST_ALGO;
+
return openpgp_pk_test_algo (algo);
}
@@ -866,6 +872,11 @@ build_list_cipher_algo_name (int algo)
static int
build_list_md_test_algo (int algo)
{
+ /* By default we do not accept MD5 based signatures. To avoid
+ confusion we do not announce support for it either. */
+ if (algo == DIGEST_ALGO_MD5)
+ return GPG_ERR_DIGEST_ALGO;
+
return openpgp_md_test_algo (algo);
}