aboutsummaryrefslogtreecommitdiffstats
path: root/g10/g10.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/g10.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/g10/g10.c b/g10/g10.c
index b61431e12..27a000c3e 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -171,6 +171,7 @@ enum cmd_and_opt_values { aNull = 0,
oLoadExtension,
oGnuPG,
oRFC1991,
+ oRFC2440,
oOpenPGP,
oPGP2,
oPGP6,
@@ -465,6 +466,7 @@ static ARGPARSE_OPTS opts[] = {
{ oGnuPG, "no-pgp7", 0, "@"},
{ oGnuPG, "no-pgp8", 0, "@"},
{ oRFC1991, "rfc1991", 0, N_("emulate the mode described in RFC1991")},
+ { oRFC2440, "rfc2440", 0, "@" },
{ oOpenPGP, "openpgp", 0, N_("set all packet, cipher and digest options to OpenPGP behavior")},
{ oPGP2, "pgp2", 0, N_("set all packet, cipher and digest options to PGP 2.x behavior")},
{ oPGP6, "pgp6", 0, "@"},
@@ -1543,6 +1545,7 @@ main( int argc, char **argv )
opt.disable_mdc = 1;
opt.escape_from = 1;
break;
+ case oRFC2440:
case oOpenPGP:
/* TODO: When 2440bis becomes a RFC, these may need
changing. */
@@ -3088,13 +3091,13 @@ add_notation_data( const char *string, int which )
/* we only support printable text - therefore we enforce the use
* of only printable characters (an empty value is valid) */
for( s++; *s ; s++ ) {
- if( iscntrl(*s) ) {
+ if ((*s & 0x80))
+ highbit = 1;
+ else if (iscntrl(*s)) {
log_error(_("a notation value must not use "
"any control characters\n") );
return;
}
- else if( *s & 0x80 )
- highbit = 1;
}
if( highbit ) /* must use UTF8 encoding */