| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
* common/sysutils.c (gnupg_chdir): New.
* common/homedir.c (gnupg_daemon_rootdir): New.
* agent/gpg-agent.c (main): Use these functions instead chdir("/").
* dirmngr/dirmngr.c (main): Ditto.
* scd/scdaemon.c (main): Ditto.
--
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
| |
--
This reverts commit 78ebc62604d77600b9865950610717d28c6027a2.
Gnupg-bug-id: 2670
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/import.c (update_key_origin): New.
(merge_blocks): Add arg curtime.
(import_one): Pass curtime to merge_blocks. Call update_key_origin.
--
We probably need to refine the rules on how this is done. But it is a
start.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/import.c (apply_meta_data): Rename to ...
(insert_key_origin): this. Factor code out to ...
(insert_key_origin_pk, insert_key_origin_uid): new funcs.
(import_one): Move insert_key_origin behind clean_key.
(merge_blocks): Add args options, origin, and url.
(append_uid): Rename to ...
(append_new_uid): this. Add args options, curtime, origin, and url.
Call insert_key_origin_uid for new UIDs.
--
This is a straightforward change to handle new user ids.
How to test:
With an empty keyring run
gpg --with-key-origin --locate-key \
--auto-key-locate clear,nodefault,wkd [email protected]
and then append a new keyid using
gpg --with-key-origin --locate-key \
--auto-key-locate clear,nodefault,wkd [email protected]
Works with my current key 80615870F5BAD690333686D0F2AD85AC1E42B367.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
| |
* dirmngr/dns.c: Add /* FALL THROUGH */ to clarify.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
| |
--
This results in more standrard man pages.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/getkey.c (parse_key_origin): Parse appended URL.
* g10/options.h (struct opt): Add field 'key_origin_url'.
* g10/gpg.c (main) <aImport>: Pass that option to import_keys.
* g10/import.c (apply_meta_data): Extend for file and url.
* g10/keyserver.c (keyserver_fetch): Pass the url to
import_keys_es_stream.
--
Example:
gpg --key-origin url,myscheme://bla --import FILE
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
| |
* g10/keyserver.c (keyserver_get_chunk): Use KEYORG_KS if request was
done by fingerprint.
* g10/import.c (apply_meta_data): Implement that.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/import.c (apply_meta_data): Remove arg 'merge'. Add arg 'url'.
Implement WKD and DANE key origin.
(import_keys_internal): Add arg 'url' and change all callers.
(import_keys_es_stream): Ditto.
(import): Ditto.
(import_one): Ditto.
* g10/keylist.c (list_keyblock_print): Fix update URL printing.
* g10/call-dirmngr.c (gpg_dirmngr_wkd_get): Add arg 'r_url' to return
the SOURCE. Pass ks_status_cb to assuan_transact.
* g10/keyserver.c (keyserver_import_wkd): Get that URL and pass it to
the import function.
--
Note that this only for new keys. Merging this info will be added
soon.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/keyserver.c (keyserver_import_cert): Use an import filter in
DANE mode.
--
We only want to see the user ids requested via DANE and not any
additional ids. This filter enables this in the same way we do this
in WKD.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dirmngr/server.c (cmd_wkd_get): Print a SOURCE status.
--
This status allows to see whether the the WKD requests has been
resolved from the standard address or from a SRV record derived one.
We return only host and port and not the .well-known suffix because
that is obvious. HTTP redirects are not taken in account because they
may chnage at any time due to load balancing etc and not relevant for
gpg which may use the URL to detect changes in the WKD results.
For example my current setup returns
S SOURCE https://wkd.gnupg.org
for [email protected]. Without a SRV record
S SOURCE https://gnupg.org
would have been returned.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
| |
* dirmngr/server.c (dirmngr_status_printf): New.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
| |
* call-agent.h (agent_import_key): Add keyid parameters.
* call-agent.c (agent_import_key): Set keyid parameters.
* import.c (transfer_secret_keys): Pass keyid parameters.
Signed-off-by: Marcus Brinkmann <[email protected]>
GnuPG-bug-id: 2667
|
|
|
|
|
|
|
|
|
|
|
|
| |
* agent/gpg-agent.c [HAVE_W32_SYSTEM]: Include <direct.h>.
(main) [HAVE_W32_SYSTEM]: Change working directory to \.
* dirmngr/dirmngr.c [HAVE_W32_SYSTEM]: Include <direct.h>.
(main) [HAVE_W32_SYSTEM]: Change working directory to \.
* scd/scdaemon.c [HAVE_W32_SYSTEM]: Include <direct.h>.
(main) [HAVE_W32_SYSTEM]: Change working directory to \.
Signed-off-by: Marcus Brinkmann <[email protected]>
GnuPG-bug-id: 2670
|
|
|
|
|
|
|
|
|
| |
* call-agent.h (agent_export_key): Add keyid parameters.
* call-agent.c (agent_export_key): Set keyid parameters.
* export.c (receive_seckey_from_agent): Pass keyid parameters.
Signed-off-by: Marcus Brinkmann <[email protected]>
GnuPG-bug-id: 2667
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--
dev.gnupg org is the development platform but the canonical bug
address is and has always been bugs.gnupg.org. We should keep on
using this address for the case that we switch the tracker again or
split it off the development system.
That is also the reason why we should keep on communicating a plain
bug number without the 'T' prefix.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
| |
* scd/app-openpgp.c (data_objects): Use unsigned ints.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
| |
* dirmngr/http.c (send_request): Care the case of !USE_TLS.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
| |
* dirmngr/http.c (http_verify_server_credentials): Duplicated const.
* dirmngr/ldap.c (parse_one_pattern): Add comment.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
| |
* dirmngr/http.c (connect_with_timeout): Use FD2INT.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
| |
* agent/command-ssh.c (serve_mmapped_ssh_request): Add const
qualifier.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
| |
* g10/mainproc.c (proc_encrypted): If error code is GPG_ERR_CIPHER_ALGO,
assume the symmetric passphrase was wrong and invalidate the cache.
Signed-off-by: Marcus Brinkmann <[email protected]>
GnuPG-bug-id: 2270
|
|
|
|
|
|
|
|
|
| |
* g10/keyedit.c (keyedit_quick_set_expire): Add new arg subkeyfprs.
(menu_expire): Rename arg force_mainkey to unattended and allow
unattended changing of subkey expiration.
* g10/gpg.c (main): Extend --quick-set-expire.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/free-packet.c (copy_public_key): Copy fields serialno and
updateurl.
--
The PK->serialno is used to get the version of the card to decide
whether it does support other algorithms than SHA-1. This value is
cached but no deep copy was done when calling copy_public_key.
Bug detected by importing some public keys and then importing a secret
key which led to a double free.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
| |
* g10/import.c: Use the extistin macros for better readability.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
| |
* g10/import.c (import_one): If option import-clean is set,
also clean on initial import, not only for merge.
Signed-off-by: Marcus Brinkmann <[email protected]>
GnuPG-bug-id: 2401
|
|
|
|
|
|
|
| |
* scd/ccid-driver.c (intr_cb): Only kick the loop for removal.
(bulk_in): Don't set POWERED_OFF when interrupt transfer is enabled.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/card-util.c (MAX_GET_DATA_FROM_FILE): New.
(get_data_from_file): Use MAX_GET_DATA_FROM_FILE.
(change_url, change_login, change_private_do): Don't limit.
--
V3.3 card support longer data for URL, Login and Private DOs.
It's scdaemon which knows that.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
| |
* scd/app-openpgp.c (show_caps): Output more messages.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
| |
* doc/gpg.texi: Clarify wording of export-attributes.
Signed-off-by: Marcus Brinkmann <[email protected]>
GnuPG-bug-id: 2228
|
|
|
|
|
|
| |
--
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/getkey.c (parse_key_origin): Factor list out as ...
(key_origin_list): new struct.
(key_origin_string): New.
* g10/gpg.c (oWithKeyOrigin): New const.
(opts): New option --with-key-origin.
(main): Implement option.
* g10/options.h (struct opt): New flag with_key_origin.
* g10/keylist.c (list_keyblock_print): Print key origin info.
(list_keyblock_colon): Ditto.
|
|
|
|
|
|
|
|
|
| |
* common/miscellaneous.c (print_utf8_string): New.
--
This is a simple convenience function.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
| |
--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/keydb.h (MK_DATESTR_SIZE): New.
* g10/keyid.c (mk_datestr): Make public. Add arg bufsize and use
snprintf. Change arg atime to u32.
(datestr_from_pk): Simplify.
(datestr_from_sig): Ditto.
(expirestr_from_pk): Ditto.
(expirestr_from_sig): Ditto.
(revokestr_from_pk): Ditto.
--
Note that this also reduces the size of the static buffers from 16 to
11 which is sufficient for the string. In the past we added the 5
extra bytes to cope for bugs in gmtime which is now handles by
snprintf.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
| |
* g10/getkey.c (lookup): Return immediately on any other error than
GPG_ERR_NO_SECKEY from agent_probe_any_secret_key.
Signed-off-by: Marcus Brinkmann <[email protected]>
GnuPG-bug-id: 2204
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* scd/app-openpgp.c (data_objects): Special DOs like "Login Data",
"URL", "Private DO N" can be longer size >= 256.
(struct app_local_s): Define bits for v3 card.
(get_cached_data): Use extcap.max_special_do for special DOs.
(app_select_openpgp): Detect if extcap_v3, kdf_do, and other bits.
--
GnuPG-bug-id: 3262
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
| |
* common/logging.c (set_file_fd): Don't close es_stderr.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
| |
* dirmngr/dns.c (HAVE_STATIC_ASSERT, HAVE___ATOMIC_FETCH_ADD)
(DNS_HAVE_SOCKADDR_UN, HAVE_SOCK_NONBLOCK): Don't use defined
to be expanded for expression evaluation.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
* dirmngr/ks-engine-hkp.c (send_request): Forbid redirects from .onion
to clearnet URIs.
* dirmngr/ks-engine-http.c (ks_http_fetch): Likewise.
--
This protects users from misconfigured .onion services.
GnuPG-bug-id: 3087
Signed-off-by: Justus Winter <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* g10/mainproc.c (check_sig_and_print): Track key server request via
fingerprint.
--
New signatures carry the fingerprint and thus --auto-key-retrieve tries
to lookup the key by fingerprint. If that failed it used to also ask
the same thing by KEYID - but the keyid is part of the fingerprint and
thus it will either get no response or the wrong key back. We can
easily avoid this.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
| |
* dirmngr/http.c (send_request): If a http proxy is to be used, and we
want to use TLS, try to use the CONNECT method to get a connection to
the target server.
GnuPG-bug-id: 2940
Signed-off-by: Justus Winter <[email protected]>
|
|
|
|
|
|
| |
* dirmngr/http.c (parse_response): Log http response in debug mode.
Signed-off-by: Justus Winter <[email protected]>
|
|
|
|
|
|
|
| |
* dirmngr/http.c (http_wait_response): Get the 'use_tls' flag from the
write cookie, not from the URI.
Signed-off-by: Justus Winter <[email protected]>
|
|
|
|
|
|
|
| |
* dirmngr/http.c (send_request): Do not use the 'srvtag' intended for
the target host to connect to the http proxy.
Signed-off-by: Justus Winter <[email protected]>
|
|
|
|
|
|
| |
* dirmngr/http.c (send_request): We do not support socks4.
Signed-off-by: Justus Winter <[email protected]>
|
|
|
|
|
|
|
| |
* tools/gpgconf-comp.c (gc_backend, gc_arg_type, gc_level, gc_flag)
(gc_component): Add const qualifier.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
| |
* agent/gpg-agent.c, agent/preset-passphrase.c,
dirmngr/dirmngr-client.c, dirmngr/dirmngr_ldap.c, kbx/kbxutil.c,
tools/gpg-check-pattern.c, tools/gpgconf.c, tools/gpgsplit.c,
tools/symcryptrun.c: Use ARGPARSE_end.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* argparse.h (ARGPARSE_SHORTOPT_HELP, ARGPARSE_SHORTOPT_VERSION,
ARGPARSE_SHORTOPT_WARRANTY, ARGPARSE_SHORTOPT_DUMP_OPTIONS): New
macros.
(ARGPARSE_end): Add some placeholders for standard options.
* argparse.c (arg_parse): Fill in missing standard options so
default machinery works. Check for standard options in new way.
Do not write out standard options for --dump-options.
Signed-off-by: Marcus Brinkmann <[email protected]>
GnuPG-bug-id: 1747
|
|
|
|
|
|
|
| |
* tests/gpgscm/main.c (path_absolute_p): New function.
(load): Use new function.
Signed-off-by: Justus Winter <[email protected]>
|