aboutsummaryrefslogtreecommitdiffstats
path: root/g10/openfile.c (unfollow)
Commit message (Collapse)AuthorFilesLines
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.
2003-01-02* keydb.c (keydb_add_resource): Don't assume that try_make_homedirWerner Koch1-3/+19
terminates but check again for the existence of the directory and continue then. * openfile.c (copy_options_file): Print a warning if the skeleton file has active options.
2002-12-05* g10.c: New options --[no-]mangle-dos-filenames.Werner Koch1-70/+79
* options.h (opt): Added mangle-dos-filenames. * openfile.c (open_outfile) [USE_ONLY_8DOT3]: Truncate the filename only when this option is set; this is the default.
2002-10-19This commit was manufactured by cvs2svn to create branchRepo Admin1-362/+0
'GNUPG-1-9-BRANCH'.
2002-09-10Cleanups and minor fixes.Werner Koch1-3/+3
2002-08-09* options.skel: Some language tweaks, and remove the load-extensionDavid Shaw1-0/+3
section for random gatherers. * keyring.c (create_tmp_file, rename_tmp_file): Create tmp files with user-only permissions, but restore the original permissions if the user has something special set. * openfile.c (copy_options_file): Create new options file (gpg.conf) with user-only permissions. * keydb.c (keydb_add_resource): Create new keyrings with user-only permissions.
2002-08-06use of EXTSEP_SStefan Bellon1-1/+1
2002-08-06* g10.c (main): Try to use "gpg.conf" as default option file.Werner Koch1-3/+3
* openfile.c (copy_options_file): Changed name of created file.
2002-06-29Update head to match stable 1.0David Shaw1-47/+55
2000-09-18See ChangeLog: Mon Sep 18 16:35:45 CEST 2000 Werner KochWerner Koch1-2/+30