aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-06-24gpg: Screen keyserver responses.Stefan Tomanek1-66/+92
* g10/main.h (import_filter_t): New. * g10/import.c (import): Add filter callbacks to param list. (import_one): Ditto. (import_secret_one): Ditto. (import_keys_internal): Ditto. (import_keys_stream): Ditto. * g10/keyserver.c (keyserver_retrieval_filter): New. (keyserver_spawn): Pass filter to import_keys_stream() -- These changes introduces import functions that apply a constraining filter to imported keys. These filters can verify the fingerprints of the keys returned before importing them into the keyring, ensuring that the keys fetched from the keyserver are in fact those selected by the user beforehand. Signed-off-by: Stefan Tomanek <[email protected]> Re-indention and minor changes by wk. Resolved conflicts: g10/import.c g10/keyserver.c g10/main.h
2013-10-04gpg: Protect against rogue keyservers sending secret keys.Werner Koch1-0/+6
* g10/options.h (IMPORT_NO_SECKEY): New. * g10/keyserver.c (keyserver_spawn, keyserver_import_cert): Set new flag. * g10/import.c (import_secret_one): Deny import if flag is set. -- By modifying a keyserver or a DNS record to send a secret key, an attacker could trick a user into signing using a different key and user id. The trust model should protect against such rogue keys but we better make sure that secret keys are never received from remote sources. Suggested-by: Stefan Tomanek Signed-off-by: Werner Koch <[email protected]>
2012-12-20gpg: Import only packets which are allowed in a keyblock.Werner Koch1-1/+22
* 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 (cherry-picked from commit 3a4b96e665fa639772854058737ee3d54ba0694e)
2011-01-10Fix bug#1307.Werner Koch1-5/+2
2010-05-07Take care of already existing bogus 0x1f signatures.Werner Koch1-1/+46
2010-05-07Fix for bug 1223Werner Koch1-0/+13
2010-05-07Re-indent code and use test macros for betetr readabilityWerner Koch1-158/+166
2008-10-20Marked all unused args on non-W32 platforms.Werner Koch1-6/+25
2008-04-08Enhanced --auto-key-locate.Werner Koch1-22/+35
2008-03-25Fix bug 894.Werner Koch1-2/+19
Change default keyserver. Allow key protection with Camellia.
2007-12-12Support DSA2.Werner Koch1-2/+2
Support Camellia for testing. More audit stuff.
2007-12-10Fix for bug 851.Werner Koch1-2/+2
Fixed auto generation of the stub key for the card. Allow to encrypt toElgamal encryption keys of type 20.
2007-11-19Started to implement the audit log feature.Werner Koch1-1/+1
Pass PINENTRY_USER_DATA and XAUTHORITY to Pinentry. Improved support for the quality bar. Minor internal restructuring. Translation fixes.
2007-10-25Ported changes from 1.4.Werner Koch1-69/+81
Add copyright notices.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-02-26Add new SVN only file README.maintWerner Koch1-4/+10
doc/ * gpg.texi (GPG Configuration): Document envvar LANGUAGE. (GPG Configuration Options): Document show-primary-uid-only. g10/ * gpg.c (main): Add verify option show-primary-uid-only. * options.h (VERIFY_SHOW_PRIMARY_UID_ONLY): New. * mainproc.c (check_sig_and_print): Implement it. * encr-data.c (decrypt_data): Correctly test for unknown algorithm. * import.c (check_prefs): Ditto. * keyedit.c (show_prefs): Ditto. * mainproc.c (proc_symkey_enc): Ditto.
2006-12-06Fixes for CVE-2006-6235Werner Koch1-2/+5
2006-10-18Fixed a bug with very long keys.Werner Koch1-5/+5
2006-10-02Fix for bug 537Werner Koch1-1/+1
2006-07-26Fixed memory allocation bug and typos.Werner Koch1-5/+3
2006-06-28i18n fixWerner Koch1-2/+7
2006-06-27Ported patches from 1.4.x Werner Koch1-9/+25
2006-06-12* import.c (import_one): Add a flag (from_sk) so we don't check prefsDavid Shaw1-6/+7
on an autoconverted public key. The check should only happen on the sk size. Noted by Dirk Traulsen.
2006-05-25* keygen.c (gen_dsa): Allow generating DSA2 keys (allow specifying sizes >David Shaw1-0/+9
1024 when --enable-dsa2 is set). The size of q is set automatically based on the key size. (ask_keysize, generate_keypair): Ask for DSA size when --enable-dsa2 is set.
2006-05-23g10/ does build again.Werner Koch1-2/+4
2006-05-22* import.c (import_one): Fix bug when importing a new key from a file.David Shaw1-7/+5
2006-05-22* getkey.c (get_pubkey_byname), import.c (import_one): Fix key selectionDavid Shaw1-3/+11
problem when auto-key-locate returns a list of keys, not all of which are usable (revoked, expired, etc). Noted by Simon Josefsson.
2006-04-19Continued with merging.Werner Koch1-8/+8
Still does not build.
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-412/+882
The gpg part does not yet build.
2006-04-03About to release 1.4.3gnupg-1.4.3Werner Koch1-3/+2
2006-03-14* main.h, import.c (import_one): Optionally return the fingerprint ofDavid Shaw1-22/+31
the key being imported. (import_keys_internal, import_keys_stream, import): Change all callers.
2005-11-18* keyedit.c (keyedit_menu, menu_clean): Simplify clean options to justDavid Shaw1-6/+4
"clean", and add "minimize". * import.c (parse_import_options): Make help text match the export versions of the options. * options.h, export.c (parse_export_options, do_export_stream): Reduce clean options to two: clean and minimize. * trustdb.h, trustdb.c (clean_one_uid): New function that joins uid and sig cleaning into one for a simple API outside trustdb.
2005-11-12* trustdb.h, trustdb.c (clean_key): New function to handle keyDavid Shaw1-33/+12
cleaning from one convenient place. * options.h, import.c (parse_import_options, clean_sigs_from_all_uids, import_one): Reduce clean options to two: clean and minimize. * parse-packet.c (setup_user_id): Remove. (parse_user_id, parse_attribute): Just use xmalloc_clear instead.
2005-11-10* options.h, import.c (parse_import_options, clean_sigs_from_all_uids,David Shaw1-4/+8
import_one): Add import-minimal option. Similar to export-minimal, except it works on the way in.
2005-11-10* trustdb.h, trustdb.c (clean_sigs_from_uid): Add flag to remove allDavid Shaw1-1/+1
non-selfsigs from key during cleaning. Change all callers. * export.c (do_export_stream): Use it here so we don't need additional minimize code in the export path.
2005-11-02* import.c (import_one): Do collapse_uids() before we do any cleaningDavid Shaw1-5/+4
so keyserver mangled keys with doubled user IDs can be properly cleaned - possibly sigs on the different user IDs cancel each other out. * import.c (parse_import_options), export.c (parse_export_options): List "xxx-clean" before the longer options so we don't end up with a partial match on the longer options. * trustdb.c (clean_uids_from_key): Return proper number of cleaned user IDs. Don't count user IDs as cleaned unless we actually delete something.
2005-09-14* main.h, misc.c (parse_options): Add the ability to have helpDavid Shaw1-12/+20
strings in xxx-options commands. * keyserver.c (keyserver_opts), import.c (parse_import_options), export.c (parse_export_options), g10.c (parse_list_options, main): Add help strings to xxx-options.
2005-07-27Converted all m_free to xfree etc.Werner Koch1-27/+27
2005-07-26Preparing a releaseWerner Koch1-2/+1
2005-07-22* gpg.sgml (http):Werner Koch1-1/+2
* g10.c, options.h: New option --exit-on-status-write-error. * status.c (write_status_text): Make use of this option.
2005-07-09* trustdb.c (clean_uids_from_key): Don't keep a valid selfsig aroundDavid Shaw1-6/+7
when compacting a uid. There is no reason to make an attacker's job easier - this way they only have a revocation which is useless in bringing the uid back. * keydb.h, kbnode.c (undelete_kbnode): Removed. No longer needed. * import.c (chk_self_sigs): Allow a uid revocation to be enough to allow importing a particular uid (no self sig needed). This allows importing compacted uids.
2005-06-14* keygen.c (save_unprotected_key_to_card): Fix gcc4 warning.David Shaw1-5/+25
* options.h, import.c (parse_import_options, import_one): Add import-clean-uids option to automatically compact unusable uids when importing. Like import-clean-sigs, this may nodify the local keyring. * trustdb.c (clean_uids_from_key): Only allow selfsigs to be a candidate for re-inclusion.
2005-06-12* options.h, import.c (parse_import_options, clean_sigs_from_all_uids,David Shaw1-6/+41
import_one): Add import-clean-sigs option to automatically clean a key when importing. Note that when importing a key that is already on the local keyring, the clean applies to the merged key - i.e. existing superceded or invalid signatures are removed.
2005-06-10* options.h, import.c (parse_import_options, delete_inv_parts):David Shaw1-25/+2
import-unusable-sigs is now a noop.
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2005-02-06* trustdb.h, trustdb.c (trustdb_check_or_update): New. If the trustdbDavid Shaw1-9/+6
is dirty and --interactive is set, do an --update-trustdb. If not interactive, do a --check_trustdb unless --no-auto-check-trustdb is set. * import.c (import_keys_internal): Moved from here. * keyserver.c (keyserver_refresh): Call it here after all refreshing has happened so that we don't rebuild after each preferred keyserver set of imports, but do one big rebuild at the end. This is Debian bug #293816, noted by Kurt Roeckx.
2005-01-20* gpgv.c (tty_fprintf): New stub.Werner Koch1-2/+231
* card-util.c (card_status): Create asecret key stub on the fly and print more information about a card key. * import.c (pub_to_sec_keyblock, auto_create_card_key_stub): New. * getkey.c (get_seckeyblock_byfprint): New. * keylist.c (print_card_key_info): New.
2005-01-03* Makefile.am: Use @LIBUSB@ instead of @LIBUSB_LIBS@David Shaw1-0/+6
* import.c (delete_inv_parts): Comments on import-unusable-sigs.
2005-01-01* options.h, import.c (parse_import_options, delete_inv_parts): AddDavid Shaw1-1/+20
import-unusable-sigs flag to enable importing unusable (currently: expired) sigs. * options.h, export.c (parse_export_options, do_export_stream): Add export-unusable-sigs flag to enable exporting unusable (currently: expired) sigs.
2004-11-26* options.h, export.c (parse_export_options, do_export_stream), import.cDavid Shaw1-5/+7
(parse_import_options, import_keys_internal): Make the import-options and export-options distinct since they can be mixed together as part of keyserver-options.