1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-18 00:49:50 +02:00
Commit Graph

32 Commits

Author SHA1 Message Date
Werner Koch
25e2b27b00
common: Check option arguments for a valid range
* common/argparse.h (ARGPARSE_INVALID_ARG): New.
* common/argparse.c: Include limits h and errno.h.
(initialize): Add error strings for new error constant.
(set_opt_arg): Add range checking.
--
Signed-off-by: Werner Koch <wk@gnupg.org>

[ This is a backport of 0d73a242cb from
  master to STABLE-BRANCH-2-0 ]

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2015-03-11 15:02:30 +01:00
Werner Koch
8d47e6e523 Release 2.0.27 2015-02-18 14:20:23 +01:00
Werner Koch
11ce4c79bb Release 2.0.20 2013-05-10 15:54:31 +02:00
Werner Koch
54c54e2824 Allow marking options as ignored.
* jnlib/argparse.h (ARGPARSE_OPT_IGNORE): New.
(ARGPARSE_TYPE_MASK): New, for internal use.
(ARGPARSE_ignore): New.
* jnlib/argparse.c (optfile_parse, arg_parse): Replace remaining
constants by macros.
(optfile_parse): Implement ARGPARSE_OPT_IGNORE.
(arg_parse): Exclide ignore options from --dump-options.
--

In addition to the ignore-invalid-option (commit 8ea49cf5) it is often
useful to mark options in a configuration which as NOP.  For example
options which have no more function at all but can be expected to be
found in existing conf files.  Such an option (or command) may now be
given as

  ARGPARSE_ignore (300, "obsolete-option")

The 300 is merely used as a non-valid single option name much like
group names or the 500+n values used for long options.

Signed-off-by: Werner Koch <wk@gnupg.org>
2013-04-22 15:03:34 +02:00
Werner Koch
8ea49cf513 jnlib: Add meta option ignore-invalid-option.
* jnlib/argparse.c (iio_item_def_s, IIO_ITEM_DEF): New.
(initialize): Init field IIO_LIST.
(ignore_invalid_option_p): New.
(ignore_invalid_option_add): New.
(ignore_invalid_option_clear): New.
(optfile_parse): Implement meta option.
--

This option is currently of no use.  However, as soon as it has been
deployed in all stable versions of GnuPG, it will allow the use of the
same configuration file with an old and a new version of GnuPG.  For
example: If a new version implements the option "foobar", and a user
uses it in gpg.conf, an old version of gpg would bail out with the
error "invalid option".  To avoid that the following line can be put
above that option in gpg.conf

  ignore-invalid-option foobar

This meta option may be given several times or several option names
may be given as arguments (space delimited).  Note that this option is
not available on the command line.

(cherry-picked from commit 41d564333d)
2012-12-18 18:31:54 +01:00
Werner Koch
4a9d69ca87 Update copyright year. 2012-01-31 18:08:24 +01:00
Werner Koch
56b2bc257a Update copyright year. 2011-01-11 19:49:08 +01:00
Werner Koch
1ade5ed150 Argg again: Remove cruft from a test. 2009-03-03 10:18:07 +00:00
Werner Koch
c20b3db108 Add --reload command to gpgconf.
Fix a problem in exechelp.c
Get ready for a release.
2009-03-03 09:02:58 +00:00
Werner Koch
82ab848ea4 Update spanish translation.
Cleanups.
Allow utf-8 in email addresses.
2009-01-08 15:48:51 +00:00
Werner Koch
31af1b3f03 Fix last change. 2008-11-20 13:08:26 +00:00
Werner Koch
329509c864 Made arg_parse more readable. 2008-11-12 17:41:49 +00:00
Werner Koch
0a5f742466 Marked all unused args on non-W32 platforms. 2008-10-20 13:53:23 +00:00
Werner Koch
7d63aa42e5 Remove hacks which are not anymore needed since we now require Libgcrypt 1.4 2008-09-29 15:02:55 +00:00
Werner Koch
138bf2dc15 Fixed segv in gpg-agent (command marktrusted).
Replaced almost all free by xfree.
Translation fixes.
2008-05-27 12:03:50 +00:00
Werner Koch
f5f14d6556 Add some tests. 2008-02-22 15:47:18 +00:00
Werner Koch
8464627bf4 Extended the --check-program output: Error messages are now inlcued in an
easy parsable format.
2007-08-29 16:59:20 +00:00
Werner Koch
74d344a521 Implemented the chain model for X.509 validation. 2007-08-10 16:52:05 +00:00
Werner Koch
93d3811abc Changed to GPLv3.
Removed intl/.
2007-07-04 19:49:40 +00:00
Werner Koch
f54b85bc2d A bunch of minor changes for Windows. 2007-07-04 09:34:28 +00:00
Werner Koch
3c351d0232 UTF-8 Fixes 2007-05-04 09:22:18 +00:00
Werner Koch
634b4c31d2 The Cherry XX44 keyboard's PINpad does now work.
DINSIG and NKS card applications are now also PIN pad aware.
2007-03-07 20:55:14 +00:00
Werner Koch
4b48bcacc9 Fix for bug 537 2006-10-02 11:54:35 +00:00
Werner Koch
f98537733a Updated FSF's address. 2006-06-20 17:21:37 +00:00
Werner Koch
deeba405a9 gcc-4 defaults forced me to edit many many files to get rid of the
char * vs. unsigned char * warnings.  The GNU coding standards used to
say that these mismatches are okay and better than a bunch of casts.
Obviously this has changed now.
2005-06-16 08:12:03 +00:00
Werner Koch
cf8f6d3cef (stream_read_string): Removed call to abort on
memory error because the CVS version of libgcrypt makes sure
that ERRNO gets always set on error even with a faulty user
supplied function.
2005-02-22 18:08:28 +00:00
Werner Koch
52f5553759 * argparse.c (strusage): Changed default copyright year to 2004. 2004-01-16 17:40:50 +00:00
Werner Koch
911daed647 (initialize): Replaced use of non-literal forma
args.  Suggested by Florian Weimer.
2003-12-17 12:25:09 +00:00
Werner Koch
11d5db1dcb Updated from NewPG 2003-01-09 12:36:05 +00:00
David Shaw
98a05e4239 Removed files for CVS reorganization 2002-06-29 12:56:01 +00:00
Werner Koch
92cd255508 See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner Koch 2000-07-14 17:34:53 +00:00
Werner Koch
54b141f63e Add files to new directory.
This is mainly stuff moved from ../util
to here.
2000-01-24 12:05:50 +00:00