summaryrefslogtreecommitdiffstats
path: root/sm/keylist.c
diff options
context:
space:
mode:
authorJustus Winter <justus@g10code.com>2017-05-31 14:33:45 +0200
committerJustus Winter <justus@g10code.com>2017-06-01 12:09:43 +0200
commit8a012280e0f0a462c094d106355aa436fceb1b76 (patch)
tree894f6e525cbe50c8cc121a46069f213f58f0e6b5 /sm/keylist.c
parentgpg: Fix compliance computation. (diff)
downloadgnupg2-8a012280e0f0a462c094d106355aa436fceb1b76.tar.xz
gnupg2-8a012280e0f0a462c094d106355aa436fceb1b76.zip
gpg,common: Move the compliance framework.
* common/Makefile.am (common_sources): Add new files. * common/compliance.c: New file. Move 'gnupg_pk_is_compliant' here, and tweak it to not rely on types private to gpg. * common/compliance.h: New file. Move the compliance enum here. * g10/keylist.c (print_compliance_flags): Adapt callsite. * g10/main.h (gnupg_pk_is_compliant): Remove prototype. * g10/misc.c (gnupg_pk_is_compliant): Remove function. * g10/options.h (opt): Use the new compliance enum. * sm/keylist.c (print_compliance_flags): Use the common functions. Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'sm/keylist.c')
-rw-r--r--sm/keylist.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sm/keylist.c b/sm/keylist.c
index 13de45d9c..abec049b7 100644
--- a/sm/keylist.c
+++ b/sm/keylist.c
@@ -36,6 +36,7 @@
#include "../kbx/keybox.h" /* for KEYBOX_FLAG_* */
#include "../common/i18n.h"
#include "../common/tlv.h"
+#include "../common/compliance.h"
struct list_external_parm_s
{
@@ -351,8 +352,8 @@ email_kludge (const char *name)
static void
print_compliance_flags (int algo, unsigned int nbits, estream_t fp)
{
- if (algo == GCRY_PK_RSA && nbits >= 2048)
- es_fputs ("23", fp);
+ if (gnupg_pk_is_compliant (CO_DE_VS, algo, NULL, nbits, NULL))
+ es_fputs (gnupg_status_compliance_flag (CO_DE_VS), fp);
}