aboutsummaryrefslogtreecommitdiffstats
path: root/g10 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gpg: Disallow the use of v3 keys.disallow-v3-keysWerner Koch2012-06-254-4/+89
| | | | | | | | | | | | | | | | | | | * g10/gpg.c: Add options --allow-v3-keys and --no-allow-v3-keys. (main): Enable --allow-v3-keys in --pgp2 mode. * g10/options.h (opt): Add field allow_v3_keys. * g10/import.c (delete_v3_subkeys): New. (import_one): Skip v3 keys and delete v3 subkeys. (import_print_stats): Print stats on v3 keys and subkeys. * g10/getkey.c (finish_lookup): Skip v3 keys. -- This is a first take on disabling v3 keys. We may need to add some tweaks to make decryption using an existing v3 key easier. There is no need to disallow decryption. Thanks to Georgi Guninski to put some pressure on us to finally do what PGP 2 folks will probably don’t like. See the discussion on gnupg-devel starting 2012-06-22.
* Change all quotes in strings and comments to the new GNU standard.Werner Koch2012-06-0527-205/+205
| | | | | | | | | | | | | | | | | | | 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.
* Print the hash algorithm in colon mode key listing.Werner Koch2012-05-241-6/+2
| | | | * g10/keylist.c (list_keyblock_colon): Print digest_algo.
* Fix type conflict warning.Werner Koch2012-05-241-2/+2
| | | | * g10/keylist.c: Change min_cert_level to a byte.
* Add tweaks for the not anymore patented IDEA algorithm.Werner Koch2012-05-088-58/+1
| | | | | | | | | | | | | | | * 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. * common/status.h (STATUS_RSA_OR_IDEA): Remove. Do not emit this status anymore. -- To keep the number of actually used algorithms low, we want to 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.
* Print warning for arguments not considered an option.Werner Koch2012-03-271-2/+12
| | | | | | | | | | | | | | | | | | GnuPG requires that options are given before other arguments. This can sometimes be confusing. We now print a warning if we found an argument looking alike a long option without being preceded by the stop option. This is bug#1343. * common/argparse.h (ARGPARSE_FLAG_STOP_SEEN): New. * common/argparse.c (arg_parse): Set new flag. * g10/gpg.c (main): Print the warning. * agent/gpg-agent.c (main): Ditto. * dirmngr/dirmngr.c (main): Ditto. * g13/g13.c (main): Ditto. * scd/scdaemon.c (main): Ditto. * sm/gpgsm.c (main): Ditto. * tools/gpg-connect-agent.c (main): Ditto. * tools/gpgconf.c (main): Ditto.
* Allow compress algorithm 0.Werner Koch2012-03-261-3/+1
| | | | | * g10/mainproc.c (proc_compressed): Remove superfluous check for compress algorithm 0. Reported by pfandrade. This is bug#1326.
* common: Add a global variable to for the default error source.Werner Koch2012-02-062-0/+2
| | | | | | | | | | | | | | For the shared code parts it is cumbersome to pass an error sourse variable to each function. Its value is always a constant for a given binary and thus a global variable makes things a lot easier than the former macro stuff. * common/init.c (default_errsource): New global var. (init_common_subsystems): Rename to _init_common_subsystems. Set DEFAULT_ERRSOURCE. * common/init.h: Assert value of GPG_ERR_SOURCE_DEFAULT. (init_common_subsystems): New macro. * common/util.h (default_errsource): Add declaration. * kbx/keybox-defs.h: Add some GPG_ERR_SOURCE_DEFAULT trickery.
* Honor --cert-digest-algo when recreating a cert.David Shaw2012-02-011-2/+7
| | | | | | | | * 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.
* Changes to --min-cert-level should cause a trustdb rebuild (issue 1366)David Shaw2012-01-206-18/+34
| | | | | | | | | | | | | | | | * 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.
* gpg: Fix segv with RSA_S keys.Werner Koch2012-01-111-0/+8
| | | | | | | | | | | | | | | * g10/misc.c (pubkey_get_npkey, pubkey_get_nskey) (pubkey_get_nsig, pubkey_get_nenc): Map all RSA algo ids to GCRY_PK_RSA. -- The problem is that Libgcrypt has no more support for the alternate RSA ids and thus if asking for the number of parameters, they will return zero. Now, this leads to packing the key parameters into an opaque MPI but because the algorithm id is actually known to GPG, it assumes valid RSA parameters. An example key with RSA_S is 0x5434509D.
* Merge fix for issue 1331 from 1.4.David Shaw2011-12-151-3/+2
| | | | | * photoid.c (generate_photo_id): Check for the JPEG magic numbers instead of JFIF since some programs generate an EXIF header first.
* Avoid possible double free in export.c.Werner Koch2011-12-021-1/+1
| | | | | * g10/export.c (transfer_format_to_openpgp): Avoid possible double free of LIST. Reported by NIIBE Yutaka.
* Generate the ChangeLog from commit logs.Werner Koch2011-12-012-6/+17
| | | | | | | | | | | | | * scripts/gitlog-to-changelog: New script. Taken from gnulib. * scripts/git-log-fix: New file. * scripts/git-log-footer: New file. * doc/HACKING: Describe the ChangeLog policy * ChangeLog: New file. * Makefile.am (EXTRA_DIST): Add new files. (gen-ChangeLog): New. (dist-hook): Run gen-ChangeLog. Rename all ChangeLog files to ChangeLog-2011.
* Rewrite dns-cert.c to not use the gpg-only iobuf stuff.Werner Koch2011-11-302-20/+21
| | | | | | | | | | | | | * common/dns-cert.c: Remove iobuf.h. (get_dns_cert): Rename to _get_dns_cert. Remove MAX_SIZE arg. Change iobuf arg to a estream-t. Rewrite function to make use of estream instead of iobuf. Require all parameters. Return an gpg_error_t error instead of the type. Add arg ERRSOURCE. * common/dns-cert.h (get_dns_cert): New macro to pass the error source to _gpg_dns_cert. * common/t-dns-cert.c (main): Adjust for changes in get_dns_cert. * g10/keyserver.c (keyserver_import_cert): Ditto. * doc/gpg.texi (GPG Configuration Options): Remove max-cert-size.
* Increase the default buffer size for DNS certificates.Werner Koch2011-11-302-2/+7
| | | | | * common/t-dns-cert.c (main): Increase MAX_SIZE to 64k. * g10/keyserver.c (DEFAULT_MAX_CERT_SIZE): Increase from 16k to 64k.
* Don't print anonymous recipient messages in quiet mode.Werner Koch2011-11-222-3/+10
| | | | This is bug#1378.
* Allow creating subkeys using an existing keyWerner Koch2011-11-068-63/+246
| | | | | | This works by specifying the keygrip instead of an algorithm (section number 13) and requires that the option -expert has been used. It will be easy to extend this to the primary key.
* Add a flag parameter to dotlock_create.Werner Koch2011-09-285-7/+8
| | | | This allows us to extend this function in the future.
* Renamed the lock functions.Werner Koch2011-09-236-28/+37
| | | | Also cleaned up the dotlock code for easier readability.
* Allow NULL for free_public_key.Werner Koch2011-09-208-34/+36
|
* avoid use of freed pointerJim Meyering2011-09-202-1/+11
| | | | | | | | | | | | | Without this patch, pk2 would be freed twice. >From 2a18a4b757e0896e738fefbbaa8ff8c23a9edf89 Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Tue, 20 Sep 2011 16:20:39 +0200 Subject: [PATCH] avoid use of freed pointer If we free pk2 at the top of the for-loop, set it to NULL so that we don't free it again just before returning. * revoke.c (gen_desig_revoke): Don't use pk2 after freeing it.
* Replace gcry_md_start_debug by gcry_md_debug.Werner Koch2011-09-205-9/+18
| | | | | This is to allow building with Libgcrypt master (1.6) which has some cleanups in the API/ABI.
* Fixed set but unused variable bugsWerner Koch2011-08-106-31/+37
|
* Do not print read-only trustdb warning with --quiet.Werner Koch2011-07-292-1/+5
| | | | | This is only a warning and gpg would anyway print an error message if it tries to write to the trustdb.
* Print decoded S2K count in --list-packets mode.Werner Koch2011-07-182-1/+15
| | | | Fixes bug#1355.
* Allow generation of card keys up to 4096 bit.Werner Koch2011-06-163-16/+84
| | | | | | | | | | | | | | | This patch implementes a chunk mode to pass the key parameters from scdaemon to gpg. This allows to pass arbitrary long key paremeters; it is used for keys larger than 3072 bit. Note: the card key generation in gpg is currently broken. The keys are generated but it is not possible to create the self-signature because at that time the gpg-agent does not yet know about the new keys and thus can't divert the sign request to the card. We either need to run the learn command right after calling agent_scd_genkey or implement a way to sign using the currently inserted card. Another option would be to get rid of agent_scd_genkey and implement the feature directly in agent_genkey.
* Fix for latest fix in Libgcrypt.Werner Koch2011-06-132-1/+8
|
* Fix size_t vs int issues.Marcus Brinkmann2011-06-015-10/+19
|
* Merge branch 'wk-gpg-keybox'Werner Koch2011-04-298-348/+403
|\
| * Re-indentation of keydb.c and error code changes.Werner Koch2011-04-298-348/+403
| | | | | | | | | | | | 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.
* | Fix import stat counter and abort secret key import on merge-only error case.Marcus Brinkmann2011-04-292-25/+36
| |
* | Give sensible error messages when trying to delete secret key.Marcus Brinkmann2011-04-292-11/+26
|/
* Removed memory leak in the ECDH code.Werner Koch2011-04-282-32/+59
|
* Fixed regression in OpenPGP secret key export.Werner Koch2011-04-262-4/+8
| | | | | | | | 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.
* Fix regression in gpg's mail address parsing.Werner Koch2011-04-257-10/+20
| | | | | | 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-20 Marcus Brinkmann <[email protected]>Marcus Brinkmann2011-04-202-1/+6
| | | | | * keylist.c (list_keyblock_colon): Use get_ownertrust_info, not get_ownertrust (which lead to binary zeroes in the output!).
* Detect premature EOF while parsing corrupted key packets.Werner Koch2011-03-282-17/+31
| | | | | | | | | | | 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.
* Make use of gcry_kdf_derive.Werner Koch2011-03-102-77/+24
| | | | | | 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.
* Require libgcrypt 1.5Werner Koch2011-03-083-18/+6
| | | | | | | | Without Libgcrypt 1.5 is was not possible to use ECC keys. ECC is major new feature and thus it does not make sense to allow building with an older Libgcrypt without supporting ECC. Also fixed a few missing prototypes.
* Print the secret keyinfo stuff with --card-status again.Werner Koch2011-03-033-65/+79
|
* Minor code cleanups.Werner Koch2011-03-033-8/+10
| | | | | | | * keyid.c (hash_public_key): Remove shadowing NBITS. * misc.c (pubkey_nbits): Replace GCRY_PK_ by PUBKEY_ALGO_. (get_signature_count): Remove warning.
* Fix faulty gcc warningsWerner Koch2011-03-032-6/+10
|
* Fix usage of SHA-2 algorithm with OpenPGP cards.Werner Koch2011-03-023-148/+5
| | | | | | | 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.
* Add ECC import regression tests and fixed a regression.Werner Koch2011-02-102-16/+17
| | | | | | 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.
* Replace printf by es_printf in keyserver.cWerner Koch2011-02-092-27/+28
| | | | This is similar to the change in keylist.c and elsewhere.
* Add finger support to dirmngr.Werner Koch2011-02-083-26/+89
| | | | | | | | | | | | | 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:[email protected] (I might be the last user of finger ;-)
* Fix ECDSA 521 bit signing.Werner Koch2011-02-072-15/+20
| | | | | This fix also allows the creation and use of an 521 bit ECDH key which used to fail while creating the binding signature.
* Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch2011-02-0454-926/+906
| | | | | | | | 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.
* Removed deprecated SIGEXPIRED status line.Werner Koch2011-02-042-2/+5
|