aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* agent: Add some extra robustness to extract_private_keyWerner Koch2015-01-283-4/+13
| | | | | | | | | | | * agent/cvt-openpgp.c (extract_private_key): Add arg "arraysize". Make sure that R_FLAGS and R_CURVE are set to NULL. -- Given that extract_private_key is not file local it is good to have some extra asserts to protect against future wrong use. Signed-off-by: Werner Koch <[email protected]>
* scd: Fix varargs call for 64-bit arch on ECC keys.NIIBE Yutaka2015-01-281-14/+12
| | | | | | | | | | | | | * scd/app-openpgp.c (store_fpr): Remove CARD_VERSION from the arguments. (rsa_writekey): Follow the change. (do_genkey): Likewise. (ecc_writekey): Likewise. Cast to size_t. -- KEYTOCARD caused SEGV of scdaemon on 64-bit arch. That's because int is 32-bit, but size_t is 64-bit.
* gpg: Fix segv introduced to commit 4d7c9b0.Werner Koch2015-01-271-1/+1
| | | | | | * g10/keygen.c (get_parameter_passphrase): Take care of R == NULL. Signed-off-by: Werner Koch <[email protected]>
* agent: Fix agent_public_key_from_file for ECC.NIIBE Yutaka2015-01-273-94/+151
| | | | | | | | | | | | | * agent/cvt-openpgp.c (extract_private_key): New. (convert_to_openpgp): Use extract_private_key. * agent/findkey.c (agent_public_key_from_file): Use extract_private_key. -- This patch add support of ECC key with a curve name and flags. Since same functionality is also needed for convert_to_openpgp, it was factored out into the extract_private_key function.
* sm: Simplify fix ed8383c6Werner Koch2015-01-261-4/+2
| | | | | | | | * sm/minip12.c (p12_build): Release PWBUF only at the end. -- Suggested-by: Eygene Ryabinkin <[email protected]> Signed-off-by: Werner Koch <[email protected]>
* ccid: Remove incorrect expression leading to errors.Joshua Rogers2015-01-251-1/+1
| | | | | | | | | | | | | | * scd/ccid-driver.c (send_escape_cmd): Fix setting of 'rc'. -- Variable 'rc' in send_escape_cmd was overwritten before it was returned, leading to incorrect computation. Signed-off-by: Joshua Rogers <[email protected]> [Log entry reformatted - wk] (cherry picked from commit 3d9f8bf1dc0c7165a5d2a31568ed425d2dc3b91e)
* gpgconf: Fix validity check for UINT32 values.Werner Koch2015-01-231-1/+1
| | | | | | | | | | | | | * tools/gpgconf-comp.c (option_check_validity): Enable check for UINT32. -- Reported-by: Günther Noack <[email protected]> This is actually a bug which inhibited the checking of values of type UINT32. Signed-off-by: Werner Koch <[email protected]>
* gpg,sm: Remove unnecessary duplicated checksWerner Koch2015-01-232-2/+2
| | | | | | -- Reported-by: Günther Noack <[email protected]>
* doc: Fix some typos and add missing options.Werner Koch2015-01-223-14/+26
| | | | | | | | | | | -- GnuPG-bug-id: 1602 I added options shown with --help but missing in the man page. However, --help won't show everything listed in the man age and frankly there are even more options not listed anywhere (to see them use --dump-options).
* gpg: Improve skipping of PGP-2 keys.Werner Koch2015-01-225-11/+61
| | | | | | | | | | | | | | | | | * g10/keydb.c (keydb_search_first, keydb_search_next): Skip legacy keys. * g10/keyring.c (keyring_get_keyblock): Handle GPG_ERR_LEGACY_KEY. (prepare_search): Ditto. (keyring_rebuild_cache): Skip legacy keys. * g10/keyserver.c (keyidlist): Ditto. * g10/trustdb.c (validate_key_list): Ditto. -- This is not the most elegant way to handle it but it reduces the chance for unwanted side effects. GnuPG-bug-id: 1816 Signed-off-by: Werner Koch <[email protected]>
* gpg: Add dedicated error code for PGP-2 keys.Werner Koch2015-01-225-11/+7
| | | | | | | | | | | | * g10/parse-packet.c (parse_key): Return GPG_ERR_LEGACY_KEY for PGP2 keys. * g10/import.c (read_block): Simplify by checking GPG_ERR_LEGACY_KEY. * g10/getkey.c (lookup): Silence error message for PGP-2 keys. * common/util.h (GPG_ERR_LEGACY_KEY): Add replacement for older libgpg-error. Signed-off-by: Werner Koch <[email protected]>
* gpg: Replace remaining old error code macros by GPG_ERR_.Werner Koch2015-01-2232-408/+362
| | | | | | | | | * g10/gpg.h (g10_errstr): Remove macro and change all occurrences by gpg_strerror. (G10ERR_): Remove all macros and change all occurrences by their GPG_ERR_ counterparts. Signed-off-by: Werner Koch <[email protected]>
* gpg: Remove an unused variable.Werner Koch2015-01-222-3/+1
| | | | * g10/getkey.c (getkey_ctx_s): Remove last_rc.
* dirmngr: Fix TLS build problems.Werner Koch2015-01-211-2/+4
| | | | | | | | * dirmngr/Makefile.am (AM_CFLAGS): Add flags for TLS libs. -- This should fix GnuPG-bug-id: 1813.
* gpg: Support --passphrase with --quick-gen-key.Werner Koch2015-01-213-2/+41
| | | | | | | | | * g10/keygen.c: Include shareddefs.h. (quick_generate_keypair): Support static passphrase. (get_parameter_passphrase): New. (do_generate_keypair): Use it. Signed-off-by: Werner Koch <[email protected]>
* gpg: Re-enable the "Passphrase" parameter for batch key generation.Werner Koch2015-01-219-57/+128
| | | | | | | | | | | | | * agent/command.c (cmd_genkey): Add option --inq-passwd. * agent/genkey.c (agent_genkey): Add new arg override_passphrase. * g10/call-agent.c (inq_genkey_parms): Handle NEWPASSWD keyword. (agent_genkey): Add arg optional arg "passphrase". * g10/keygen.c (common_gen, gen_elg, gen_dsa, gen_ecc) (gen_rsa, do_create): Add arg "passphrase" and pass it through. (do_generate_keypair): Make use of pPASSPHRASE. (release_parameter_list): Wipe out a passphrase parameter. Signed-off-by: Werner Koch <[email protected]>
* artwork: Crop and rename the commonly used logo.Werner Koch2015-01-203-126/+138
| | | | --
* kbx: Minor cleanup for the previous fix.Werner Koch2015-01-191-7/+7
| | | | | | | | | | | | | * kbx/keybox-search.c (blob_get_keyid): Rename to blob_get_first_keyid. Check number of keys and remove blob type check. -- There is no need to check the blob type. We already know that it is a key blob type and keyids are used for X.509 and OpenPGP. Also added check for number of keys because the other parser functions do it as well. Signed-off-by: Werner Koch <[email protected]>
* kbx: Call skipfnc callback to filter out keysDamien Goutte-Gattat2015-01-191-3/+30
| | | | | | | | | | | | | * kbx/keybox-search.c (blob_get_keyid): New. (keybox-search): Call skipfnc callback function. -- This patch (tentatively) fixes GnuPG-bug-id: 1794 The keybox_search function in kbx/keybox-search.c currently ignores the skipfnc callback, but the validate_key_list function in g10/trustdb.c uses such a callback to exclude ultimately trusted keys.
* Register DCO for Damien Goutte-Gattat.Werner Koch2015-01-191-0/+3
| | | | --
* scd: Allow for certificates > 1024 with PC/SC.Andreas Schwier2015-01-131-1/+1
| | | | | | | | | | * scd/pcsc-wrapper.c (handle_transmit): Enlarge buffer to 4096 too allow for larger certificates. -- Cherry-pick from 5798673156a66f4c39e1d34e358b03539194d57c. Forward ported from 2.0.
* po: Update the German translation.Werner Koch2015-01-091-2/+5
| | | | | | | -- This also fixes GnuPG-bug-id: 1808
* dirmngr: Fix error code path of map_host.NIIBE Yutaka2015-01-081-3/+8
| | | | | | | | | | | | | | | * dirmngr/ks-engine-hkp.c (map_host): Fix error return. -- In ks-engine-hkp.c on line 509 'reftbl' is freed, but it is then used on line 511. I'm guessing this is a missing return;. Reported-by: Joshua Rogers <[email protected]> Debian-Bug-Id: 773520 Other fixes on error added too.
* scd: fix get_public_key for OpenPGPcard v1.0.Joshua Rogers2015-01-081-1/+1
| | | | | | | | | | | * scd/app-openpgp.c (get_public_key): correctly close 'fp' upon use. -- Inside the get_public_key function, 'fp' was opened using popen, but incorrectly closed using fclose. Debian-Bug-Id: 773474
* dirmngr: fix LDAP query PATTERNS limit check.NIIBE Yutaka2015-01-071-1/+1
| | | | | | | | | | * dirmngr/ldap.c (start_cert_fetch_ldap): fix ARGC limitation. -- Reported-by: Joshua Rogers <[email protected]> Debian-Bug-Id: 773507
* scd: fix merge failure.NIIBE Yutaka2015-01-061-2/+0
| | | | | | | | | * scd/apdu.c (pcsc_pinpad_verify): Remove wrong lines inserted by merge. -- Thanks to Joshua Rogers for reviewing and reporting.
* sm,g13: Init local vars to avoid compiler warnings.Werner Koch2015-01-052-2/+3
| | | | | | | | | | | * sm/misc.c (transform_sigval): Init RSA_S_LEN. * g13/mount.c (read_keyblob): Init HEADERLEN. -- Not a bug but the compiler (gcc 4.9.1) can't detect that it is not used uninitialized. Signed-off-by: Werner Koch <[email protected]>
* gpg: Remove unused args from a function.Werner Koch2015-01-058-18/+13
| | | | | | | * g10/keyserver.c (parse_keyserver_uri): Remove args configname and configlineno. Change all callers. Signed-off-by: Werner Koch <[email protected]>
* gpg: Clear a possible rest of the KDF secret buffer.Werner Koch2015-01-051-1/+1
| | | | | | | | | | * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Fix order of args. -- That bug has been here since the beginning. The entire function needs a review or be be moved to Libgcrypt. Signed-off-by: Werner Koch <[email protected]>
* build: Require automake 1.14.Werner Koch2015-01-052-6/+4
| | | | * configure.ac (AM_INIT_AUTOMAKE): Add serial-tests.
* agent: Make --allow-loopback-pinentry gpgconf changeable.Werner Koch2015-01-042-1/+6
|
* tools: Free variable before returnJoshua Rogers2014-12-221-1/+4
| | | | | | | | * tools/gpgconf-comp.c: Free 'dest_filename' before it is returned upon error. -- Signed-off-by: Joshua Rogers <[email protected]>
* Register DCO for Joshua Rogers.Werner Koch2014-12-221-0/+3
| | | | --
* sm: Avoid double-free on iconv failureDaniel Kahn Gillmor2014-12-221-0/+2
| | | | | | | | | | | | | | * sm/minip12.c: (p12_build) if jnlib_iconv_open fails, avoid double-free of pwbuf. -- Observed by Joshua Rogers <[email protected]>, who proposed a slightly different fix. Debian-Bug-Id: 773472 Added fix at a second place - wk.
* scd: Avoid double-free on error condition in scdDaniel Kahn Gillmor2014-12-221-4/+2
| | | | | | | | | | | | * scd/command.c (cmd_readkey): avoid double-free of cert -- When ksba_cert_new() fails, cert will be double-freed. Debian-Bug-Id: 773471 Original patch changed by wk to do the free only at leave.
* avoid future chance of using uninitialized memoryDaniel Kahn Gillmor2014-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | * common/iobuf.c: (iobuf_open): initialize len -- In iobuf_open, IOBUFCTRL_DESC and IOBUFCTRL_INIT commands are invoked (via file_filter()) on fcx, passing in a pointer to an uninitialized len. With these two commands, file_filter doesn't actually do anything with the value of len, so there's no actual risk of use of uninitialized memory in the code as it stands. However, some static analysis tools might flag this situation with a warning, and initializing the value doesn't hurt anything, so i think this trivial cleanup is warranted. Debian-Bug-Id: 773469
* avoid double-close in unusual dotlock situationsDaniel Kahn Gillmor2014-12-221-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/dotlock.c: (dotlock_create_unix) avoid double-close() in unusual situations. -- close(2) says: close() should not be retried after an EINTR since this may cause a reused descriptor from another thread to be closed. Before this patch was applied, if close(fd) failed with EINTR, it would be closed again in the write_failed: block. It could also have been closed a second time in the case that (use_hardlinks_p (h->tname)) evaluated to something other than 0 or 1. This patch avoids both of those scenarios. Note that close() could still be called twice on the same file descriptor if the first close(fd) fails but errno is not EINTR. I'm not sure the right thing to do in that scenario. An alternate resolution could be to unequivocally set fd to -1 after the first failed close(fd), avoiding the errno == EINTR test. Debian-Bug-Id: 773423
* gpgkey2ssh: clean up varargsDaniel Kahn Gillmor2014-12-221-0/+2
| | | | | | | | | | | | | | * tools/gpgkey2ssh.c (key_to_blob) : ensure that va_end is called. -- stdarg(3) says: Each invocation of va_start() must be matched by a corresponding invocation of va_end() in the same function. Observed by Joshua Rogers <[email protected]> Debian-Bug-Id: 773415
* doc: Fix memory leak in yat2m.Werner Koch2014-12-221-0/+1
| | | | | | | * doc/yat2m.c (write_th): Free NAME. -- Reported-by: Joshua Rogers <[email protected]>
* dirmngr: Fix memory leak.Werner Koch2014-12-222-3/+3
| | | | | | | | | | * dirmngr/server.c (cmd_ks_search, cmd_ks_get): Fix memory leak. * dirmngr/ks-engine-hkp.c (ks_hkp_mark_host): Remove double check. -- Reported-by: Joshua Rogers <[email protected]> Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Remove un-needed check.Werner Koch2014-12-221-1/+4
| | | | | | | | | | | | | | | * dirmngr/crlfetch.c (crl_fetch): Check that URL is not NULL. -- Reported-by: Joshua Rogers <[email protected]> "Remove un-needed check. If 'url' were not to be true, http_parse_uri(parse_uri(do_parse_uri))) would fail, leaving 'err' false." In addition I added an explicit check for the URL arg not beeing NULL. Signed-off-by: Werner Koch <[email protected]>
* dirmngr,gpgsm: Return NULL on failWerner Koch2014-12-222-0/+2
| | | | | | | | | | | | | | | * dirmngr/ldapserver.c (ldapserver_parse_one): Set SERVER to NULL. * sm/gpgsm.c (parse_keyserver_line): Ditto. -- Reported-by: Joshua Rogers <[email protected]> "If something inside the ldapserver_parse_one function failed, 'server' would be freed, then returned, leading to a use-after-free. This code is likely copied from sm/gpgsm.c, which was also susceptible to this bug." Signed-off-by: Werner Koch <[email protected]>
* scd: ECDH Support.NIIBE Yutaka2014-12-222-110/+107
| | | | | | | | | | | | | | | | * agent/divert-scd.c (divert_pkdecrypt): Support ECDH. * scd/app-openpgp.c (get_algo_byte, store_fpr): Support ECDH. (send_key_attr): Support ECDH. Fix EdDSA algorithm value. (retrieve_key_material): Initialize fields. (get_public_key, ecc_writekey, do_writekey): Support ECDH. (ecdh_writekey): Remove. (do_decipher): Support ECDH. (parse_algorithm_attribute): Support ECDH. Fix EdDSA. -- Following the gpg-agent protocol, SCDaemon's counter part is now implemented.
* agent: Make sure --max-cache-ttl is >= --default-cache-ttl.Werner Koch2014-12-192-0/+21
| | | | | | | | | | * agent/gpg-agent.c (finalize_rereadable_options): New. (main, reread_configuration): Call it. -- This change should help to avoid surprising behaviour. Signed-off-by: Werner Koch <[email protected]>
* agent: Keep the session environment for restricted connections.Werner Koch2014-12-195-35/+43
| | | | | | | | | | | | | | | | | * agent/command-ssh.c (setup_ssh_env): Move code to ... * agent/gpg-agent.c (agent_copy_startup_env): .. new function. Change calllers. * agent/command.c (start_command_handler): Call that fucntion for restricted connections. -- A remote connection is and should not be able to setup the local session environment. However, unless --keep-display is used we would be left without an environment and thus pinentry can't be used. The fix is the same as used for ssh-agent connection: We use the default environment as used at the startup of the agent. Signed-off-by: Werner Koch <[email protected]>
* agent: Fix string prepended to remotely initiated prompts.Werner Koch2014-12-191-1/+1
| | | | | | | * agent/command.c (cmd_setkeydesc): Use %0A and not \n. Make translatable. Signed-off-by: Werner Koch <[email protected]>
* build: Remove option to build without agent.Werner Koch2014-12-181-1/+2
| | | | * configure.ac (build-agent): Set to yes.
* gpgconf: Exit with failure if --launch fails.Werner Koch2014-12-173-4/+13
| | | | | | | * tools/gpgconf-comp.c (gc_component_launch): Return an error code. * tools/gpgconf.c (main): Exit if launch failed. -- GnuPG-bug-id: 1791
* po: Update Japanese Translation.NIIBE Yutaka2014-12-171-27/+14
| | | | | | -- Investigated who is P.KATOH, and fixed the header, accordingly.
* Post release updatesWerner Koch2014-12-162-1/+4
| | | | --