aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyserver-internal.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-07-13gpg: Pass key origin values to import functions.Werner Koch1-1/+1
* g10/import.c (import_keys_stream): Remove this unused function. (import_keys_internal): Add arg origin. (import_keys): Ditto. (import_keys_es_stream): Ditto. (import): Ditto. (import_one): Ditto. (apply_meta_data): New stub. (import_secret_one): Pass 0 for ORIGIN. * g10/keyserver.c (keyserver_get_chunk): For now pass 0 for ORIGIN. (keyserver_fetch): Add arg origin. (keyserver_import_cert): Pass KEYORG_DANE for ORIGIN. (keyserver_import_wkd): Pass KEYORG_WKD for ORIGIN. * g10/gpg.c (main): Pass OPT.KEY_ORIGIN to import_keys and keyserver_fetch. * g10/card-util.c (fetch_url): Pass KEYORG_URL for ORIGIN. -- This is just the framework; applying the meta data will be done in another commit. GnuPG-bug-id: 3252 Signed-off-by: Werner Koch <[email protected]>
2017-03-07Remove -I option to common.NIIBE Yutaka1-1/+1
* dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common. * g10/Makefile.am (AM_CPPFLAGS): Ditto. * g13/Makefile.am (AM_CPPFLAGS): Ditto. * kbx/Makefile.am (AM_CPPFLAGS): Ditto. * scd/Makefile.am (AM_CPPFLAGS): Ditto. * sm/Makefile.am (AM_CPPFLAGS): Ditto. * tools/Makefile.am (AM_CPPFLAGS): Ditto. * Throughout: Follow the change. Signed-off-by: NIIBE Yutaka <[email protected]>
2016-11-05Change all http://www.gnu.org in license notices to https://Werner Koch1-1/+1
--
2016-10-27gpg: Convey --quick option to dirmngr for --auto-key-retrieve.Werner Koch1-3/+3
* g10/call-dirmngr.c (gpg_dirmngr_ks_get): Add arg 'quick'. (gpg_dirmngr_wkd_get): Ditto. * g10/keyserver.c (keyserver_get): Add arg 'quick'. (keyserver_get_chunk): Add arg 'quick'. (keyserver_import_fprint): Ditto. Change callers to pass 0 for it. (keyserver_import_keyid): Ditto. (keyserver_import_wkd): Ditto. * g10/mainproc.c (check_sig_and_print): Call the 3 fucntions with QUICK set. -- Note that this option has not yet been implemented by dirmngr. Dirmngr will simply ignore it for now. Signed-off-by: Werner Koch <[email protected]>
2016-04-27gpg: Add experimental AKL method "wkd" and option --with-wkd-hash.Werner Koch1-0/+2
* g10/getkey.c (parse_auto_key_locate): Add method "wkd". (get_pubkey_byname): Implement that method. Also rename a variable. * g10/call-dirmngr.c (gpg_dirmngr_wkd_get): New. * g10/keyserver.c (keyserver_import_wkd): New. * g10/test-stubs.c (keyserver_import_wkd): Add stub. * g10/gpgv.c (keyserver_import_wkd): Ditto. * g10/options.h (opt): Add field 'with_wkd_hash'. (AKL_WKD): New. * g10/gpg.c (oWithWKDHash): New. (opts): Add option --with-wkd-hash. (main): Set that option. * g10/keylist.c (list_keyblock_print): Implement that option. -- The Web Key Directory is an experimental feature to retrieve a key via https. It is similar to OpenPGP DANE but also uses an encryption to reveal less information about a key lookup. For example the URI to lookup the key for [email protected] is: https://example.org/.well-known/openpgpkey/ hu/example.org/iy9q119eutrkn8s1mk4r39qejnbu3n5q (line has been wrapped for rendering purposes). The hash is a z-Base-32 encoded SHA-1 hash of the mail address' local-part. The address [email protected] can be used for testing. Signed-off-by: Werner Koch <[email protected]>
2016-01-21gpg: Make --auto-key-retrieve work with dirmngr configured server.Werner Koch1-0/+1
* g10/call-dirmngr.c (gpg_dirmngr_ks_list): Make R_KEYSERVER optional. * g10/keyserver.c (keyserver_any_configured): New. (keyserver_put): Remove arg keyserver because this will always receive opt.keyserver which is anyway used when connecting dirmngr. Do not check opt.keyserver. (keyserver_import_cert): Replace opt.keyserver by keyserver_any_configured. * g10/mainproc.c (check_sig_and_print): Ditto. * g10/import.c (revocation_present): Ditto. * g10/getkey.c (get_pubkey_byname): Ditto. * g10/gpgv.c (keyserver_any_configured): Add stub. * g10/test-stubs.c (keyserver_any_configured): Add stub. -- The keyserver should be configured in dirmngr.conf and thus we can't use opt.keyserver in gpg to decide whether a keyserver has been configured. GnuPG-bug-id: 2147 Signed-off-by: Werner Koch <[email protected]>
2015-10-06gpg: Add new --auto-key-locate mechanism "dane".Werner Koch1-1/+1
* g10/call-dirmngr.c (gpg_dirmngr_dns_cert): Allow fetching via DANE. * g10/keyserver.c (keyserver_import_cert): Add arg "dane_mode". * g10/options.h (AKL_DANE): New. * g10/getkey.c (get_pubkey_byname): Implement AKL_DANE. (parse_auto_key_locate): Ditto. -- To test this use gpg --auto-key-locate clear,dane,local --locate-key -v [email protected] Signed-off-by: Werner Koch <[email protected]>
2015-10-05gpg: Deprecate the --keyserver option.Werner Koch1-1/+1
* g10/keyserver.c (keyserver_refresh): Change return type to gpg_error_t. Use gpg_dirmngr_ks_list to print the name of the keyserver to use. (keyserver_search): Do not print the "no keyserver" error message. The same error is anyway returned from dirmngr. * g10/call-dirmngr.c (ks_status_parm_s): Add field "keyword". (ks_status_cb): Handle other status keywords. (gpg_dirmngr_ks_list): New. * tools/gpgconf-comp.c (gc_options_gpg): Deprecate "keyserver". (gc_options_dirmngr): Add "Keyserver" group and "keyserver". -- Along with the corresponding dirmngr change this option allows to configure the keyserver only in dirmngr.conf. Existing configurations will continue to work. However, GUIs using gpgconf now the keyserver option under the dirmngr (aka Key Acquirer) tab unless they are in export mode in which the keyserver option is also show for gpg. Signed-off-by: Werner Koch <[email protected]>
2015-04-23gpg: Move all DNS access to Dirmngr.Werner Koch1-2/+2
* common/dns-cert.h: Move to ../dirmngr/. * common/dns-cert.c: Move to ../dirmngr/. Change args to return the key as a buffer. * common/t-dns-cert.c: Move to ../dirmngr/. * common/pka.c, common/pka.h, common/t-pka.c: Remove. * dirmngr/server.c (data_line_cookie_write): Factor code out to data_line_write and make it a wrapper for that. (data_line_write): New. (cmd_dns_cert): New. (register_commands): Register new command. * g10/Makefile.am (LDADD): Remove DNSLIBS. * g10/call-dirmngr.c (dns_cert_parm_s): New. (dns_cert_data_cb, dns_cert_status_cb): New. (gpg_dirmngr_dns_cert): New. (gpg_dirmngr_get_pka): New. * g10/gpgv.c (gpg_dirmngr_get_pka): New dummy function. * g10/keyserver.c (keyserver_import_cert): Replace get_dns_cert by gpg_dirmngr_dns_cert. (keyserver_import_pka): Replace get_pka_info by gpg_dirmngr_get_pka. * g10/mainproc.c: Include call-dirmngr.h. (pka_uri_from_sig): Add CTX arg. Replace get_pka_info by gpg_dirmngr_get_pka. -- With this patch gpg does not do any network access itself but uses dirmngr for that. Note that we need to keep linking to NETLIBS due to the logging code and because we need TCP for our socket emulation under Windows. Probably also required for Solaris etc. Signed-off-by: Werner Koch <[email protected]>
2015-01-05gpg: Remove unused args from a function.Werner Koch1-4/+2
* g10/keyserver.c (parse_keyserver_uri): Remove args configname and configlineno. Change all callers. Signed-off-by: Werner Koch <[email protected]>
2011-01-10Initial code checking for backup - not yet working.Werner Koch1-1/+1
2010-10-01Exporting secret keys via gpg-agent is now basically supported.Werner Koch1-15/+18
A couple of forward ported changes. Doc updates.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2006-10-02Fix for bug 537Werner Koch1-5/+5
2006-08-21Migrated more stuff to doc/Werner Koch1-1/+1
Migrated the gpg regression tests. Some changes tp the gpg code to fix bugs and for the use in testing. make distcheck works now with gpg enabled.
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-6/+39
The gpg part does not yet build.
2006-03-14* keyserver-internal.h, keyserver.c (keyserver_import_pka): Use theDavid Shaw1-1/+1
same API as the other auto-key-locate fetchers. * getkey.c (get_pubkey_byname): Use the fingerprint of the key that we actually fetched. This helps prevent problems where the key that we fetched doesn't have the same name that we used to fetch it. In the case of CERT and PKA, this is an actual security requirement as the URL might point to a key put in by an attacker. By forcing the use of the fingerprint, we won't use the attacker's key here.
2006-03-14* keyserver-internal.h, keyserver.c (keyserver_spawn, keyserver_work,David Shaw1-3/+6
keyserver_import_cert, keyserver_import_name, keyserver_import_ldap): Pass fingerprint info through.
2006-02-24* keydb.h, getkey.c (release_akl), gpg.c (main): AddDavid Shaw1-1/+2
--no-auto-key-locate. * options.h, gpg.c (main): Keep track of each keyserver registered so we can match on them later. * keyserver-internal.h, keyserver.c (cmp_keyserver_spec, keyserver_match), gpgv.c: New. Find a keyserver that matches ours and return its spec. * getkey.c (get_pubkey_byname): Use it here to get the per-keyserver options from an earlier keyserver.
2006-02-23* options.h, keyserver.c (add_canonical_option): New.David Shaw1-1/+2
(parse_keyserver_options): Moved from here. (parse_keyserver_uri): Use it here so each keyserver can have some private options in addition to the main keyserver-options (e.g. per-keyserver auth).
2006-02-22* options.h, keyserver-internal.h, keyserver.c (keyserver_import_name),David Shaw1-1/+1
getkey.c (free_akl, parse_auto_key_locate, get_pubkey_byname): The obvious next step: allow arbitrary keyservers in the auto-key-locate list.
2006-02-21* getkey.c (get_pubkey_byname): Fix minor security problem with PKA whenDavid Shaw1-1/+1
importing at -r time. The URL in the PKA record may point to a key put in by an attacker. Fix is to use the fingerprint from the PKA record as the recipient. This ensures that the PKA record is followed. * keyserver-internal.h, keyserver.c (keyserver_import_pka): Return the fingerprint we requested.
2006-02-21* gpgv.c: Stub keyserver_import_ldap.David Shaw1-0/+1
* keyserver-internal.h, keyserver.c (keyserver_import_ldap): Import using the PGP Universal trick of asking ldap://keys.(maildomain) for the key.
2005-12-23* keyserver.c (keyserver_import_pka): New. Moved fromDavid Shaw1-1/+3
getkey.c:get_pubkey_byname which was getting crowded. * keyserver.c (keyserver_import_cert): Import a key found in DNS via CERT records. Can handle both the PGP (actual key) and IPGP (URL) CERT types. * getkey.c (get_pubkey_byname): Call them both here. * options.h, keyserver.c (parse_keyserver_options): Add "auto-cert-retrieve" option with optional max size argument.
2005-12-23* gpgv.c: Stub.David Shaw1-0/+1
* keyserver-internal.h, keyserver.c (keyserver_spawn, keyserver_work, keygerver_getname): New keyserver_getname function to fetch keys by name. * getkey.c (get_pubkey_byname): Call it here to enable locating keys by full mailbox from a keyserver a la PKA. Try PKA first, though, as it is likely to be faster.
2005-12-07* keyserver.c (keyserver_spawn): Don't print "searching for key 00000000"David Shaw1-0/+1
when fetching a URI. * keyserver-internal.h, keyserver.c (keyserver_fetch): New. Fetch an arbitrary URI using the keyserver helpers. * gpg.c (main): Call it from here for --fetch-keys.
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2004-09-11* card-util.c (fetch_url, card_edit): Use the pubkey URL stored on theDavid Shaw1-1/+2
card to fetch an updated copy. Works with either straight URLs or HKP or LDAP keyservers. * keyserver-internal.h, keyserver.c (keyserver_import_fprint), import.c (revocation_present): Use a keyserver_spec so the caller can pass in whatever keyserver they like.
2004-05-22* mainproc.c (check_sig_and_print): If we're honoring preferredDavid Shaw1-2/+21
keyservers, and auto-key-retrieve is set, try and get a missing key from the preferred keyserver subpacket when we verify the sig. * gpgv.c (parse_preferred_keyserver, free_keyserver_spec): Stubs. * keyserver.c (keyidlist): Use new parse_preferred_keyserver function. (keyserver_work): Use the passed-in keyserver spec rather than the options global one. * keyserver-internal.h, keyserver.c (parse_preferred_keyserver): New function to take a sig and return a split out keyserver_spec. (keyserver_import_keyid): Now takes a keyserver_spec.
2004-05-11* options.h, keyserver-internal.h, keyserver.c (parse_keyserver_uri):David Shaw1-1/+1
Improved URI parser that keeps track of the path information and doesn't modify the input string. (keyserver_spawn): Tell keyserver plugins about the path.
2004-05-08* keyedit.c (keyedit_menu, menu_set_keyserver_url): Allow passingDavid Shaw1-1/+2
preferred keyserver on "keyserver" command line. Sanity check keyserver URL before accepting it. * keyserver-internal.h, g10.c (main), keyserver.c (parse_keyserver_uri): Add an option to require the scheme:// and change all callers. (free_keyserver_spec): Make public.
2004-04-16* main.h, misc.c (optsep, argsplit, optlen, parse_options): Simplify codeDavid Shaw1-1/+1
and properly handle a partial match against an option with an argument. * keyserver-internal.h, keyserver.c (parse_keyserver_options): Use new optsep and argsplit functions.
2004-04-14* options.h, import.c, keyserver-internal.h, g10.c, mainproc.c,David Shaw1-2/+3
keyserver.c (parse_keyserver_uri): Parse keyserver URI into a structure. Cleanup for new "guess my keyserver" functionality, as well as refreshing via a preferred keyserver subpacket.
2003-06-18Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch1-1/+1
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.
2002-10-14* keyserver-internal.h, keyserver.c (print_keyrec, parse_keyrec,David Shaw1-1/+0
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).
2002-06-29Update head to match stable 1.0David Shaw1-0/+22