aboutsummaryrefslogtreecommitdiffstats
path: root/g10/openfile.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-08-01Revert "g10: Always save standard revocation certificate in file."Marcus Brinkmann1-7/+5
This reverts commit ebc65ff459e6c228fb7406e375819a9fe5637abe.
2017-08-01g10: Always save standard revocation certificate in file.Marcus Brinkmann1-5/+7
* g10/main.h (open_outfile): New parameter NO_OUTFILE. * g10/openfile.c (open_outfile): New parameter NO_OUTFILE. If given, never use opt.outfile. * g10/revoke.c (create_revocation): If FILENAME is true, also set NO_OUTFILE to true (for standard revocation certificates). * g10/dearmor.c, g10/encrypt.c, g10/export.c, g10/revoke.c, g10/sign.c: Adjust all other callers. Signed-off-by: Marcus Brinkmann <[email protected]> GnuPG-bug-id: 3015
2017-05-02g10: Remove skeleton options files.Daniel Kahn Gillmor1-102/+0
* build-aux/speed/w32/inst.nsi: stop installing skeleton files. * doc/gpg.texi: stop documenting skeleton files. * g10/Makefile.am: stop installing skeleton files. * g10/openfile.c (copy_options_file): Remove. (try_make_homedir): do not call copy_options_file. -- The defaults for gpg and dirmngr are good. Both programs should work fine for the simple case without any config file. The skeleton config files were being copied at first use (when the defaults are fine). But when the user needs to fiddle with them (after they've become sophisticated users), they're likely out of date because gpg has been upgraded since then. So they're used for documentation, but they're stale documentation, which is probably worse than a clean empty file. GnuPG-bug-id: 3086 Signed-off-by: Daniel Kahn Gillmor <[email protected]>
2017-04-28Spelling fixes in docs and comments.NIIBE Yutaka1-1/+1
-- In addition, fix trailing spaces in tests/inittests. GnuPG-bug-id: 3121 Reported-by: ka7 (klemens) Signed-off-by: NIIBE Yutaka <[email protected]>
2017-03-07Remove -I option to common.NIIBE Yutaka1-4/+4
* dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common. * g10/Makefile.am (AM_CPPFLAGS): Ditto. * g13/Makefile.am (AM_CPPFLAGS): Ditto. * kbx/Makefile.am (AM_CPPFLAGS): Ditto. * scd/Makefile.am (AM_CPPFLAGS): Ditto. * sm/Makefile.am (AM_CPPFLAGS): Ditto. * tools/Makefile.am (AM_CPPFLAGS): Ditto. * Throughout: Follow the change. Signed-off-by: NIIBE Yutaka <[email protected]>
2016-11-05Change all http://www.gnu.org in license notices to https://Werner Koch1-1/+1
--
2016-10-21Fix use cases of snprintf.NIIBE Yutaka1-2/+2
* agent/call-pinentry.c, agent/call-scd.c, agent/command.c, build-aux/speedo/w32/g4wihelp.c, common/get-passphrase.c, dirmngr/dirmngr.c, g10/call-agent.c, g10/cpr.c, g10/keygen.c, g10/openfile.c, g10/passphrase.c, scd/app-openpgp.c, scd/scdaemon.c, sm/call-agent.c, sm/call-dirmngr.c, sm/certreqgen.c: Fix assuming C99. -- Signed-off-by: NIIBE Yutaka <[email protected]>
2016-04-29gpg: Remove all assert.h and s/assert/log_assert/.Werner Koch1-1/+0
Signed-off-by: Werner Koch <[email protected]>
2015-10-05gpg: Install a dirmngr.conf file.Werner Koch1-14/+20
* g10/dirmngr-conf.skel: New. * g10/Makefile.am (EXTRA_DIST): Add file. (install-data-local, uninstall-local): Install that file. * g10/openfile.c (copy_options_file): Add arg "name", return a value, simplify with xstrconcat, and factor warning message out to: (try_make_homedir): here. Also install dirmngr.conf. * g10/options.skel: Remove --keyserver entry. -- The option --keyserver in gpg has been deprecated in favor of --keyserver in dirmngr.conf. Thus we need to install a skeleton file for dirmngr to set a default keyserver. Signed-off-by: Werner Koch <[email protected]>
2014-11-13gpg: Make the use of "--verify FILE" for detached sigs harder.Werner Koch1-26/+50
* g10/openfile.c (open_sigfile): Factor some code out to ... (get_matching_datafile): new function. * g10/plaintext.c (hash_datafiles): Do not try to find matching file in batch mode. * g10/mainproc.c (check_sig_and_print): Print a warning if a possibly matching data file is not used by a standard signatures. -- Allowing to use the abbreviated form for detached signatures is a long standing bug which has only been noticed by the public with the release of 2.1.0. :-( What we do is to remove the ability to check detached signature in --batch using the one file abbreviated mode. This should exhibit problems in scripts which use this insecure practice. We also print a warning if a matching data file exists but was not considered because the detached signature was actually a standard signature: gpgv: Good signature from "Werner Koch (dist sig)" gpgv: WARNING: not a detached signature; \ file 'gnupg-2.1.0.tar.bz2' was NOT verified! We can only print a warning because it is possible that a standard signature is indeed to be verified but by coincidence a file with a matching name is stored alongside the standard signature. Reported-by: Simon Nicolussi (to gnupg-users on Nov 7) Signed-off-by: Werner Koch <[email protected]>
2014-11-13gpg: Re-indent two files.Werner Koch1-112/+129
--
2014-06-30gpg: Auto-create revocation certificates.Werner Koch1-2/+26
* configure.ac (GNUPG_OPENPGP_REVOC_DIR): New config define. * g10/revoke.c (create_revocation): Add arg "leadin". (gen_standard_revoke): New. * g10/openfile.c (get_openpgp_revocdir): New. (open_outfile): Add MODE value 3. * g10/keyid.c (hexfingerprint): New. * g10/keygen.c (do_generate_keypair): Call gen_standard_revoke. -- GnuPG-bug-id: 1042
2014-06-30gpg: Create exported secret files and revocs with mode 700.Werner Koch1-4/+6
* common/iobuf.c (direct_open): Add arg MODE700. (iobuf_create): Ditto. * g10/openfile.c (open_outfile): Add arg RESTRICTEDPERM. Change call callers to pass 0 for it. * g10/revoke.c (gen_desig_revoke, gen_revoke): Here pass true for new arg. * g10/export.c (do_export): Pass true for new arg if SECRET is true. -- GnuPG-bug-id: 1653. Note that this works only if --output has been used.
2013-11-18Make use of the *_NAME etc macros.Werner Koch1-3/+4
Replace hardwired strings at many places with new macros from config.h and use the new strusage macro replacement feature. * common/asshelp.c (lock_spawning) [W32]: Change the names of the spawn sentinels. * agent/command.c (cmd_import_key): Use asprintf to create the prompt.
2012-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch1-13/+13
The asymmetric quotes used by GNU in the past (`...') don't render nicely on modern systems. We now use two \x27 characters ('...'). The proper solution would be to use the correct Unicode symmetric quotes here. However this has the disadvantage that the system requires Unicode support. We don't want that today. If Unicode is available a generated po file can be used to output proper quotes. A simple sed script like the one used for en@quote is sufficient to change them. The changes have been done by applying sed -i "s/\`\([^'\`]*\)'/'\1'/g" to most files and fixing obvious problems by hand. The msgid strings in the po files were fixed with a similar command.
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-15/+15
We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
2010-04-14Whole lot of changes to support CE.Werner Koch1-6/+1
2010-04-01Use gpg_err_set_errno to assign values to ERRNO.Werner Koch1-4/+4
2010-03-08Removed almost al dup calls.Werner Koch1-8/+3
2010-03-08Use macros for iobuf ioctls. Werner Koch1-1/+1
2009-10-02Implement the server comamnd DECRYPT.Werner Koch1-9/+9
Use int instead of gnupg_fd_t in the server. Comment fixes. Rename encr-data.c -> decrypt-data.c
2009-09-30Some changes to suport g13.Werner Koch1-116/+140
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-06-26More W32 related changesWerner Koch1-29/+27
2007-06-14A whole bunch of changes to allow building for Windows.Werner Koch1-1/+4
See the ChangeLogs for details.
2007-05-09Preparing 2.0.4gnupg-2.0.4Werner Koch1-2/+2
2007-05-07Upgraded gettext.Werner Koch1-2/+12
Fixed accidental dependency on libgcrypt 1.3.0.
2006-12-08Doc fix.Werner Koch1-2/+2
Don't let gpg2 fail if the option skeleton file is missing
2006-11-27 * openfile.c (ask_outfile_name): Fixed buffer overflow occurringWerner Koch1-34/+36
if make_printable_string returns a longer string. Fixes bug 728.
2006-09-14Take advantage of newer gpg-error features.Werner Koch1-2/+2
2006-08-01Preparing 1.4.5Werner Koch1-9/+15
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-40/+73
The gpg part does not yet build.
2006-04-03About to release 1.4.3gnupg-1.4.3Werner Koch1-0/+2
2005-07-27Converted all m_free to xfree etc.Werner Koch1-18/+18
2005-07-22* gpg.sgml (http):Werner Koch1-0/+3
* g10.c, options.h: New option --exit-on-status-write-error. * status.c (write_status_text): Make use of this option.
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2005-03-21* gpgv.c: Stubs for tty_enable_completion() & tty_disable_completion().David Shaw1-1/+4
* openfile.c (ask_outfile_name): Enable readline completion when prompting for an output filename. * plaintext.c (ask_for_detached_datafile): Enable readline completion when prompting for a detached sig datafile.
2004-10-14* misc.c (is_secured_filename): New.Werner Koch1-9/+23
* keydb.c (maybe_create_keyring) * tdbio.c (tdbio_set_dbname) * plaintext.c (handle_plaintext) * openfile.c (copy_options_file, open_outfile) * exec.c (exec_write) * keygen.c (do_generate_keypair, gen_card_key_with_backup) * sign.c (sign_file, clearsign_file) * keyring.c (create_tmp_file, do_copy): Check for secured files before creating them. * keygen.c (print_status_key_created): s/unsigned char/byte/ due to a strange typedef for RISC OS. Noted by Stefan.
2004-10-13Added SELInux hacks and did some cleanups.Werner Koch1-0/+12
2004-10-13* configure.ac: Actually name the option --disable-finger and notWerner Koch1-5/+5
http. * openfile.c (overwrite_filep, make_outfile_name, open_outfile) (open_sigfile): Use iobuf_is_pipe_filename to check for pipes so that special filesnames are taken into account. This is bug 327. * tdbdump.c (import_ownertrust): Ditto. * sign.c (write_plaintext_packet): Ditto. * progress.c (handle_progress): Ditto. * plaintext.c (handle_plaintext): Ditto. * encode.c (encode_simple, encode_crypt): Ditto. * iobuf.c (iobuf_is_pipe_filename): New. * fileutil.c (is_file_compressed): Use it here.
2004-10-10* card-util.c, keyedit.c, openfile.c, pkclist.c, delkey.c, keygen.c,David Shaw1-1/+1
photoid.c, revoke.c: Some yes-or-no prompts end in "(y/n)". Some don't. Consistently use y/n everywhere.
2004-09-112004-09-11 Moritz Schulte <[email protected]>Moritz Schulte1-1/+1
* openfile.c (copy_options_file): Fixed last commit (added a `+').
2004-08-31Better take the length of SKELEXT into accountWerner Koch1-1/+2
2004-08-31* openfile.c (copy_options_file): Use gpg-conf.skelWerner Koch1-1/+1
* Makefile.am: Install options.skel as gpg-conf.skel.
2004-02-12* gpgv.c: Removed g10defs.h.Werner Koch1-1/+1
* Makefile.am: Include cmacros.am for common flags.
2003-06-18Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch1-25/+27
to libgcrypt functions, using shared error codes from libgpg-error, replacing the old functions we used to have in ../util by those in ../jnlib and ../common, renaming the malloc functions and a couple of types. Note, that not all changes are listed below becuause they are too similar and done at far too many places. As of today the code builds using the current libgcrypt from CVS but it is very unlikely that it actually works.
2003-06-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+389
'GNUPG-1-9-BRANCH'.
2003-05-26* getkey.c (premerge_public_with_secret): Made "no secret subkey for"David Shaw1-2/+1
warning a verbose item and translatable. (From wk on stable branch) * sig-check.c (check_key_signature2): Made "no subkey for subkey binding packet" a verbose item instead of a !quiet one. There are too many garbled keys out in the wild. (From wk on stable branch) * filter.h: Remove const from WHAT. (From wk on stable branch) * progress.c (handle_progress): Store a copy of NAME. (progress_filter): Release WHAT, make sure not to print a NULL WHAT. (From wk on stable branch) * openfile.c (open_sigfile): Adjust free for new progress semantics. (From wk on stable branch) * plaintext.c (ask_for_detached_datafile): Don't dealloc pfx->WHAT. (From wk on stable branch) * seckey-cert.c (do_check): Issue the RSA_OR_IDEA status when the cipher algo is IDEA to make it easier to track down the problem. (From twoaday on stable branch)
2003-05-24* armor.c, g10.c, kbnode.c, misc.c, pkclist.c, sign.c, build-packet.c,David Shaw1-6/+6
getkey.c, keydb.c, openfile.c, plaintext.c, status.c, gpgv.c, keygen.c, options.h, sig-check.c, tdbio.h, encode.c, mainproc.c, parse-packet.c, signal.c, textfilter.c: Edit all preprocessor instructions to remove whitespace before the '#'. This is not required by C89, but there are some compilers out there that don't like it.
2003-04-15* Makefile.am (AM_CFLAGS): Make use of AM_CFLAGS and AM_LDFLAGS.Werner Koch1-2/+5
* g10.c, options.h: New option --enable-progress-filter. * progress.c (handle_progress): Make use of it.