summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tests: Add missing file.Werner Koch2016-04-041-0/+1
| | | | | | | * tests/openpgp/Makefile.am (TEST_FILES): Add plain-largeo.asc. -- Fixes-commit: 785a7f463ec4e937304ce1263c5e6a46e8079137
* g10: Support armored keyrings in gpgv.Justus Winter2016-04-046-10/+137
| | | | | | | | | | | | | * doc/gpgv.texi: Document the feature. * g10/Makefile.am (gpgv2_SOURCES): Add dearmor.c. * g10/dearmor.c (dearmor_file): Add sink argument. * g10/gpg.c (main): Adapt accordingly. * g10/gpgv.c (make_temp_dir): New function. (main): De-armor keyrings. * g10/main.h (dearmor_file): Adapt prototype. GnuPG-bug-id: 2290 Signed-off-by: Justus Winter <justus@g10code.com>
* tests: Fix default key test.Justus Winter2016-04-041-2/+2
| | | | | | | * tests/openpgp/default-key.test: Avoid using the option '--trust-model' unconditionally. Signed-off-by: Justus Winter <justus@g10code.com>
* po: Fix misleading german translation.Justus Winter2016-04-011-2/+1
| | | | | | -- GnuPG-bug-id: 2239 Signed-off-by: Justus Winter <justus@g10code.com>
* build: Check for conflicting trust model options.Justus Winter2016-04-011-1/+4
| | | | | | | * configure.ac: Disable TOFU if configured without trust models, and check for conflicting options. Signed-off-by: Justus Winter <justus@g10code.com>
* g10: Remove option --always-trust if compiled without trust models.Justus Winter2016-04-011-0/+2
| | | | | | | * g10/gpg.c (opts): Remove option --always-trust if compiled without trust models. Signed-off-by: Justus Winter <justus@g10code.com>
* speedo,w32: Build libsqlite3.Justus Winter2016-03-311-1/+3
| | | | | | | | * build-aux/speedo.mk (speedo_spkgs): Add libsqlite3 on w32. (libsqlite3_ver): New variable. (speedo_pkg_libsqlite3_tar): Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
* g10: Use gpg-error abstraction of sched_yield.Justus Winter2016-03-311-2/+1
| | | | | | * g10/tofu.c (begin_transaction): Use 'gpgrt_yield'. Signed-off-by: Justus Winter <justus@g10code.com>
* gpg: Fix NULL-segv for missing tofu DB.Werner Koch2016-03-291-1/+2
| | | | | | | | | | | * g10/tofu.c (opendb): Guard call to timeout function. -- GnuPG-bug-id: 2294 Fix not tested but is pretty obvious. Signed-off-by: Werner Koch <wk@gnupg.org>
* gpg: Improve message when asking for key capabilities.Werner Koch2016-03-221-5/+7
| | | | | | | | | | | | * g10/keygen.c (ask_key_flags): Improve message. -- Because the curve is only selected after the capabilities are queried we do not know whether ECDSA or EdDSA will eventually be used. When printing the possible capabilities we now use print "ECDSA/EdDSA" for the algorithm. Signed-off-by: Werner Koch <wk@gnupg.org>
* gpg: Remove the extra prompt for Curve25519.Werner Koch2016-03-221-34/+30
| | | | | | | | | | | | | | * g10/keygen.c (MY_USE_ECDSADH): New macro local to ask_curve. (ask_curve): Use a fixed table of curve names and reserve a slot for Curve448. Simplify CurveNNNN/EdNNNN switching. (ask_curve): Remove the Curve25519 is non-standard prompt. -- Given that ECC generation is only available in export mode and that gpg will in any case support our current ed2559/cv25519 definition the extra prompt does not make anymore sense. Signed-off-by: Werner Koch <wk@gnupg.org>
* gpg: Silence trustdb computation with --quiet.Werner Koch2016-03-191-8/+11
| | | | | | | * g10/trustdb.c (validate_keys): Do not print log_info stuff in quiet mode. Signed-off-by: Werner Koch <wk@gnupg.org>
* sm: Always create a keybox header when creating a new keybox.Werner Koch2016-03-171-0/+12
| | | | | | | | | | | | | * sm/keydb.c (maybe_create_keybox): Create the header blob. -- This is required so that g10/keydb.c can properly detect that a keybox file is actually there. Just writing a 0 zero length keybox file is not sufficient because a file with that name may also be an old-style OpenPGP keyring. GnuPG-bug-id: 2275 Signed-off-by: Werner Koch <wk@gnupg.org>
* doc: Improve documentation of --enable-large-rsa.Neal H. Walfield2016-03-171-4/+6
| | | | | | | | * doc/gpg.texi (--enable-large-rsa): Improve text. -- Signed-off-by: Neal H. Walfield <neal@g10code.com> Suggested-by: Bernhard Reiter <bernhard@intevation.de>
* agent: allow removal of the shadowed key.NIIBE Yutaka2016-03-171-1/+1
| | | | | | | | * agent/findkey.c (agent_delete_key): Remove the key when asked. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* g10: Add const qualifier.NIIBE Yutaka2016-03-161-2/+2
| | | | | | | | * g10/gpgcompose.c (show_help): Those are strings not to be modified. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* gpg: Do not rely on a certain evaluation order.Werner Koch2016-03-151-1/+5
| | | | | | | | | * g10/keyedit.c (print_and_check_one_sig): Call check_key_signature before derefing IS_SELFSIG. -- Fixes-commit: 5fbd80579aea0f75ca1d2700515c5b8747a75c7d Signed-off-by: Werner Koch <wk@gnupg.org>
* scd: Add manufacturer id 0x000aWerner Koch2016-03-141-0/+1
| | | | | | * g10/card-util.c (get_manufacturer): Add it. Signed-off-by: Werner Koch <wk@gnupg.org>
* g10: Silence message if --quiet is given.Kevin J. McCarthy2016-03-101-1/+1
| | | | | | | * g10/getkey.c (parse_def_secret_key): Silence message if --quiet is given. Signed-off-by: Justus Winter <justus@g10code.com>
* gpg: Add a new test.Neal H. Walfield2016-03-083-2/+616
| | | | | | | | | | | | | * g10/Makefile.am (EXTRA_DIST): Add t-stutter-data.asc. (module_tests): Add t-stutter. (t_stutter_SOURCES): New variable. (t_stutter_LDADD): New variable. -- Signed-off-by: Neal H. Walfield <neal@g10code.com> Add a test to check that the Mister and Zuccerato attack described in "An Attack on CFB Mode Encryption As Used by OpenPGP" works.
* sm: Implement pinentry loopback and reading passphrases from fd.Justus Winter2016-03-077-20/+237
| | | | | | | | | | | | | | | | | | * doc/gpgsm.texi: Document '--pinentry-mode' and '--passphrase-fd'. * sm/Makefile.am (gpgsm_SOURCES): Add new files * sm/call-agent.c (struct default_inq_parm_s): New definition. (start_agent): Pass in the pinentry mode. (default_inq_cb): Handle 'PASSPHRASE' and 'NEW_PASSPHRASE' inquiries. Adapt all call sites to the new callback cookie. * sm/gpgsm.c (cmd_and_opt_values): Add new values. (opts): Add new options. (main): Handle new options. * sm/gpgsm.h (struct opt): Add field 'pinentry_mode'. * sm/passphrase.c: New file. * sm/passphrase.h: Likewise. GnuPG-bug-id: 1970 Signed-off-by: Justus Winter <justus@g10code.com>
* sm: Remove unused argument '--fixed-passphrase'.Justus Winter2016-03-073-10/+0
| | | | | | | | | | * doc/gpgsm.texi: Drop description. * sm/gpgsm.c (cmd_and_opt_values): Drop enum value. (opts): Drop argument. (main): Drop argument handling. * sm/gpgsm.h (struct opt): Drop field 'fixed_passphrase'. Signed-off-by: Justus Winter <justus@g10code.com>
* kbx: Avoid undefined behavior.Justus Winter2016-03-071-1/+1
| | | | | | | * kbx/keybox-file.c (_keybox_read_blob2): Cast to unsigned int before shifting. Signed-off-by: Justus Winter <justus@g10code.com>
* scd: Bug fix for a device with multiple interfaces.NIIBE Yutaka2016-03-071-2/+3
| | | | | | | | * scd/ccid-driver.c (scan_or_find_usb_device): Use IFC_NO when accessing interface information. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* build: Make libusb a hard requirement if the ccid driver is requested.Justus Winter2016-03-041-3/+16
| | | | | | | * configure.ac: Print an error message and die if the internal ccid driver is requested but no suitable libusb is found. Signed-off-by: Justus Winter <justus@g10code.com>
* g10: Drop superfluous declaration.Justus Winter2016-03-041-1/+0
| | | | | | * g10/main.h (disable_core_dumps): Drop declaration. Signed-off-by: Justus Winter <justus@g10code.com>
* g10: Guard code against errors.Justus Winter2016-03-041-7/+8
| | | | | | | | * g10/keygen.c (do_generate_keypair): Check for errors, in which case 'pri_psk' is NULL. Fixes-commit: bf9d1248 Signed-off-by: Justus Winter <justus@g10code.com>
* doc: Drop superfluous 'is'.Justus Winter2016-03-041-1/+1
| | | | | -- Signed-off-by: Justus Winter <justus@g10code.com>
* dirmngr: Add more missing CFLAGS.Justus Winter2016-03-031-2/+2
| | | | | | | | | * dirmngr/Makefile.am (t_ldap_parse_uri_CFLAGS): Add 'GCRYPT_CFLAGS'. (t_dns_stuff_CFLAGS): Likewise. GnuPG-bug-id: 2235 Signed-off-by: Justus Winter <justus@g10code.com>
* tests/openpgp: Skip gpgtar test if it has not been built.Justus Winter2016-03-031-0/+6
| | | | | | | * tests/openpgp/gpgtar.test: Check if executable exists. GnuPG-bug-id: 2261 Signed-off-by: Justus Winter <justus@g10code.com>
* gpg: Add new program gpgcompose.Neal H. Walfield2016-03-025-5/+3061
| | | | | | | | | | | | | | | * g10/packet.h: Include "util.h". * g10/encrypt.c (encrypt_seskey): Don't mark as static. * g10/gpgcompose.c: New file. * g10/Makefile.am (noinst_PROGRAMS): Add gpgcompose. (gpg2_SOURCES): Split everything but gpg.c into... (gpg_sources): ... this new variable. (gpgcompose_SOURCES): New variable. (gpgcompose_LDADD): Likewise. (gpgcompose_LDFLAGS): Likewise. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
* gpg: More robustly detect valid non-armored OpenPGP messages.Neal H. Walfield2016-03-021-13/+54
| | | | | | | | * g10/armor.c (is_armored): More robustly detect valid non-armored OpenPGP messages. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
* common: Provide a function for mapping packet types to strings.Neal H. Walfield2016-03-021-0/+28
| | | | | | | * common/openpgpdefs.h (pkttype_str): New function. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
* gpg: Rename pop_filter to iobuf_pop_filter and export it.Neal H. Walfield2016-03-022-11/+19
| | | | | | | | * common/iobuf.c (pop_filter): Rename from this... (iobuf_pop_filter): ... to this. Don't mark it as static. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
* gpg: Split write_pubkey_enc_from_list.Neal H. Walfield2016-03-022-61/+73
| | | | | | | | | * g10/encrypt.c (write_pubkey_enc_from_list): Split the body of this function out into... (write_pubkey_enc): ... this new function. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
* gpg: Allow the caller to write the contents of a plaintext packet.Neal H. Walfield2016-03-021-8/+16
| | | | | | | | | * g10/build-packet.c (do_plaintext): Change the semantics such that if PT->BUF is NULL, it is the caller's responsibility to write the content (and disable partial body length mode, if appropriate). -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
* gpg: Add a new function for creating binary notations.Neal H. Walfield2016-03-022-2/+79
| | | | | | | * g10/build-packet.c (blob_to_notation): New function. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
* gpg: Refactor the printing of binary notations.Neal H. Walfield2016-03-021-4/+28
| | | | | | | | | | | * g10/build-packet.c (sig_to_notation): Break printing of binary notations into... (notation_value_to_human_readable_string): ... this new function. Provide a small preview of the binary data substituting non-printable characters with '?'. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
* tests/openpgp: Make tests more portable.Uldis Anšmits2016-03-023-6/+6
| | | | | | | | | * tests/openpgp/default-key.test: Avoid 'grep -q'. * tests/openpgp/gpgtar.test: Avoid 'grep -qe' and 'diff -q'. * tests/openpgp/use-exact-key.test: Avoid 'grep -q'. GnuPG-bug-id: 2262 Signed-off-by: Justus Winter <justus@g10code.com>
* common: Update README.Justus Winter2016-03-021-11/+1
| | | | | -- Signed-off-by: Justus Winter <justus@g10code.com>
* common: Consolidate Assuan server argument handling.Justus Winter2016-03-029-298/+207
| | | | | | | | | | | | | | | * common/Makefile.am (common_sources): Add new files. * common/server-help.c: New file. * common/server-help.h: Likewise. * agent/command.c: Drop argument handling primitives in favor of using the consolidated ones. * dirmngr/server.c: Likewise. * g10/server.c: Likewise. * g13/server.c: Likewise. * scd/command.c: Likewise. * sm/server.c: Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
* dirmngr: Add missing CFLAGS.Justus Winter2016-03-011-2/+4
| | | | | | | | * dirmngr/Makefile.am (t_ldap_parse_uri_CFLAGS): Add 'GPG_ERROR_CFLAGS'. (t_dns_stuff_CFLAGS): Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
* tools: Drop superfluous include.Justus Winter2016-03-011-1/+0
| | | | | | * tools/gpgtar.c: Do not include unused 'npth.h'. Signed-off-by: Justus Winter <justus@g10code.com>
* gpg: Prettify a 2 octet hex output.Werner Koch2016-02-261-1/+2
| | | | | | * g10/sig-check.c (check_key_signature2): Wrap line and use %02x. Signed-off-by: Werner Koch <wk@gnupg.org>
* gpg: Show debugging info if a sig with an unsupported sig class is used.Neal H. Walfield2016-02-251-1/+6
| | | | | | | | | * g10/sig-check.c (check_key_signature2): If SIG->CLASS is unsupported, show some debugging information. Don't use BUG to fail. Just return GPG_ERR_BAD_SIGNATURE. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
* gpg: More carefully encode a packet's length.Neal H. Walfield2016-02-251-1/+8
| | | | | | | | | * g10/build-packet.c (write_header2): Make sure the length bits are cleared. Fail if HDRLEN is set and the specified length can't be encoded in the available space. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
* gpg: Avoid directly twiddling bits.Neal H. Walfield2016-02-251-3/+4
| | | | | | | | | * g10/build-packet.c (do_plaintext): Use ctb_new_format_p to check the packet's format. (write_header2): Likewise. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
* gpg: Improve documentation and comments related to OpenPGP packets.Neal H. Walfield2016-02-253-66/+362
| | | | | -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
* gpg: Add some asserts.Neal H. Walfield2016-02-251-4/+62
| | | | | | | | | | | | | | | | | | | * g10/build-packet.c (ctb_new_format_p): New function. (ctb_pkttype): New function. (do_user_id): Add some asserts. (do_key): Likewise. (do_symkey_enc): Likewise. (do_pubkey_enc): Likewise. (do_plaintext): Likewise. (do_encrypted): Likewise. (do_encrypted_mdc): Likewise. (do_compressed): Likewise. (do_signature): Likewise. (do_signature): Likewise. (write_header2): Likewise. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
* gpg: Avoid an unnecessary copy.Neal H. Walfield2016-02-251-14/+9
| | | | | | | | * g10/build-packet.c (sig_to_notation): Avoid an unnecessary copy of the data: the size of the packet is fixed. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>