diff options
author | Werner Koch <wk@gnupg.org> | 2007-10-25 11:06:21 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2007-10-25 11:06:21 +0200 |
commit | cd2d9288aaf9c584673675826ba76e7dbc2ad239 (patch) | |
tree | 900265d44d0cbc9beb573867fa17148007f37d5f /g10/misc.c | |
parent | Add a /while loop. (diff) | |
download | gnupg2-cd2d9288aaf9c584673675826ba76e7dbc2ad239.tar.xz gnupg2-cd2d9288aaf9c584673675826ba76e7dbc2ad239.zip |
Ported changes from 1.4.
Add copyright notices.
Diffstat (limited to 'g10/misc.c')
-rw-r--r-- | g10/misc.c | 69 |
1 files changed, 43 insertions, 26 deletions
diff --git a/g10/misc.c b/g10/misc.c index 3781b2c27..96bb6c559 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -831,47 +831,64 @@ default_compress_algo(void) const char * compliance_option_string(void) { + char *ver="???"; + 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 "???"; + case CO_GNUPG: return "--gnupg"; + case CO_RFC4880: return "--openpgp"; + case CO_RFC2440: return "--rfc2440"; + case CO_RFC1991: return "--rfc1991"; + case CO_PGP2: return "--pgp2"; + case CO_PGP6: return "--pgp6"; + case CO_PGP7: return "--pgp7"; + case CO_PGP8: return "--pgp8"; } + + return ver; } -static const char * -compliance_string(void) +void +compliance_failure(void) { + char *ver="???"; + switch(opt.compliance) { + case CO_GNUPG: + ver="GnuPG"; + break; + + case CO_RFC4880: + ver="OpenPGP"; + break; + case CO_RFC2440: - return "OpenPGP"; + ver="OpenPGP (older)"; + break; + + case CO_RFC1991: + ver="old PGP"; + break; + case CO_PGP2: - return "PGP 2.x"; + ver="PGP 2.x"; + break; + case CO_PGP6: - return "PGP 6.x"; + ver="PGP 6.x"; + break; + case CO_PGP7: - return "PGP 7.x"; + ver="PGP 7.x"; + break; + case CO_PGP8: - return "PGP 8.x"; - default: - return "???"; + ver="PGP 8.x"; + break; } -} -void -compliance_failure(void) -{ - log_info(_("this message may not be usable by %s\n"),compliance_string()); + log_info(_("this message may not be usable by %s\n"),ver); opt.compliance=CO_GNUPG; } |