aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyserver.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Comment typo fixesWerner Koch2014-03-121-2/+5
| | | | --
* gpg: Protect against rogue keyservers sending secret keys.Werner Koch2014-03-071-4/+8
| | | | | | | | | | | | | | | | | | | | | | * 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]> (cherry picked from commit e7abed3448c1c1a4e756c12f95b665b517d22ebe) Resolved conflicts: g10/import.c g10/keyserver.c
* gpg: Allow building without any trust model support.Werner Koch2014-02-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Add option --disable-trust-models (NO_TRUST_MODELS): New ac_define and am_conditional. * g10/Makefile.am (trust_source): New. (gpg2_SOURCES): Factor some files out to above. Add trust.c. * g10/gpg.c [NO_TRUST_MODELS]: Disable options --export-ownertrust, --import-ownertrust, --update-trustdb, --check-trustdb, --fix-trustdb, --list-trustdb, --trustdb-name, --auto-check-trustdb, --no-auto-check-trustdb, and --force-ownertrust. (parse_trust_model) [NO_TRUST_MODELS]: Do not build. (main) [NO_TRUST_MODELS]: Set trust_model to always and exclude all trustdb related option code. * g10/keyedit.c (cmds) [NO_TRUST_MODELS]: Remove menu items "trust", "enable", and "disable". * g10/keylist.c (public_key_list) [NO_TRUST_MODELS]: Do not print "tru" record. * g10/trust.c: New. * g10/trustdb.c (struct key_item): Move to trustdb.h. (register_trusted_keyid): Rename to tdb_register_trusted_keyid. (register_trusted_key): Rename to tdb_register_trusted_key. (trust_letter, uid_trust_string_fixed, trust_value_to_string) (string_to_trust_value, get_ownertrust_with_min, get_ownertrust_info) (get_ownertrust_string, get_validity_info, get_validity_string) (clean_sigs_from_uid, clean_uid_from_key, clean_key): Move to trust.c. (mark_usable_uid_certs): Move to trust.c and make global. (is_in_klist): Move as inline to trustdb.h. (trustdb_check_or_update): Rename to tdb_check_or_update (revalidation_mark): Rename to tdb_revalidation_mark. (get_ownertrust): Rename to tdb_get_ownertrust. (get_min_ownertrust): Rename to tdb_get_min_ownertrust. (update_ownertrust): Rename to tdb_update_ownertrust. (clear_ownertrusts): Rename to tdb_clear_ownertrusts. (cache_disabled_value): Rename to tdb_cache_disabled_value. (check_trustdb_stale): Rename to tdb_check_trustdb_stale. (get_validity): Rename to tdb_get_validity_core, add arg MAIN_PK and factor some code out to ... * trust.c (get_validity): ...new. (check_or_update_trustdb): New wrapper. (revalidation_mark): New wrapper. (get_ownertrust): New wrapper. (get_ownertrust_with_min): New wrapper. (update_ownertrust): New wrapper. (clear_ownertrusts): New wrapper. (cache_disabled_value): New wrapper. (check_trustdb_stale): New wrapper. * tests/openpgp/defs.inc (opt_always): New. Use in all tests instead of --always-trust.
* gpg: Use only OpenPGP public key algo ids and add the EdDSA algo id.Werner Koch2014-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/sexputil.c (get_pk_algo_from_canon_sexp): Change to return a string. * g10/keygen.c (check_keygrip): Adjust for change. * sm/certreqgen-ui.c (check_keygrip): Likewise. * agent/pksign.c (do_encode_dsa): Remove bogus map_pk_openpgp_to_gcry. * g10/misc.c (map_pk_openpgp_to_gcry): Remove. (openpgp_pk_test_algo): Change to a wrapper for openpgp_pk_test_algo2. (openpgp_pk_test_algo2): Rewrite. (openpgp_pk_algo_usage, pubkey_nbits): Add support for EdDSA. (openpgp_pk_algo_name): Rewrite to remove need for gcry calls. (pubkey_get_npkey, pubkey_get_nskey): Ditto. (pubkey_get_nsig, pubkey_get_nenc): Ditto. * g10/keygen.c(do_create_from_keygrip): Support EdDSA. (common_gen, gen_ecc, ask_keysize, generate_keypair): Ditto. * g10/build-packet.c (do_key): Ditto. * g10/export.c (transfer_format_to_openpgp): Ditto. * g10/getkey.c (cache_public_key): Ditto. * g10/import.c (transfer_secret_keys): Ditto. * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Ditto. * g10/mainproc.c (proc_pubkey_enc): Ditto. * g10/parse-packet.c (parse_key): Ditto, * g10/sign.c (hash_for, sign_file, make_keysig_packet): Ditto. * g10/keyserver.c (print_keyrec): Use openpgp_pk_algo_name. * g10/pkglue.c (pk_verify, pk_encrypt, pk_check_secret_key): Use only OpenPGP algo ids and support EdDSA. * g10/pubkey-enc.c (get_it): Use only OpenPGP algo ids. * g10/seskey.c (encode_md_value): Ditto. -- This patch separates Libgcrypt and OpenPGP public key algorithms ids and in most cases completely removes the Libgcrypt ones. This is useful because for Libgcrypt we specify the algorithm in the S-expressions and the public key ids are not anymore needed. This patch also adds some support for PUBKEY_ALGO_EDDSA which will eventually be used instead of merging EdDSA with ECDSA. As of now an experimental algorithm id is used but the plan is to write an I-D so that we can get a new id from the IETF. Note that EdDSA (Ed25519) does not yet work and that more changes are required. The ECC support is still broken right now. Needs to be fixed. Signed-off-by: Werner Koch <[email protected]>
* gpg: Remove a function wrapper.Werner Koch2013-01-081-1/+1
| | | | | | * g10/keydb.h (keydb_search): Remove macro. * g10/keydb.c (keydb_search2): Rename to keydb_search. Change all callers.
* The keyserver search menu should honor --keyid-formatDavid Shaw2012-11-291-5/+11
| | | | | | * 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).
* Fix printing of ECC algo names in hkp keyserver listings.Werner Koch2012-11-271-2/+4
| | | | * g10/keyserver.c (print_keyrec): Map OpenPGP algorithm ids.
* Change all quotes in strings and comments to the new GNU standard.Werner Koch2012-06-051-5/+5
| | | | | | | | | | | | | | | | | | | 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.
* Rewrite dns-cert.c to not use the gpg-only iobuf stuff.Werner Koch2011-11-301-20/+16
| | | | | | | | | | | | | * 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-301-2/+3
| | | | | * common/t-dns-cert.c (main): Increase MAX_SIZE to 64k. * g10/keyserver.c (DEFAULT_MAX_CERT_SIZE): Increase from 16k to 64k.
* Re-indentation of keydb.c and error code changes.Werner Koch2011-04-291-2/+2
| | | | | | 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 regression in gpg's mail address parsing.Werner Koch2011-04-251-4/+4
| | | | | | 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.
* Replace printf by es_printf in keyserver.cWerner Koch2011-02-091-27/+24
| | | | This is similar to the change in keylist.c and elsewhere.
* Add finger support to dirmngr.Werner Koch2011-02-081-25/+24
| | | | | | | | | | | | | 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 ;-)
* All standard keyserver commands are now using dirmngr.Werner Koch2011-01-201-687/+61
|
* Keyserver search and get basically works again.Werner Koch2011-01-181-260/+481
|
* Initial code checking for backup - not yet working.Werner Koch2011-01-101-22/+101
|
* Make public key data structure easier to read.Werner Koch2010-10-201-1/+1
| | | | | Check vor v1 card while signing.
* Exporting secret keys via gpg-agent is now basically supported.Werner Koch2010-10-011-49/+63
| | | | | | A couple of forward ported changes. Doc updates.
* Import OpenPGP keys into the agent.Werner Koch2010-08-311-5/+7
|
* More changes on the way to remove secring.gpg.Werner Koch2010-04-211-1/+1
|
* Unification of the search descriptor usage.Werner Koch2009-12-081-18/+23
|
* Try a DNS-SD lookup to find a domain-specific LDAP server beforeDavid Shaw2009-07-231-13/+50
| | | | | resorting to keys.{domain}.
* Add readcert command.Werner Koch2009-06-171-0/+3
| | | | | fix reading large certificates.
* * keyserver.c (keyserver_typemap): gpgkeys_hkp handles hkps as well.David Shaw2009-05-111-2/+4
| | | | | From 1.4.
* Flush keyserver search output.Werner Koch2008-12-091-0/+2
| | | | | | Add trustdb chnages from 1.4. Check algo usage for batch key generation.
* * keyserver.c (keyserver_import_cert): Allow keyserver URLs inDavid Shaw2008-09-041-7/+1
| | | | | addition to full URLs in CERT records.
* Enhanced --auto-key-locate.Werner Koch2008-04-081-9/+20
|
* Minor cleanups.Werner Koch2008-04-071-1/+9
| | | | | Implemented key helper kdns
* Changed the way i18n files are located under Windows. The setting of theWerner Koch2008-03-251-2/+2
| | | | | Registry key is not anymore required. Helpfiles are not properly located.
* Changed to GPLv3.Werner Koch2007-07-041-4/+2
| | | | | Removed intl/.
* A whole bunch of changes to allow building for Windows.Werner Koch2007-06-141-2/+2
| | | | | See the ChangeLogs for details.
* From STABLE-BRANCH-1-4David Shaw2007-03-141-2/+9
| | | | | | | * keyserver.c: Windows Vista doesn't grok X_OK and so fails access() tests. Previous versions interpreted X_OK as F_OK anyway, so we'll just use F_OK directly.
* Fixes for CVE-2006-6235Werner Koch2006-12-061-6/+7
|
* * keyserver.c (keyserver_spawn): Write the 16-digit keyid ratherDavid Shaw2006-10-061-2/+6
| | | | | than whatever key selector the user used on the command line.
* Fix for bug 537Werner Koch2006-10-021-20/+20
|
* Take advantage of newer gpg-error features.Werner Koch2006-09-141-1/+1
|
* With --enable-gpg the keyservers are now build and a first test using gpg2Werner Koch2006-08-161-0/+4
| | | | | shows no prblems. Needs more testing of course.
* g10/ does build again.Werner Koch2006-05-231-3/+6
|
* Merged recent changes from 1.4Werner Koch2006-04-281-35/+29
|
* Still merging 1.4.3 code backWerner Koch2006-04-211-1/+1
|
* Continued with merging.Werner Koch2006-04-191-2/+2
| | | | | Still does not build.
* Merged with gpg 1.4.3 code. Werner Koch2006-04-191-274/+1028
| | | | | The gpg part does not yet build.
* Merged most of David Shaw's changes in 1.3 since 2003-06-03.Werner Koch2003-09-231-4/+5
|
* Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch2003-06-181-46/+48
| | | | | | | | | | | 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.
* This commit was manufactured by cvs2svn to create branchRepo Admin2003-06-051-0/+1378
| | | | 'GNUPG-1-9-BRANCH'.
* This commit was manufactured by cvs2svn to create branchRepo Admin2002-10-191-1264/+0
| | | | 'GNUPG-1-9-BRANCH'.
* * keyserver-internal.h, keyserver.c (print_keyrec, parse_keyrec,David Shaw2002-10-141-204/+392
| | | | | | | | | | show_prompt, keyserver_search_prompt, keyserver_spawn): Go to version 1 of the keyserver protocol. This is a better design, similar to --with-colons, that allows for keys with multiple user IDs rather than using multiple keys. It also matches the machine readable pksd format. Also use a prettier --search-keys listing format that can fill different size windows (currently set at 24 lines).
* * keyserver.c (parse_keyserver_uri): Force the keyserver URI scheme toDavid Shaw2002-09-301-0/+8
| | | | | lowercase to be case-insensitive.
* added fast-import to import-optionsStefan Bellon2002-09-231-1/+1
|