aboutsummaryrefslogtreecommitdiffstats
path: root/g10/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/misc.c')
-rw-r--r--g10/misc.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/g10/misc.c b/g10/misc.c
index 08bbdc6fe..58d6bce5b 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -592,3 +592,50 @@ default_compress_algo(void)
else
return DEFAULT_COMPRESS_ALGO;
}
+
+const char *
+compliance_option_string(void)
+{
+ switch(opt.compliance)
+ {
+ case CO_RFC2440:
+ return "--openpgp";
+ case CO_PGP2:
+ return "--pgp2";
+ case CO_PGP6:
+ return "--pgp6";
+ case CO_PGP7:
+ return "--pgp7";
+ case CO_PGP8:
+ return "--pgp8";
+ default:
+ return "???";
+ }
+}
+
+static const char *
+compliance_string(void)
+{
+ switch(opt.compliance)
+ {
+ case CO_RFC2440:
+ return "OpenPGP";
+ case CO_PGP2:
+ return "PGP 2.x";
+ case CO_PGP6:
+ return "PGP 6.x";
+ case CO_PGP7:
+ return "PGP 7.x";
+ case CO_PGP8:
+ return "PGP 8.x";
+ default:
+ return "???";
+ }
+}
+
+void
+compliance_failure(void)
+{
+ log_info(_("this message may not be usable by %s\n"),compliance_string());
+ opt.compliance=CO_GNUPG;
+}