1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-07-01 02:42:44 +02:00
Commit Graph

1226 Commits

Author SHA1 Message Date
NIIBE Yutaka
f61d8fa5a7 gpg: fix previous change
* g10/gpgv.c: Fix void dotlock_remove_lockfiles.
2013-07-16 09:21:54 +09:00
NIIBE Yutaka
212a325d42 gpg: signal handling fix
* include/dotlock.h (dotlock_remove_lockfiles_reclaim): New.
  (dotlock_destroy, dotlock_remove_lockfiles): Add a flag to reclaim
  memory or not.
* util/dotlock.c (dotlock_create): Use
  dotlock_remove_lockfiles_reclaim for atexit.
  (dotlock_destroy_unix, dotlock_destroy)
  (dotlock_remove_lockfiles): Add a reclaim flag.
  (dotlock_remove_lockfiles_reclaim): New.
* g10/signal.c (got_fatal_signal): Disable flag of reclaim memory to
  avoid non-async-face call.
* g10/keydb.c (maybe_create_keyring): Follow the API change.
* g10/gpgv.c: Follow the API change.

--

signal handler got_fatal_signal should not call non-async-signal-safe
functions.  When malloc is interrupted by a signal, it screws up.

This issue is reported:
https://bugs.g10code.com/gnupg/issue1515
http://bugs.debian.org/399904
2013-07-12 17:26:55 +09:00
Christian Aistleitner
ff5cfadc2c Fix honoring --cert-digest-algo when recreating a cert
* g10/sign.c (update_keysig_packet): Override original signature's
digest algo in hashed data.
2013-01-11 13:33:44 +01:00
Werner Koch
3a4b96e665 gpg: Suppress "public key already present" in quiet mode.
* g10/pkclist.c (build_pk_list): Print two diagnostics only in
non-quiet mode.
--

(back-ported from commit 8325d61659)
2012-12-20 09:44:09 +01:00
Werner Koch
f795a0d59e Import only packets which are allowed in a keyblock.
* g10/import.c (valid_keyblock_packet): New.
(read_block): Store only valid packets.
--

A corrupted key, which for example included a mangled public key
encrypted packet, used to corrupt the keyring.  This change skips all
packets which are not allowed in a keyblock.

GnuPG-bug-id: 1455
2012-12-20 09:43:41 +01:00
Werner Koch
3d56d486e1 Remove trailing white space from some files
--
2012-12-19 14:05:56 +01:00
Werner Koch
e33e74e3a4 Fix potential heap corruption in "gpg -v --version"
* g10/gpg.c (build_list): Rewrite to cope with buffer overflow in
certain locales.
* util/membuf.c (put_membuf_str): New.
(get_membuf): Make LEN optional.
--

This fixes an obvious bug in locales where the translated string is
longer than the original.  The bug could be exhibited by using
LANG=ru_RU.utf8 gpg -v --version.

En passant we also removed the trailing white space on continued
lines.

Reported-by: Dmitry V. Levin" <ldv at altlinux.org>
2012-12-15 11:28:00 +01:00
NIIBE Yutaka
09dd073096 Card: Fix the process of writing key or generating key.
* g10/app-openpgp.c (store_fpr): Flush KEY-FPR and KEY-TIME.
--

(cherry picked from commit e7dca3e83e)
2012-12-13 17:25:57 +01:00
David Shaw
d42dcbfa92 The keyserver search menu should honor --keyid-format
* keyserver.c (print_keyrec): Honor --keyid-format when getting back
  full fingerprints from the keyserver (the comment in the code was
  correct, the code was not).
2012-11-29 12:00:46 -05:00
Werner Koch
64e7c237db Create off-line card encryption key with the right size.
* g10/keygen.c (gen_card_key_with_backup): Get the size of the key
from the card.
--

Formerly the off-line encryption key was created with a fixed length
of 1024 bit.  With this change the key is created as expected.

GnuPG-bug-id: 1230
2012-11-08 15:59:47 +01:00
Werner Koch
b1eac93431 Support the not anymore patented IDEA cipher algorithm.
* cipher/idea.c: New.  Take from Libgcrypt master and adjust for
direct use in GnuPG.
* cipher/idea-stub.c: Remove.
* cipher/Makefile.am: Add idea.c and remove idea-stub.c rules.
* configure.ac: Remove idea-stub code.
* g10/gpg.c (check_permissions): Remove code path for ITEM==2.
(main): Make --load-extension a dummy option.
* g10/keygen.c (keygen_set_std_prefs): Include IDEA only in PGP2
compatibility mode.
* g10/misc.c (idea_cipher_warn): Remove.  Also remove all callers.
* g10/seckey-cert.c (do_check): Remove emitting of STATUS_RSA_OR_IDEA.
* g10/status.c (get_status_string): Remove STATUS_RSA_OR_IDEA.
* g10/status.h (STATUS_RSA_OR_IDEA): Remove.

--

To keep the number of actually used algorithms low, we support IDEA
only in a basically read-only way (unless --pgp2 is used during key
generation).  It does not make sense to suggest the use of this old 64
bit blocksize algorithm.  However, there is old data available where
it might be helpful to have IDEA available.
2012-11-08 13:25:02 +01:00
Werner Koch
a76efe1b05 Fix typos spotted during translations
* g10/gpg.c: uppercase after Syntax
* util/secmem.c (print_warn): Update URL.
2012-08-24 16:37:44 +02:00
David Prévot
e393ae3e29 Actually show translators comments in PO files
--

Note that strings marked for gettext need to immediately follow a
TRANSLATOR comment block.
2012-08-24 16:32:40 +02:00
Werner Koch
7a852fba6c With --quiet do not print reading passphrase from fd message.
Fix for bug#1403.
* g10/passphrase.c (read_passphrase_from_fd): Act on --quiet.
2012-04-29 11:54:28 +02:00
David Shaw
509fe4ce5d Honor --cert-digest-algo when recreating a cert.
* g10/sign.c (update_keysig_packet): Honor --cert-digest-algo when
  recreating a cert.

This is used by various things in --edit-key like setpref, primary,
etc.  Suggested by Christian Aistleitner.
2012-01-31 21:30:05 -05:00
David Shaw
561d89803b Merge branch 'STABLE-BRANCH-1-4' of git+ssh://playfair.gnupg.org/git/gnupg into STABLE-BRANCH-1-4 2012-01-19 22:34:45 -05:00
David Shaw
f310735975 Changes to --min-cert-level should cause a trustdb rebuild (issue 1366)
* g10/gpgv.c, g10/trustdb.c (read_trust_options): Add min_cert_level

* g10/trustdb.c (check_trustdb_stale): Request a rebuild if
  pending_check_trustdb is true (set when we detect a trustdb
  parameter has changed).

* g10/keylist.c (public_key_list): Use 'l' in the "tru" with-colons
  listing for min_cert_level not matching.

* g10/tdbio.c (tdbio_update_version_record, create_version_record,
  tdbio_db_matches_options, tdbio_dump_record, tdbio_read_record,
  tdbio_write_record): Add a byte for min_cert_level in the tdbio
  version record.
2012-01-19 22:33:51 -05:00
Werner Koch
cfb193a1de Add a DECRYPTION_INFO status.
* g10/status.h (STATUS_DECRYPTION_INFO): New.
* g10/status.c (get_status_string): Add new status string.
* g10/encr-data.c: Include status.h.
(decrypt_data): Print STATUS_DECRYPTION_INFO.
--
This is  backport of commit  5667e33.

DECRYPTION_INFO <mdc_method> <sym_algo>
   Print information about the symmetric encryption algorithm and
   the MDC method.  This will be emitted even if the decryption
   fails.
2012-01-13 16:20:53 +01:00
Werner Koch
02f282368e gpg: Remove unused fields from a trust data structure.
The functions tdbio_read_record and tdbio_write_record control the
actual on-disk format.  Thus there is no need to keep reserved fields
in the internal data structure.

* g10/tdbio.h (struct trust_record): Remove reserved fields.
2012-01-12 12:19:54 +01:00
Werner Koch
9b2a98ea14 Allow use of a standard space separated fingerprint.
We allow a single or a double space in the middle of the fingerprint
to help with c+p fingerprints from an HTML pages which are not being
enclosed in a "pre" tag.
* g10/getkey.c (classify_user_id): Check for space separated GPG
fingerprint.
--
This is a backport of commit 957fe72 and 372fb4f.
2012-01-10 15:34:02 +01:00
Werner Koch
b9333cd890 Replace file locking by the new portable dotlock code.
* include/dotlock.h: New.  From current gnupg master.
* util/dotlock.c: Ditto.  Include util.h.  The major changes done in
master are: Factor Unix and W32 specific code out into specific
functions.  Define HAVE_POSIX_SYSTEM.  Rearrange some functions.
(disable_dotlock): Rename to dotlock_disable.
(create_dotlock): Rename to dotlock_create and add a dummy arg.
(destroy_dotlock): Rename to dotlock_destroy.
(make_dotlock): Rename to dotlock_take.
(release_dotlock): Rename to dotlock_release.
(remove_lockfiles): Rename to dotlock_remove_lockfiles.
2012-01-10 15:16:44 +01:00
Werner Koch
dccdcef319 Update copyright years.
* util/argparse.c (default_strusage): Update printed copyright year.
2012-01-10 11:51:19 +01:00
Werner Koch
76b73caf91 Rename all ChangeLog files to ChangeLog-2011.
* ChangeLog: New file.
2011-12-02 19:42:56 +01:00
Werner Koch
43c7d1c7cc On VMS use --batch by default if in batch mode.
This problem was identified and solved by Steven M. Schweda.
Note that the vms specific code is not part of this repository.
See http://antinode.info/dec/sw/gnupg.html for the VMS port.
2011-09-12 15:28:28 +02:00
Werner Koch
a95143e225 Removed some set but unused vars. 2011-08-09 10:54:22 +02:00
Werner Koch
c156a636c6 Fix bug#1307
This is a backport of the fixes for 2.0.  There is only one real bug,
the other changes are for clarity and for more picky compilers.
2011-08-09 10:12:36 +02:00
Werner Koch
4fb59b1313 Print the decoded iteration count witn --list-packets.
Fixes bug#1355.
2011-07-22 14:00:08 +02:00
Werner Koch
04b0b050ff Add pubkey letters e and E for ECC.
This does not mean we have any kind of ECC support now.  It is merely
to avoid printing a question mark for the algorithm.

Trailing white space changes as usual.
2011-07-01 10:21:08 +02:00
David Shaw
fc1680abdf * photoid.c (generate_photo_id): Check for the JPEG magic numbers
instead of JFIF since some programs generate an EXIF header first.
This is issue 1331.
2011-04-05 23:47:58 -04:00
Werner Koch
d0a9b8a9fb Don't link gpgv with libreadline
Also add a useful .gitignore file.
2011-02-23 15:13:40 +01:00
David Shaw
933adc0850 * gpg.c (main): Do not provide a default for
--personal-digest-preferences.  This allows the usual digest selection
algorithm to pick a digest based on recipient keys.
2010-10-29 19:16:27 +00:00
David Shaw
79019ee776 * pkclist.c (select_algo_from_prefs): Slightly improve the handling of
MD5 in preference lists.  Instead of replacing MD5 with SHA-1, just
remove MD5 from the list altogether, and let the next-highest ranked
algorithm be chosen.
2010-10-29 19:14:28 +00:00
David Shaw
d89e59bdb3 * pkclist.c (select_algo_from_prefs): Make sure the scores can't
overflow when picking an algorithm (not a security issue since we
can't pick something not present in all preference lists, but we might
pick something that isn't scored first choice).
2010-10-29 17:39:30 +00:00
Werner Koch
a6b47500ac Detect unsigned time_t and adjust y2038 detection. 2010-10-27 10:59:11 +00:00
Werner Koch
397f9cd6a1 Remove warnings on VMS 2010-10-20 06:51:11 +00:00
Werner Koch
27193bbd2c Prepare for 1.4.11 2010-10-18 09:24:48 +00:00
Werner Koch
41f5b0a402 VMS fixes 2010-10-10 09:53:02 +00:00
David Shaw
7f07a1bc90 * options.skel: Make the example for force-v3-sigs match reality (it
has defaulted to off since 2007-10-22).
2010-09-28 16:13:24 +00:00
Werner Koch
6764837956 The rest of the VMS changes. 2010-09-28 15:55:24 +00:00
Werner Koch
aa29ba1689 Minor changes to help the VMS port 2010-09-28 10:07:30 +00:00
Werner Koch
a1fc3a5d9e Preparing a release candidate 2010-09-23 08:15:45 +00:00
Werner Koch
690dc98c6f Minor fixes 2010-08-31 08:42:38 +00:00
Werner Koch
b8d2740923 support more hash algorithms to support the v2 card 2010-07-24 09:18:42 +00:00
Werner Koch
5474061365 Backport bug fix. Fixes bug#1240. 2010-06-18 08:08:21 +00:00
Werner Koch
9017b84423 Ignore some GnuPG-2 only options. 2010-06-01 12:13:31 +00:00
Werner Koch
198c5c5587 Fix bug 1179 2010-05-12 16:06:38 +00:00
Werner Koch
57528d38c0 Fix for bug 1223 2010-05-07 12:32:06 +00:00
Werner Koch
b0a357ad8a Force SHA1 only for v1 cards 2010-03-26 18:11:30 +00:00
David Shaw
5bcd4f613b * plaintext.c (handle_plaintext): Make sure that the stdout flush
succeeded, so we can't lose data when using gpg in a pipeline.  Fixes
bug #1207.
2010-03-26 16:57:09 +00:00
Werner Koch
9529d72b2c Fix bug 1186 2010-02-17 10:28:27 +00:00
Werner Koch
0f91985b21 Change menu prompts. 2010-02-02 14:08:50 +00:00
Werner Koch
4ac7cb0725 Fix some spelling errors. Fixes bug#1127. 2009-12-21 15:58:06 +00:00
Werner Koch
18392e8d61 Fix bug#1059 (missing status line signature verification done with a
subkey while on the main key has expired).
2009-12-17 17:56:17 +00:00
Werner Koch
a929b77b1c minor changes for VMS 2009-12-15 11:07:43 +00:00
Werner Koch
03c414b650 fix bug#1162. 2009-12-15 10:20:10 +00:00
Werner Koch
378b313f58 Fix bug#1138. 2009-09-28 17:11:32 +00:00
Werner Koch
5f9caad6f1 Last minute fixes 2009-09-02 17:30:53 +00:00
Werner Koch
d890215d18 Preparing 1.4.10. 2009-09-02 15:02:01 +00:00
Werner Koch
4fcae6586d Fix debian bug#543530 2009-08-26 06:48:45 +00:00
Werner Koch
1e1b57a294 Preparing for a release candidate 2009-08-13 08:45:23 +00:00
David Shaw
00310b1aa8 Try and detect mis-coded Latin1 and convert it to UTF8. Whether the
heuristics succeed or not, the resulting string must be valid UTF8 as
LDAP requires that.  This is bug 1055.
2009-08-12 05:01:08 +00:00
Werner Koch
b8805ca724 2009-08-03 17:47:18 +00:00
David Shaw
3f95e31e5d * gpg.c (main): --pgp6 includes --disable-mdc. 2009-07-31 14:34:55 +00:00
Werner Koch
930e910ad7 Update key generation menu to match gnupg 2.0.
Changes default preferences and key algorithms.
2009-07-29 10:06:56 +00:00
David Shaw
91df5cb2e3 * keyserver.c (keyserver_import_ldap): Try a DNS-SD lookup to find a
domain-specific LDAP server before resorting to keys.{domain}.
2009-07-23 19:50:25 +00:00
Werner Koch
6d755a83b4 Parse EXTCAP lines from the card.
Change messages for a corrupt trustdb.
2009-07-23 08:00:39 +00:00
Werner Koch
3459c6b015 First set of changes to backport the new card code from 2.0.
For compatibility reasons a few new files had to be added.
Also added estream-printf as this is now used in app-openpgp.c and provides
a better and generic asprintf implementation than the hack we used for the
W32 code in ttyio.c.  Card code is not yet finished.
2009-07-21 14:30:13 +00:00
Werner Koch
b478389753 Repalce an assert by a proper error message. 2009-07-17 11:24:51 +00:00
Werner Koch
81d7fbc7cb Fix bug#1087. 2009-07-16 07:40:16 +00:00
Werner Koch
64f24da283 Fix a couple of minor bugs. 2009-06-24 14:01:20 +00:00
Werner Koch
275ad3fa26 Fix bug#1040. 2009-06-17 10:36:12 +00:00
David Shaw
4843e6c8f2 Remove Camellia restriction. 2009-06-05 16:54:47 +00:00
Werner Koch
58a0c9ee49 Add stub function. Noted by Daniel Leidert. 2009-06-02 15:26:06 +00:00
Werner Koch
0bbe6eda34 Fixed bug1058. 2009-05-22 15:38:49 +00:00
Werner Koch
d72349bde0 Fix bug#1044. 2009-05-20 10:25:58 +00:00
Werner Koch
4694c1a8eb Fix bug 1045 2009-05-11 10:01:11 +00:00
Werner Koch
bc0202a8c2 Fix bug 1045. 2009-05-11 09:37:25 +00:00
Werner Koch
750990401c Print 'empty file' warning only with --verbose. 2009-05-11 09:20:39 +00:00
Werner Koch
23ad4bd73b Fix for bug#1034. 2009-05-06 09:31:15 +00:00
Werner Koch
418e61a824 Improve dotlocking.
Implement locking for W32.
2009-05-05 15:32:16 +00:00
Werner Koch
631a0de335 Backport of Creation-Date parameter for unattended key generation. 2009-05-05 11:44:56 +00:00
Werner Koch
a4fd67937c Fix bug#931.
Silent a compiler warning.
2009-05-05 09:30:34 +00:00
Werner Koch
9b6deeddaf Better error message for a missing keyring.
Fixes Debian#494040.
2009-04-03 10:41:33 +00:00
David Shaw
79f31e85db * keyring.c (rename_tmp_file): Force a fsync (via iobuf_ioctl) on
secret keyring files to be extra safe on filesystems that may not sync
data and metadata together (ext4).  Also check return code from the
cache invalidation to make sure we're safe over NFS and similar.
2009-03-20 20:55:47 +00:00
David Shaw
a2fc01ae00 * gpgv.c (strusage): Fix name of program in "Syntax" line. 2009-03-15 03:10:04 +00:00
Werner Koch
c092f026fe Fix bug 998. 2009-02-09 11:14:42 +00:00
David Shaw
e532a4e86f * keyserver.c (keyserver_typemap): gpgkeys_hkp handles hkps as well. 2009-02-03 19:49:17 +00:00
David Shaw
3aa63ab224 * gpg.c (main): Properly handle UTF8 usernames with --sign-key and --lsign-key. 2008-12-21 16:57:33 +00:00
Werner Koch
7fd24253c1 Change SIG_ID computation to m 2008-12-11 17:46:16 +00:00
Werner Koch
09176a79b9 Close message digest; fixes memory leak. 2008-12-11 17:00:52 +00:00
Werner Koch
0ad3411b07 Check algo usage. 2008-12-09 10:43:22 +00:00
David Shaw
9d76ee5147 * trustdb.c (validate_one_keyblock): Fix the trust signature
calculations so that we lower the trust depth of signatures to fit
within the current chain, rather than discarding any signature that
does not fit within the trust depth.
2008-11-18 17:15:07 +00:00
David Shaw
0042cda87c * main.h, mainproc.c (check_sig_and_print), keylist.c
(list_keyblock_print), pkclist.c (do_edit_ownertrust), keyedit.c
 (menu_showphoto), photoid.c (generate_photo_id, show_photos), misc.c
 (pct_expando): Add %v and %V expandos so that displaying photo IDs
 can show the attribute validity tag (%v) and string (%V).  Originally
 by Daniel Gillmor.
2008-10-03 19:54:30 +00:00
David Shaw
85a3b11cb0 * keyedit.c (keyedit_menu): Fix bug where a modified keyring loses its
modified status after a "clean" or "minimize" that doesn't need to do
anything.
2008-09-25 04:00:36 +00:00
David Shaw
d6c59f314a * pkclist.c (select_algo_from_prefs): Redo function to rank prefs and
pick a consensus winner across all keys.
2008-09-23 21:10:10 +00:00
David Shaw
9855a6b18a * keyserver.c (keyserver_import_cert): Allow keyserver URLs in
addition to full URLs in CERT records.
2008-09-04 16:47:34 +00:00
Werner Koch
64a47d54c4 Fix bug #947 (expire time overflow) 2008-08-11 08:19:48 +00:00
Werner Koch
99fb609e0a Fix !EROFS bug 2008-08-01 10:48:36 +00:00
Werner Koch
d9527051eb Revert that last stupid setuid detection fix. 2008-07-17 19:47:19 +00:00
Werner Koch
e850b7fc22 Ignore gpg2 introduced keywords for --auto-key-locate.
Minor W32 installer fix.
2008-04-30 11:46:35 +00:00