1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-05-28 21:50:02 +02:00
Commit Graph

642 Commits

Author SHA1 Message Date
Marcus Brinkmann
1c684df5b8 Fix size_t vs int issues. 2011-06-01 21:43:30 +02:00
Werner Koch
c36deeea8b Merge branch 'wk-gpg-keybox' 2011-04-29 15:10:36 +02:00
Werner Koch
afe5c1a370 Re-indentation of keydb.c and error code changes.
Returning -1 as an error code is not very clean given that gpg error
has more descriptive error codes.  Thus we now return
GPG_ERR_NOT_FOUND for all search operations and adjusted all callers.
2011-04-29 15:07:11 +02:00
Marcus Brinkmann
10cccd45af Fix import stat counter and abort secret key import on merge-only error case. 2011-04-29 12:02:46 +02:00
Marcus Brinkmann
a286e95f3a Give sensible error messages when trying to delete secret key. 2011-04-29 12:01:52 +02:00
Werner Koch
25f292ed89 Removed memory leak in the ECDH code. 2011-04-28 10:51:14 +02:00
Werner Koch
817f07173c Fixed regression in OpenPGP secret key export.
The protection used in the exported key used a different iteration
count than given in the S2K field.  Thus all OpenPGP keys exported
from GnuPG 2.1-beta can't be imported again.  Given that the actual
secret key material is kept in private-keys-v1.d/ the can be
re-exported with this fixed version.
2011-04-26 20:39:09 +02:00
Werner Koch
5da12674ea Fix regression in gpg's mail address parsing.
Since 2009-12-08 gpg was not able to find email addresses indicated
by a leading '<'.  This happened when I merged the user id
classification code of gpgsm and gpg.
2011-04-25 23:59:25 +02:00
Marcus Brinkmann
dd491d290a 2011-04-20 Marcus Brinkmann <mb@g10code.com>
* keylist.c (list_keyblock_colon): Use get_ownertrust_info, not
        get_ownertrust (which lead to binary zeroes in the output!).
2011-04-20 22:41:22 +02:00
Werner Koch
4206a2bd48 Detect premature EOF while parsing corrupted key packets.
This helps in the case of an unknown key algorithm with a corrupted
packet which claims a longer packet length.  This used to allocate the
announced packet length and then tried to fill it up without detecting
an EOF, thus taking quite some time.  IT is easy to fix, thus we do
it.  However, there are many other ways to force gpg to use large
amount of resources; thus as before it is strongly suggested that the
sysadm uses ulimit do assign suitable resource limits to the gpg
process.  Suggested by Timo Schulz.
2011-03-28 11:08:03 +02:00
Werner Koch
b9bcc77d6c Make use of gcry_kdf_derive.
Factoring common code out is always a Good Thing.  Also added a
configure test to print an error if gcry_kdf_derive is missing in
Libgcrypt.
2011-03-10 18:39:34 +01:00
Werner Koch
35205e1300 Print the secret keyinfo stuff with --card-status again. 2011-03-03 16:16:24 +01:00
Werner Koch
aeb324273a Minor code cleanups.
* keyid.c (hash_public_key): Remove shadowing NBITS.

	* misc.c (pubkey_nbits): Replace GCRY_PK_ by PUBKEY_ALGO_.
	(get_signature_count): Remove warning.
2011-03-03 13:01:03 +01:00
Werner Koch
ea41f5b4c1 Fix faulty gcc warnings 2011-03-03 12:40:54 +01:00
Werner Koch
1c09def22d Fix usage of SHA-2 algorithm with OpenPGP cards.
This was a regression in 2.1 introduced due to having the agent do the
signing in contrast to the old "SCD PKSIGN" command which accesses the
scdaemon directly and passed the hash algorithm.  The hash algorithm
is used by app-openpgp.c only for a sanity check.
2011-03-02 15:35:10 +01:00
Werner Koch
d290f2914a Add ECC import regression tests and fixed a regression.
The import test imports the keys as needed and because they are
passphrase protected we now need a pinentry script to convey the
passphrase to gpg-agent.
2011-02-10 20:45:37 +01:00
Werner Koch
ba23e88faa Replace printf by es_printf in keyserver.c
This is similar to the change in keylist.c and elsewhere.
2011-02-09 19:46:00 +01:00
Werner Koch
2c79a2832c Add finger support to dirmngr.
The basic network code from http.c is used for finger.  This keeps the
network related code at one place and we are able to use the somewhat
matured code form http.c.  Unfortunately I had to enhance the http
code for more robustness and probably introduced new bugs.

Test this code using

  gpg --fetch-key finger:wk@g10code.com

(I might be the last user of finger ;-)
2011-02-08 21:11:19 +01:00
Werner Koch
8a7336e0bf Fix ECDSA 521 bit signing.
This fix also allows the creation and use of an 521 bit ECDH key which
used to fail while creating the binding signature.
2011-02-07 14:38:39 +01:00
Werner Koch
cd9614b81b Removed deprecated SIGEXPIRED status line. 2011-02-04 10:28:28 +01:00
Werner Koch
9f38f3918a Fix test for gcry_pk_get_curve.
Add a compatibility fixes for the non-curve case.
Remove -lber from the dirmngr link line.
2011-02-03 22:04:31 +01:00
Werner Koch
5667e33290 Add a DECRYPTION_INFO status.
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.
2011-02-03 20:59:01 +01:00
Werner Koch
71e7a1644e Relax mailbox name checking. Fixes bug#1315. 2011-02-03 18:05:56 +01:00
Werner Koch
d9e2dcc1a9 Extend algo selection menu.
This allows to add an ECC key and to set the capabilities of an ECDSA
key.

Fix printing of the ECC algorithm when creating a signature.
2011-02-03 17:40:43 +01:00
Werner Koch
0b5bcb40cf Finished ECC integration.
Wrote the ChangeLog 2011-01-13 entry for Andrey's orginal work modulo
the cleanups I did in the last week.  Adjusted my own ChangeLog
entries to be consistent with that entry.

Nuked quite some trailing spaces; again sorry for that, I will better
take care of not saving them in the future.  "git diff -b" is useful
to read the actual changes ;-).

The ECC-INTEGRATION-2-1 branch can be closed now.
2011-02-03 16:35:33 +01:00
Werner Koch
20f429f735 Compute the fingerprint for ECDH only on demand.
This also fixes a failed assertion when using a v3 key where the
fingerprint size is not 20.
2011-02-02 17:40:32 +01:00
Werner Koch
4659c923a0 Sample ECC keys and message do now work.
Import and export of secret keys does now work.  Encryption has been
fixed to be compatible with the sample messages.

This version tests for new Libgcrypt function and thus needs to be
build with a new Libgcrypt installed.
2011-02-02 15:48:54 +01:00
Werner Koch
e0d4139e19 Move OpenPGP OID helpers to common/.
This is needed so that the agent will be able to export and import
OpenPGP secret keys.  Add test case.

Removed unused function.
2011-01-31 18:19:14 +01:00
Werner Koch
328a642aa5 Fixed the ECC interface to Libgcrypt to be ABI compatible with the previous version.
Quite some changes were needed but in the end we have less code than
before.  Instead of trying to do everything with MPIs and pass them
back and forth between Libgcrypt and GnuPG, we know use the
S-expression based interface and make heavy use of our opaque MPI
feature.

Encryption, decryption, signing and verification work with
self-generared keys.

Import and export does not yet work; thus it was not possible to check
the test keys at https://sites.google.com/site/brainhub/pgpecckeys .
2011-01-31 15:44:24 +01:00
Werner Koch
0fb0bb8d9a Reworked the ECC changes to better fit into the Libgcrypt API.
See ChangeLog for details.  Key generation, signing and verification works.
Encryption does not yet work.  Requires latest Libgcrypt changes.
2011-01-31 09:27:06 +01:00
Werner Koch
358afc0dc8 Function name cleanups
Also nuked some trailing spaces.
2011-01-26 17:17:43 +01:00
Werner Koch
d879c287ac Started with some code cleanups in ECDH.
The goal is to have the ECDH code more uniform with the other
algorithms.  Also make error messages and variable names more similar
to other places.
2011-01-25 20:28:25 +01:00
Werner Koch
302c5a826c More ECDH code cleanups 2011-01-25 17:48:51 +01:00
Werner Koch
638dca5dbc Editorial cleanups of keygen.c
Also fixed a regression introduced by me in pubkey_enc.c.
Added extra checks.  Removed unused code.
2011-01-25 16:54:18 +01:00
Werner Koch
c5e8a4c0fd Merge branch 'master' into ECC-INTEGRATION-2-1 2011-01-24 12:24:11 +01:00
Werner Koch
c3db7705c0 Truncate the DSA hash; fixes regression.
Removed left over debug code.
2011-01-21 15:58:07 +01:00
Werner Koch
27929981fc Make most of the selftests work.
Note that there is still a problem with tests/openpgp/sigs.test while
using the option --digest-algo SHA256.
2011-01-21 15:22:41 +01:00
Werner Koch
7f32d88ed1 All standard keyserver commands are now using dirmngr. 2011-01-20 14:12:53 +01:00
Werner Koch
357f8d5398 Keyserver search and get basically works again. 2011-01-18 12:51:16 +01:00
Werner Koch
8c8c45725f Initial code checking for backup - not yet working. 2011-01-10 14:30:17 +01:00
Werner Koch
3f659600c7 Change last change. Does now work. 2010-12-09 12:57:50 +00:00
Werner Koch
1486dec17b Change dirmngr timer under W32CE.
Fix trustdb open problem under W32CE.
2010-12-09 11:50:22 +00:00
Werner Koch
fcb5f7d08f s/AES/AES128/ in diagnostics and --list-config 2010-12-02 15:49:02 +00:00
Werner Koch
b3f9e2130e Change stack size for Wince.
Allow for a longer agent atartup under wince.
Print gpg output via estream.
2010-11-23 18:46:41 +00:00
Werner Koch
0103a53aa6 Smartcard related updates 2010-11-17 13:21:24 +00:00
David Shaw
b4da5a4150 * 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).

* 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:49:54 +00:00
Werner Koch
2e82b095cd Better support unsigned time_t 2010-10-27 11:26:53 +00:00
Werner Koch
02e4c3cb7e Re-implemented GPG's --passwd command and improved it. 2010-10-26 09:10:29 +00:00
Werner Koch
c212133918 Remove cruft.
Make --gen-revoke work
2010-10-21 10:25:03 +00:00
Werner Koch
25b1e76b44 Enable i18n for W32. 2010-10-20 15:06:50 +00:00