aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* po: Update German translation.Werner Koch2021-04-201-13/+14
| | | | --
* Support log-file option from common.conf for all daemon.Werner Koch2021-04-204-5/+97
| | | | | | | | | | | | | | | | * agent/gpg-agent.c: Include comopt.h. (main): Read log-file option from common.conf. (reread_configuration): Ditto. * dirmngr/dirmngr.c: Include comopt.h. (main): Read log-file option from common.conf. (reread_configuration): Ditto. * kbx/keyboxd.c: Include comopt.h. (main): Read log-file option from common.conf. (reread_configuration): Ditto. * scd/scdaemon.c: Include comopt.h. (main): Read log-file option from common.conf. Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Fix a diagnostic output.Werner Koch2021-04-202-2/+5
| | | | | | | * tools/gpgconf-comp.c (gc_component_launch): Fix diagnostic. * doc/examples/common.conf: Fix example. Signed-off-by: Werner Koch <[email protected]>
* sm: New command --show-certsWerner Koch2021-04-204-0/+120
| | | | | | | | | | | | | | | * sm/keylist.c (do_show_certs): New. (gpgsm_show_certs): New. * sm/gpgsm.c (aShowCerts): New. (opts): Add --show-certs. (main): Call gpgsm_show_certs. -- I have been using libksba test programs for countless times to look at certificates and I always wanted to add such a feature to gpgsm. This is simply much more convenient. Signed-off-by: Werner Koch <[email protected]>
* build: Fix build problems on macOS for gpgsm tests and gpg-card.Werner Koch2021-04-192-1/+2
| | | | | | | | | * tools/gpg-card.c: Include ctype.h. * sm/Makefile.am (t_common_ldadd): Add LIBICONV. -- GnuPG-bug-id: 5400 Signed-off-by: Werner Koch <[email protected]>
* build: Allow selection of TSS library.Damien Goutte-Gattat via Gnupg-devel2021-04-191-2/+18
| | | | | | | | | | | | | | | | | | | * configure.ac: New option --with-tss to force the use of a specific TSS library. -- While most systems will probably have only one of the two TPM libraries that we support (the IBM TSS or the Intel TSS), it would still be helpful to allow which one to use in the event that both are detected, instead of always using the IBM one. This patch does that by adding a --with-tss=TSS configure-time option, where TSS can be "ibm", "intel", or "autodetect". The default value is "autodetect", which triggers the original behavior (i.e. try to detect both libraries, and prefer the IBM one if both are found). Signed-off-by: Damien Goutte-Gattat <[email protected]>
* gpg: Fix showpref to list AEAD feature.Damien Goutte-Gattat via Gnupg-devel2021-04-191-1/+1
| | | | | | | | | | | * g10/keyedit.c (show_prefs): Show 'AEAD' if flags.aead is set. -- The terse 'pref' command in the key editor correctly shows '[aead]' if the uid->flags.aead is set, but the more verbose 'showpref' command does not, due to an inverted condition check. Signed-off-by: Damien Goutte-Gattat <[email protected]>
* doc: Fix an example in README.ldapWerner Koch2021-04-191-1/+1
| | | | --
* gpg,gpgsm: Move use-keyboxd to the new conf file common.confWerner Koch2021-04-1914-10/+296
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/comopt.c, common/comopt.h: New. * common/Makefile.am: Add them. * g10/gpg.c: Include comopt.h. (main): Also parse common.conf. * sm/gpgsm.c: Include comopt.h. (main): Set a flag for the --no-logfile option. Parse common.conf. * tools/gpgconf-comp.c (known_options_gpg): Remove "use-keyboxd", add pseudo option "use_keyboxd". (known_pseudo_options_gpg): Add pseudo option "use_keyboxd". (known_options_gpgsm): Remove "use-keyboxd". * tests/openpgp/defs.scm (create-gpghome): Create common.conf. * doc/examples/common.conf: New. -- Note that --use-keybox still works but prints a warning. We will eventually remove this option becuase it was marked as an experimental feature anyway. It would be too confusing if gpg and gpgsm use different key storages. Further, other components (e.g. dirmngr or gpg-wks-client) which call gpg or gpgsm need to be aware that the keyboxd is used and pass that option on the command line. Now that common.conf is always read (even if --no-options is used) those tools will work instantly.
* gpg: Lookup a missing public key of the current card via LDAP.Werner Koch2021-04-1611-41/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/getkey.c (get_seckey_default_or_card): Lookup a missing public key from the current card via LDAP. * g10/call-dirmngr.c: Include keyserver-intetnal.h. (gpg_dirmngr_ks_get): Rename arg quick into flags. Take care of the new LDAP flag. * g10/keyserver-internal.h (KEYSERVER_IMPORT_FLAG_QUICK): New. Replace the use of the value 1 for the former quick arg. (KEYSERVER_IMPORT_FLAG_LDAP): New. * g10/keyserver.c (keyserver_get_chunk): Increase the reserved line length. * dirmngr/ks-action.c (ks_action_get): Add arg ldap_only. * dirmngr/server.c (cmd_ks_get): Add option --ldap. -- This change makes it easy to start working with gnupg: Just insert the smartcard or token provided to you and the first time you sign a message the public key associated with the current card will be imported and everything is set without any configuration. This works only with an LDAP directory because it can be expected that the public key has been put into the LDAP during card personalization. Of course an LDAP server needs to be configured; in a Windows AD domain this can be a mere "keyserver ldap:///" in dirmngr.conf. Other configured keyservers are ignored. Requirements for the card driver: The $SIGNKEYID attribute must exists and a query for the KEY-FPR attribute needs to return the OpenPGP fingerprint for that key. This is currently supported for OpenPGP cards and certain PKCS#15 cards. Signed-off-by: Werner Koch <[email protected]>
* scd:p15: Support attribute KEY-FPR.Werner Koch2021-04-162-5/+173
| | | | | | | | | | | | | * scd/app-p15.c: Include openpgpdefs.h. (struct prkdf_object_s): Add fields have_keytime and ecdh_kdf. (read_p15_info): Set ecdh_kdf. (keygrip_from_prkdf): Flag that we have the keytime. (send_keypairinfo): Send the key time only if valid. (send_key_fpr_line): New. (send_key_fpr): New. (do_getattr): Add KEY-FPR. Signed-off-by: Werner Koch <[email protected]>
* common: New module to compute openpgp fingerprintsWerner Koch2021-04-163-0/+304
| | | | | | | | | | * common/openpgp-fpr.c: New. * common/Makefile.am (common_sources): Add it. -- This function is targeted to handle keys on smartcards. Signed-off-by: Werner Koch <[email protected]>
* po: Update Italian Translation.Denis2021-04-151-338/+203
| | | | | | -- GnuPG-bug-id: 5390
* gpg: Do not use self-sigs-only for LDAP keyserver imports.Werner Koch2021-04-135-5/+37
| | | | | | | | | | | | | | * dirmngr/ks-engine-ldap.c (ks_ldap_get): Print a SOURCE status. * g10/options.h (opts): New field expl_import_self_sigs_only. * g10/import.c (parse_import_options): Set it. * g10/keyserver.c (keyserver_get_chunk): Add special options for LDAP. -- I can be assumed that configured LDAP servers are somehow curated and not affected by rogue key signatures as the HKP servers are. Thus we can allow the import of key signature from LDAP keyservers by default. GnuPG-bug-id: 5387
* common: Fix memory leaks.Jakub Jelen2021-04-132-2/+12
| | | | | | | | | | * common/name-value.c (do_nvc_parse): Free NAME. * common/recsel.c (recsel_parse_expr): Release SE_HEAD and EXPR_BUFFER. -- GnuPG-bug-id: 5393 Signed-off-by: Jakub Jelen <[email protected]>
* kbx: Fix memory leak.Jakub Jelen2021-04-131-2/+2
| | | | | | | | | * kbx/keybox-update.c (blob_filecopy): Goto leave instead of return. -- GnuPG-bug-id: 5393 Signed-off-by: Jakub Jelen <[email protected]>
* tools: Fix memory leaks.Jakub Jelen2021-04-131-4/+16
| | | | | | | | | * tools/gpgsplit.c (write_part): Free BLOB on error. -- GnuPG-bug-id: 5393 Signed-off-by: Jakub Jelen <[email protected]>
* scd: Fix memory leaks.Jakub Jelen2021-04-132-1/+5
| | | | | | | | | | * scd/apdu.c (apdu_dev_list_start): Free DL. * scd/app-nks.c (pubkey_from_pk_file): Fix typo in condition. -- GnuPG-bug-id: 5393 Signed-off-by: Jakub Jelen <[email protected]>
* agent,kbx: Add LIBASSUAN_CLFAGS.Jakub Jelen2021-04-132-2/+4
| | | | | | | | | | | | * agent/Makefile.am (gpg_preset_passphrase_CFLAGS, t_protect_CFLAGS): Add LIBASSUAN_CFLAGS. * kbx/Makefile.am (libkeybox_a_CFLAGS, libkeybox509_a_CFLAGS): Likewise. -- GnuPG-bug-id: 5389 Signed-off-by: Jakub Jelen <[email protected]>
* gpg: Minor restructuring of a function.Werner Koch2021-04-122-32/+41
| | | | | | -- This is for easier reading and future changing.
* scd:p15: Match private keys with certificates also by labels.Werner Koch2021-04-121-28/+59
| | | | | | | | | | | | | | * scd/app-p15.c (cdf_object_from_label): New. (cdf_object_from_certid): Fallback to label matching. (read_p15_info): Ditto. (keygrip_from_prkdf): Ditto. Replace duplicated code by a call to cdf_object_from_objid. -- In case there is no certificate for a private key we now also try to find a certificate using a matching label. Signed-off-by: Werner Koch <[email protected]>
* doc: Register DCO for Jakub Jelen.NIIBE Yutaka2021-04-121-0/+3
| | | | --
* build: Change version tag also in getswdb.shWerner Koch2021-04-092-3/+3
| | | | --
* scd:nks: Handle APP_READKEY_FLAG_INFO.Werner Koch2021-04-081-62/+117
| | | | | | | | | | | | | | * scd/app-nks.c (keygripstr_from_pk_file): Fix ignored error. (get_nks_tag): New. (do_learn_status_core): Use it. Make sure not to mange the KEYPAIRINFO line if no usage is known. (do_readkey): Output the KEYPAIRINFO for the keygrip case. -- Note that this only handles the most common case of providing a keygrip. $AUTHKEYID and ODLM are not yet supported. Signed-off-by: Werner Koch <[email protected]>
* scd: Fix duplicate output of KEYPAIRINFO by readkey command.Werner Koch2021-04-082-12/+14
| | | | | | | | | | | | | * scd/app-help.c (app_help_get_keygrip_string_pk): Make HEXKEYGRIP parm optional. * scd/command.c (do_readkey): Remove duplicate output of keypairinfo lines. -- Note that this change needs a fix in app-p15 which does not yet handle the APP_READKEY_FLAG_INFO. Signed-off-by: Werner Koch <[email protected]>
* gpg: Ed448 and X448 are only for v5.NIIBE Yutaka2021-04-081-3/+23
| | | | | | | | | * g10/keygen.c (parse_key_parameter_part): Generate with version 5 packet, when it's Ed448 or X448. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* scd: Fix CCID driver for SCM SPR332/SPR532.NIIBE Yutaka2021-04-081-1/+13
| | | | | | | | | | | * scd/ccid-driver.c (ccid_vendor_specific_pinpad_setup): New. (ccid_vendor_specific_setup): Only send CLEAR_HALT. (ccid_transceive_secure): Each time, use send_escape_cmd. -- GnuPG-bug-id: 5297 Signed-off-by: NIIBE Yutaka <[email protected]>
* common: Fix gnupg_wait_processes, by skipping invalid PID.NIIBE Yutaka2021-04-081-1/+6
| | | | | | | | * common/exechelp-posix.c (gnupg_wait_processes): Skip invalid PID. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* po: Update Japanese Translation.NIIBE Yutaka2021-04-081-22/+18
| | | | | | -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Post release updatesWerner Koch2021-04-0728-514/+1718
| | | | --
* Release GnuPG 2.3.0gnupg-2.3.0Werner Koch2021-04-074-15/+13
|
* doc: Add some error locations to DETAILS.Werner Koch2021-04-061-0/+18
| | | | | | | -- This should actually be enhanced to describe all error locations as known by GPGME.
* gpgconf: Return a new pseudo option compliance_de_vs.Werner Koch2021-04-012-2/+14
| | | | | | | | | | | | | * tools/gpgconf-comp.c (known_pseudo_options_gpg): Add "compliance_de_vs". * g10/gpg.c (gpgconf_list): Returh that pseudo option. -- Of course this will always return false for this version of gnupg. But as soon as this version has been approved we have everything ready for a runtime check. Signed-off-by: Werner Koch <[email protected]>
* common: Make the compliance check more robust.Werner Koch2021-04-011-16/+58
| | | | | | | | | | | | | * common/compliance.c (get_compliance_cache): New. (gnupg_rng_is_compliant): Use per mode cache. (gnupg_gcrypt_is_compliant): Ditto. -- This addresses the problem tha the check might be called with different compliance values and thus it should return the corresponding cached result. Signed-off-by: Werner Koch <[email protected]>
* card: New flag --reread for LIST.Werner Koch2021-04-013-11/+16
| | | | | | | | | | * tools/gpg-card.c (cmd_list): Add flag --reread. * tools/card-call-scd.c (scd_learn): New arg reread. * tools/card-call-scd.c (release_card_info): Fix releasing of the new label var. Signed-off-by: Werner Koch <[email protected]>
* scd: New flag --reread for LEARNWerner Koch2021-04-013-39/+101
| | | | | | | | | | | * scd/command.c (cmd_learn): Add flag --reread. * scd/app-common.h (struct app_ctx_s): New field need_reset. * scd/app.c (write_learn_status_core): Set need_reset if we notice an error after returning from a reread. Change all callers of card functions to return GPG_ERR_CARD_RESET so that that app is not anymore used. Signed-off-by: Werner Koch <[email protected]>
* scd:p15: New flag APP_LEARN_FLAG_REREAD.Werner Koch2021-04-012-27/+73
| | | | | | | | | | | | | | | | * scd/app-p15.c (do_deinit): Factor code out to ... (release_lists, release_tokeninfo): new. (read_ef_tokeninfo): Reset all data before reading. (read_p15_info): Ditto. (do_learn_status): Implement reread flag. -- Objects of a card may be protected by a PIN and thus only readble after a verify command. This new flag makes it possible to gather the entire PKCS#15 card info again without a need for a reset (and thus loss of the verify status). Signed-off-by: Werner Koch <[email protected]>
* scd: Replace all assert macros by the log_assert macro.Werner Koch2021-03-319-44/+35
| | | | Signed-off-by: Werner Koch <[email protected]>
* build: Require automake 1.16.3Werner Koch2021-03-311-1/+1
| | | | | | | | | | * configure.ac (min_automake_version): Bump to 1.16.3 -- This version has the now needed support for - new variable AM_DISTCHECK_DVI_TARGET, to allow overriding the "make dvi" that is done as part of distcheck.
* build: Update gpg-error.m4.NIIBE Yutaka2021-03-311-3/+4
| | | | | | | | * m4/gpg-error.m4: Update from libgpg-error. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* card: Print the key's label if available.Werner Koch2021-03-303-8/+60
| | | | | | | | | | | | | | * tools/gpg-card.h (struct key_info_s): Add field 'label'. * tools/card-call-scd.c (learn_status_cb): Parse KEY-LABEL. (scd_learn): Always request KEY-LABEL. * tools/gpg-card.c (nullnone): New. (list_one_kinfo, list_card): Use it. Print the label. -- PKCS#15 defines label which help to understand for what a key is intended. Print them. Signed-off-by: Werner Koch <[email protected]>
* scd:p15: Return labels for keys and certificates.Werner Koch2021-03-303-7/+71
| | | | | | | * scd/app-p15.c (send_certinfo): Extend certinfo. (do_getattr): Support KEY-LABEL. Signed-off-by: Werner Koch <[email protected]>
* scd:p15: For CardOS make use of ISO7816_VERIFY_NOT_NEEDED.Werner Koch2021-03-301-11/+17
| | | | | | * scd/app-p15.c (verify_pin): Take care of verify status. Signed-off-by: Werner Koch <[email protected]>
* scd:p15: Return the creation time of the keys.Werner Koch2021-03-302-0/+39
| | | | | | | | * scd/app-p15.c (struct prkdf_object_s): Add keytime and keyalgostr. (keygrip_from_prkdf): Set them. (send_keypairinfo): Extend KEYPAIRINFO. Signed-off-by: Werner Koch <[email protected]>
* build: Fix for make distcheck, no EPS support.NIIBE Yutaka2021-03-302-7/+2
| | | | | | | | * Makefile.am (AM_DISTCHECK_DVI_TARGET): Specify 'pdf'. * doc/Makefile.am (EXTRA_DIST, BUILT_SOURCES): Remove EPS files. (gnupg.dvi): Remove. Signed-off-by: NIIBE Yutaka <[email protected]>
* scd:p15: Make RSA with SHA512 work with CardOS.Werner Koch2021-03-291-121/+117
| | | | | | | | | | | | | * scd/app-p15.c (do_sign): Rewrite. -- This basically works now but for my test card I need to pass --cert-digest-algo-512 manually. Need to check this again and automate it. It will also be useful to take the NotBefore timestamp from the dummy X.509 certificate and use that for the PGP key creation time. Signed-off-by: Werner Koch <[email protected]>
* agent: Skip unknown unknown ssh curves seen on cards.Werner Koch2021-03-291-6/+16
| | | | | | | | | | | | | * agent/command-ssh.c (ssh_handler_request_identities): Skip unknown curves. -- For example when using my standard ed25519 token and testing cards with only Brainpool support, the ssh-agent failed due to the unknown curves seen on the card. This patches fixes this by ignoring keys with unknown curves. Signed-off-by: Werner Koch <[email protected]>
* scd:p15: Support ECDSA and ECDH for CardOS.Werner Koch2021-03-294-102/+378
| | | | | | | | | | | | | | | | | | | | | | | | | | | * scd/iso7816.c (iso7816_pso_csv): New. * scd/app-help.c (app_help_pubkey_from_cert): Uncompress a point if needed. * scd/app-p15.c (CARD_PRODUCT_RSCS): New. (struct prkdf_object_s): Add fields is_ecc, token_label, and tokenflags. (do_deinit): Free new fields. (cardproduct2str): New. (read_ef_prkdf): Set new is_ecc flag. (read_ef_tokeninfo): Store some data and move Tokeninfo diags to ... (read_p15_info): here. set the product info here after all data has been gathered. (send_keypairinfo): Chnage the way the gpgusage flags are used. (make_pin_prompt): If the token has a label and the current cert has no CN, show the label as holder info. (do_sign): Support ECDSA. Take care of the gpgusage flags. (do_decipher): Support ECDH. Take care of the gpgusage flags. -- This has been tested with Trusted Object Manager generated cards by Rohde & Schwarz Cybersecurity. Signed-off-by: Werner Koch <[email protected]>
* gpg: Allow ECDH with a smartcard returning just the x-ccordinate.Werner Koch2021-03-291-7/+16
| | | | | * g10/ecdh.c (extract_secret_x): Add extra safety check. Allow for x-only coordinate.
* gpgconf: Do not i18n an empty string to the PO files meta data.Werner Koch2021-03-281-0/+3
| | | | | | | * tools/gpgconf-comp.c (my_dgettext): Ignore empty strings. -- GnuPG-bug-id: 5363