"For your eyes only"
David Shaw
dshaw at jabberwocky.com
Fri Nov 30 21:49:01 CET 2001
Hi,
Here's a patch to enable setting the "for your eyes only" flag for
messages in GnuPG. GnuPG already understands the flag in messages, so
this patch just adds a --for-your-eyes-only which sets it and a
--no-for-your-eyes-only which unsets it.
(Note that "--for-your-eyes-only" is identical to
"--set-filename _CONSOLE")
David
--
David Shaw | dshaw at jabberwocky.com | WWW http://www.jabberwocky.com/
+---------------------------------------------------------------------------+
"There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence." - Jeremy S. Anderson
-------------- next part --------------
Index: ChangeLog
===================================================================
RCS file: /cvs/gnupg/gnupg/g10/ChangeLog,v
retrieving revision 1.162.2.171
diff -u -r1.162.2.171 ChangeLog
--- ChangeLog 2001/11/27 10:28:39 1.162.2.171
+++ ChangeLog 2001/11/30 20:44:19
@@ -1,3 +1,8 @@
+2001-12-02 David Shaw <dshaw at jabberwocky.com>
+
+ * g10.c: Add advisory --for-your-eyes-only option as per section
+ 5.9 of 2440.
+
2001-11-26 David Shaw <dshaw at jabberwocky.com>
* trustdb.c (mark_usable_uid_certs): Fix segfault from bad
Index: g10.c
===================================================================
RCS file: /cvs/gnupg/gnupg/g10/Attic/g10.c,v
retrieving revision 1.129.2.58
diff -u -r1.129.2.58 g10.c
--- g10.c 2001/11/08 13:25:48 1.129.2.58
+++ g10.c 2001/11/30 20:44:20
@@ -173,6 +173,8 @@
oEmuChecksumBug,
oRunAsShmCP,
oSetFilename,
+ oForYourEyesOnly,
+ oNoForYourEyesOnly,
oSetPolicyURL,
oUseEmbeddedFilename,
oComment,
@@ -403,6 +405,8 @@
{ oEmuChecksumBug, "emulate-checksum-bug", 0, "@"},
{ oRunAsShmCP, "run-as-shm-coprocess", 4, "@" },
{ oSetFilename, "set-filename", 2, "@" },
+ { oForYourEyesOnly, "for-your-eyes-only", 0, "@" },
+ { oNoForYourEyesOnly, "no-for-your-eyes-only", 0, "@" },
{ oSetPolicyURL, "set-policy-url", 2, "@" },
{ oComment, "comment", 2, "@" },
{ oDefaultComment, "default-comment", 0, "@" },
@@ -670,6 +674,7 @@
char *s2k_cipher_string = NULL;
char *s2k_digest_string = NULL;
char *preference_list = NULL;
+ int eyes_only=0;
int pwfd = -1;
int with_fpr = 0; /* make an option out of --fingerprint */
int any_explicit_recipient = 0;
@@ -997,6 +1002,8 @@
#endif /* __riscos__ */
break;
case oSetFilename: opt.set_filename = pargs.r.ret_str; break;
+ case oForYourEyesOnly: eyes_only = 1; break;
+ case oNoForYourEyesOnly: eyes_only = 0; break;
case oSetPolicyURL: opt.set_policy_url = pargs.r.ret_str; break;
case oUseEmbeddedFilename: opt.use_embedded_filename = 1; break;
case oComment: opt.comment_string = pargs.r.ret_str; break;
@@ -1133,7 +1140,14 @@
if( may_coredump && !opt.quiet )
log_info(_("WARNING: program may create a core file!\n"));
+ if (eyes_only) {
+ if (opt.set_filename)
+ log_info(_("WARNING: %s overrides %s\n"),
+ "--for-your-eyes-only","--set-filename");
+ opt.set_filename="_CONSOLE";
+ }
+
if (opt.no_literal) {
log_info(_("NOTE: %s is not for normal use!\n"), "--no-literal");
if (opt.textmode)
@@ -1141,8 +1155,10 @@
"--textmode", "--no-literal" );
if (opt.set_filename)
log_error(_("%s makes no sense with %s!\n"),
- "--set-filename", "--no-literal" );
+ eyes_only?"--for-your-eyes-only":"--set-filename",
+ "--no-literal" );
}
+
if (opt.set_filesize)
log_info(_("NOTE: %s is not for normal use!\n"), "--set-filesize");
if( opt.batch )
More information about the Gnupg-devel
mailing list