aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* autogen.sh: Add rule for 64 bit windows.Werner Koch2014-01-101-0/+6
|
* Turn autogen.sh into a generic script.Werner Koch2014-01-103-77/+168
| | | | | | | | | * autogen.sh: Revamp. * autogen.rc: New. * Makefile.am (EXTRA_DIST): Add autogen.rc. -- Signed-off-by: Werner Koch <[email protected]>
* Rename scripts/ to build-aux/Werner Koch2014-01-1021-73/+73
| | | | | | * scripts/: Rename to build-aux/ * Makefile.am: Adjust accordingly. * configure.ac (AC_CONFIG_AUX_DIR): Change to build-aux.
* Improve the speedo make script.Werner Koch2014-01-095-317/+366
| | | | | | | | | | | | | | * scripts/gpg-w32-dev/README: Remove * scripts/gpg-w32-dev/GNUmakefile, scripts/gpg-w32-dev/speedo.mk: Merge into .. * scripts/speedo.mk: this. -- Speedo may now be used to build from GIT or tarballs and has a couple of other improvements as well. For best results the autogen.sh files of all source package should be updated to the one used in gnupg. Signed-off-by: Werner Koch <[email protected]>
* autogen.sh: Add envvar AUTOGEN_SH_SILENTWerner Koch2014-01-091-15/+35
| | | | --
* gpgsplit: Allow building without zlib support.Werner Koch2014-01-091-3/+11
| | | | | | | | * tools/gpgsplit.c [!HAVE_ZLIB]: Do not include zlib.h. (handle_zlib): Build only if HAVE_ZLIB is defined. (write_part): Support zlib and zip only if HAVE_ZLIB is defined. Signed-off-by: Werner Koch <[email protected]>
* w32: Fix backslash quoting in registry name.Werner Koch2014-01-091-1/+1
| | | | * configure.ac (GNUPG_REGISTRY_DIR): Double backslashes.
* Fix test for zlib.Werner Koch2014-01-091-6/+7
| | | | * configure.ac (HAVE_ZLIB): Define only if found.
* Add --enable-silent-rules stuff.Werner Koch2014-01-091-0/+1
| | | | * configure.ac: Add AM_SILENT_RULES.
* Add i686-w64-mingw32 as w32 toolchain to autogen.sh.Werner Koch2014-01-081-1/+1
| | | | --
* w32: Add macro for the registry key.Werner Koch2014-01-083-2/+7
| | | | | | * configure.ac (GNUPG_REGISTRY_DIR) [W32]: New ac-define. * common/homedir.c (default_homedir): Use it. * common/logging.c (do_logv): Use it.
* gpg: Change --show-session-key to print the session key earlier.Werner Koch2013-12-115-21/+50
| | | | | | | | | | | | | | | | | | * g10/cpr.c (write_status_strings): New. (write_status_text): Replace code by a call to write_status_strings. * g10/mainproc.c (proc_encrypted): Remove show_session_key code. * g10/decrypt-data.c (decrypt_data): Add new show_session_key code. -- This feature can be used to return the session key for just a part of a file. For example to downloading just the first 32k of a huge file, decrypting that incomplete part and while ignoring all the errors break out the session key. The session key may then be used on the server to decrypt the entire file without the need to have the private key on the server. GnuPG-bug-id: 1389 Signed-off-by: Werner Koch <[email protected]>
* gpg: Change OID of Ed25519 and add Brainpool oids.Werner Koch2013-12-051-6/+27
| | | | | | | | | | | | | * common/openpgp-oid.c (openpgp_curve_to_oid): Change OID for Ed25519. Add brainpool OIDs. (openpgp_oid_to_curve): Ditto. -- This change is required to the change in Libgcrypt. Note that we will likely use a different OpenPGP algorithm ID for EdDSA and thus the current Ed25519 implementation will not stay with us. Signed-off-by: Werner Koch <[email protected]>
* common: Add put_membuf_printf.Werner Koch2013-11-292-0/+26
| | | | | | | | | * common/membuf.c (put_membuf_printf): New. -- This is just a convenience function for easier code readability. Signed-off-by: Werner Koch <[email protected]>
* Add rendered versions of the gnupg logo to artwork.Werner Koch2013-11-294-0/+0
| | | | --
* gpg: Change armor Version header to emit only the major version.Werner Koch2013-11-275-8/+34
| | | | | | | | | | | | * g10/options.h (opt): Rename field no_version to emit_version. * g10/gpg.c (main): Init opt.emit_vesion to 1. Change --emit-version to bump up opt.emit_version. * g10/armor.c (armor_filter): Implement different --emit-version values. -- GnuPG-bug-id: 1572 Signed-off-by: Werner Koch <[email protected]>
* Make use of the *_NAME etc macros.Werner Koch2013-11-1848-320/+355
| | | | | | | | | Replace hardwired strings at many places with new macros from config.h and use the new strusage macro replacement feature. * common/asshelp.c (lock_spawning) [W32]: Change the names of the spawn sentinels. * agent/command.c (cmd_import_key): Use asprintf to create the prompt.
* Add strusage macro replacement feature.Werner Koch2013-11-182-32/+97
| | | | | | | | | | | | | * common/argparse.c (writechar): New. (writestrings): Add macro replacement feature. (show_help): Remove specialized @EMAIL@ replacement. * configure.ac (GNUPG_NAME, GPG_NAME, GPGSM_NAME): Define. (GPG_AGENT_NAME, DIRMNGR_NAME, G13_NAME, GPGCONF_NAME): Define. (GPGTAR_NAME, GPG_AGENT_INFO_NAME, GPG_AGENT_SOCK_NAME): Define. (GPG_AGENT_SSH_SOCK_NAME, DIRMNGR_INFO_NAME): Define. (DIRMNGR_SOCK_NAME): Define. Signed-off-by: Werner Koch <[email protected]>
* kbx: Implement update operation for OpenPGP keyblocks.Werner Koch2013-11-157-48/+108
| | | | | | | | | | | | | | | * kbx/keybox-update.c (keybox_update_keyblock): Implement. * kbx/keybox-search.c (get_blob_flags): Move to ... * kbx/keybox-defs.h (blob_get_type): here. * kbx/keybox-file.c (_keybox_read_blob2): Fix calling without R_BLOB. * g10/keydb.c (build_keyblock_image): Allow calling without R_SIGSTATUS. (keydb_update_keyblock): Implement for keybox. * kbx/keybox-dump.c (_keybox_dump_blob): Fix printing of the unhashed size. Print "does not expire" also on 64 bit platforms. Signed-off-by: Werner Koch <[email protected]>
* Fix minor compiler warnings.Werner Koch2013-11-155-11/+4
| | | | --
* gpg: Rework ECC support and add experimental support for Ed25519.Werner Koch2013-11-1520-139/+574
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/findkey.c (key_parms_from_sexp): Add algo name "ecc". (agent_is_dsa_key): Ditto. (agent_is_eddsa_key): New. Not finished, though. * agent/pksign.c (do_encode_eddsa): New. (agent_pksign_do): Use gcry_log_debug functions. * agent/protect.c (agent_protect): Parse a flags parameter. * g10/keygen.c (gpg_curve_to_oid): Move to ... * common/openpgp-oid.c (openpgp_curve_to_oid): here and rename. (oid_ed25519): New. (openpgp_oid_is_ed25519): New. (openpgp_oid_to_curve): New. * common/t-openpgp-oid.c (test_openpgp_oid_is_ed25519): New. * g10/build-packet.c (gpg_mpi_write): Write the length header also for opaque MPIs. (gpg_mpi_write_nohdr): New. (do_key): Use gpg_mpi_write_nohdr depending on algorithm. (do_pubkey_enc): Ditto. * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Use gpg_mpi_write_nohdr. * g10/export.c (transfer_format_to_openpgp): * g10/keygen.c (ecckey_from_sexp): Return the error. (gen_ecc): Repalce arg NBITS by CURVE. (read_parameter_file): Add keywords "Key-Curve" and "Subkey-Curve". (ask_curve): New. (generate_keypair, generate_subkeypair): Use ask_curve. (do_generate_keypair): Also pass curve name. * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Print curve name. * g10/parse-packet.c (mpi_read): Remove workaround for Libcgrypt < 1.5. (parse_key): Fix ECC case. Print the curve name. * g10/pkglue.c (mpi_from_sexp): Rename to get_mpi_from_sexp. (pk_verify, pk_check_secret_key): Add special case for Ed25519. * g10/seskey.c (encode_md_value): Ditto. * g10/sign.c (do_sign, hash_for, sign_file): Ditto. -- Be warned that this code is subject to further changes and that the format will very likely change before a release. There are also known bugs and missing code. Signed-off-by: Werner Koch <[email protected]>
* kbx: Fix possible segv in kbxdump.Werner Koch2013-11-151-1/+1
| | | | | | * kbx/keybox-dump.c (_keybox_dump_blob): Check length before get32. Signed-off-by: Werner Koch <[email protected]>
* Require Libgcrypt 1.6Werner Koch2013-11-152-27/+6
| | | | | | | | | | * agent/pksign.c (do_encode_dsa): Remove Libgcrypt version check -- Now that we have decided on a release plan for Libgcrypt 1.6 and given all the improvements it makes more sense to make use of these improvements than to clutter the GnuPG code with workarounds for older Libgcrypt versions.
* scd: more pinpad input fix for PC/SC.NIIBE Yutaka2013-11-131-10/+5
| | | | | | | | | | * scd/apdu.c (check_pcsc_pinpad): Set default values here. (pcsc_pinpad_verify, pcsc_pinpad_modify): Remove setting default values, as it's too late. -- GnuPG-bug-id: 1549
* scd: more pinpad fix.NIIBE Yutaka2013-11-111-8/+5
| | | | | | | | | | * scd/apdu.c (check_pcsc_pinpad): Set ->minlen and ->maxlen only when those are specified. (pcsc_pinpad_modify): Remove old check code. -- GnuPG-bug-id: 1549
* scd: pinpad fix for PC/SC on Windows.NIIBE Yutaka2013-10-291-1/+8
| | | | * scd/apdu.c (SCARD_CTL_CODE): Fix for Windows.
* doc: Change yat2m to allow arbitrary condition names.Werner Koch2013-10-281-92/+218
| | | | | | | | | | | | | | | | | | | * doc/yat2m.c (MAX_CONDITION_NESTING): New. (gpgone_defined): Remove. (condition_s, condition_stack, condition_stack_idx): New. (cond_is_active, cond_in_verbatim): New. (add_predefined_macro, set_macro, macro_set_p): New. (evaluate_conditions, push_condition, pop_condition): New. (parse_file): Rewrite to use the condition stack. (top_parse_file): Set prefined macros. (main): Change -D to define arbitrary macros. -- This change allows the use of other conditionals than "gpgone" and thus make "gpgtwoone" et al. actually work. It does now also track conditionals over included files. Signed-off-by: Werner Koch <[email protected]>
* scd: fix pinpad input on Windows.NIIBE Yutaka2013-10-251-1/+2
| | | | | | | | | | * scd/apdu.c (open_pcsc_reader_direct): Don't call pcsc_vendor_specific_init here, but... (connect_pcsc_card): Call it here. -- Thanks to Martin Wolters for the bug report.
* po: Update Japanese translation.NIIBE Yutaka2013-10-231-4/+4
|
* scd: add pinpad readers information for PC/SC service.NIIBE Yutaka2013-10-161-11/+26
| | | | | | | | * scd/apdu.c (pcsc_vendor_specific_init): Add information for Cherry ST-2xxx, Reiner cyberJack, Vasco DIGIPASS, FSIJ Gnuk Token, and KAAN Advance. --
* scd: remove pin length check.NIIBE Yutaka2013-10-151-6/+0
| | | | | | | | * scd/apdu.c (pcsc_pinpad_verify): Remove old check code for pin length. -- GnuPG-bug-id: 1549
* doc: Some gpg and gpgv clarifications.Werner Koch2013-10-042-4/+17
| | | | | -- GnuPG-bug-id: 1486, 1537
* gpg: Limit the nesting level of I/O filters.Werner Koch2013-10-042-30/+59
| | | | | | | | | | | | | | | | | | | | | | | | * common/iobuf.c (MAX_NESTING_FILTER): New. (iobuf_push_filter2): Limit the nesting level. * g10/mainproc.c (mainproc_context): New field ANY. Change HAVE_DATA and ANY_SIG_SIGN to bit fields of ANY. Add bit field UNCOMPRESS_FAILED. (proc_compressed): Avoid printing multiple Bad Data messages. (check_nesting): Return GPG_ERR_BAD_DATA instead of UNEXPECTED_DATA. -- This is a more general fix for the nested compression packet bug. In particular this helps g10/import.c:read_block to stop pushing compression filters onto an iobuf stream. This patch also reduces the number of error messages for the non-import case. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 35e40e2d514223c950c2f6d1214e02e92d87e997) Resolved conflicts: common/iobuf.c g10/mainproc.c
* gpg: Fix bug with deeply nested compressed packets.Werner Koch2013-10-023-9/+46
| | | | | | | | | | * g10/mainproc.c (MAX_NESTING_DEPTH): New. (proc_compressed): Return an error code. (check_nesting): New. (do_proc_packets): Check packet nesting depth. Handle errors from check_compressed. Signed-off-by: Werner Koch <[email protected]>
* Register DCO for Kyle Butt.Werner Koch2013-10-011-2/+5
| | | | --
* Switch to deterministic DSA.Werner Koch2013-09-081-5/+35
| | | | | | | | | | | | | | | | | | * agent/pksign.c (rfc6979_hash_algo_string): New. (do_encode_dsa) [Libgcrypt >= 1.6]: Make use of RFC-6979. -- Now that we have a good (and not NSA/NIST demanded ;-) specification on how to use DSA without a random nonce, we take advantage of it and thus avoid pitfalls related to a misbehaving RNG during signature creation. Note that OpenPGP has the option of using a longer hash algorithm but truncated to what is suitable for the used DSA key size. The hash used as input to RFC-6979 will also be one with an appropriate digest length but not a truncated one. This is allowed by RFC-6979. Signed-off-by: Werner Koch <[email protected]>
* scd: Suppress gcc warning about possible uninitialized use.Werner Koch2013-08-301-1/+4
| | | | | | * scd/app-nks.c (parse_pwidstr): Always init r_pwid. Signed-off-by: Werner Koch <[email protected]>
* gpg: Use 2048 as the default keysize in batch mode.Werner Koch2013-08-301-3/+3
| | | | | | | * g10/keygen.c (gen_elg, gen_dsa, gen_rsa): Set default keysize to 2048. Signed-off-by: Werner Koch <[email protected]>
* gpgtar: Fix building for systems with a separate libintl.Werner Koch2013-08-301-1/+2
| | | | | | * tools/Makefile.am (gpgtar_LDADD): Add LIBINTL and LIBICONV. Signed-off-by: Werner Koch <[email protected]>
* scd: Use vendor and product id macros also in apdu.cWerner Koch2013-08-303-25/+33
| | | | | | | | | * scd/ccid-driver.c: Move vendor and product ids to ... * scd/ccid-driver.h: here. * scd/apdu.c (CCID_DRIVER_INCLUDE_USB_IDS): Define to include ids. (pcsc_vendor_specific_init): Use vendor and product id macros. Signed-off-by: Werner Koch <[email protected]>
* scd: PC/SC pinpad input improvement.NIIBE Yutaka2013-08-301-62/+168
| | | | | | | | | | | | | | | | | | | | * scd/apdu.c (struct reader_table_s): Add members: PINMIN, PINMAX, and PINPAD_VERLEN_SUPPORTED. (CM_IOCTL_VENDOR_IFD_EXCHANGE, FEATURE_GET_TLV_PROPERTIES, PCSCv2_PART10_PROPERTY_*): New. (new_reader_slot): Initialize pinpad_varlen_supported, pinmin, pinmax. (pcsc_vendor_specific_init): New. (open_pcsc_reader_direct, open_pcsc_reader_wrapped): Call pcsc_vendor_specific_init. (check_pcsc_pinpad): Not detect here but use the result of pcsc_vendor_specific_init. (pcsc_pinpad_verify, pcsc_pinpad_modify): Specify bNumberMessage. -- Signed-off-by: NIIBE Yutaka --
* scd: add support for RSA_CRT and RSA_CRT_N key import.Jonas Borgström2013-08-292-7/+72
| | | | | | | | | | | | | | * scd/app-openpgp.c (do_writekey): Added RSA_CRT and RSA_CRT_N support. -- Updates of original patch by wk: - unsigned char *rsa_u, *rsa_dp, rsa_dq; + unsigned char *rsa_u, *rsa_dp, *rsa_dq; and AUTHORS. Missing signed-off-by assumed due to DCO send the other day.
* kbx: Add a few macros for easier readability.Werner Koch2013-08-291-10/+12
| | | | | | | | * kbx/keybox-update.c (FILECOPY_INSERT) (FILECOPY_DELETE, FILECOPY_UPDATE): New macros. Replace numbers by them. Signed-off-by: Werner Koch <[email protected]>
* Fix commit 04e2c83f.Werner Koch2013-08-281-1/+2
| | | | | * agent/command-ssh.c (stream_read_string): Do not assign to a NULL ptr.
* gpg: Make decryption with the OpenPGP card work.Werner Koch2013-08-2816-39/+134
| | | | | | | | | | | | | | | | | | | | | | | | * scd/app-common.h (APP_DECIPHER_INFO_NOPAD): New. * scd/app-openpgp.c (do_decipher): Add arg R_INFO. * scd/app-nks.c (do_decipher): Add arg R_INFO as a dummy. * scd/app.c (app_decipher): Add arg R_INFO. * scd/command.c (cmd_pkdecrypt): Print status line "PADDING". * agent/call-scd.c (padding_info_cb): New. (agent_card_pkdecrypt): Add arg R_PADDING. * agent/divert-scd.c (divert_pkdecrypt): Ditto. * agent/pkdecrypt.c (agent_pkdecrypt): Ditto. * agent/command.c (cmd_pkdecrypt): Print status line "PADDING". * g10/call-agent.c (padding_info_cb): New. (agent_pkdecrypt): Add arg R_PADDING. * g10/pubkey-enc.c (get_it): Use padding info. -- Decryption using a card never worked in gpg 2.1 because the information whether the pkcs#1 padding needs to be removed was not available. Gpg < 2.1 too this info from the secret sub key but that has gone in 2.1. Signed-off-by: Werner Koch <[email protected]>
* agent: Fix two compiler warnings.Werner Koch2013-08-283-3/+5
| | | | | | | | | | | | | | * agent/command.c (cmd_preset_passphrase, pinentry_loopback): Use %zu in format string. * scd/ccid-driver.c (ccid_get_atr): Ditto. * agent/command-ssh.c (stream_read_string): Init arg STRING_SIZE to avoid maybe_unitialized warning. -- Actually the first one might have been a problem on big endian machines. Signed-off-by: Werner Koch <[email protected]>
* scd: fix parsing login-data DO.NIIBE Yutaka2013-08-271-12/+13
| | | | | | | | * scd/app-openpgp.c (parse_login_data): Release RELPTR. Fix parsing. -- Signed-off-by: NIIBE Yutaka
* scd: fix Vega for Alpha reader.NIIBE Yutaka2013-08-271-2/+6
| | | | | | | | | * scd/ccid-driver.c (ccid_vendor_specific_init): Fix error handling and size of command. -- Signed-off-by: NIIBE Yutaka
* scd: Make SPRx32 pinpad work with PC/SC on Windows.Werner Koch2013-08-211-7/+27
| | | | | | | | | | | * scd/apdu.c (CM_IOCTL_GET_FEATURE_REQUEST): Use SCARD_CTL_CODE. (SCARD_CTL_CODE): Define if not defined. (reader_table_s): Add is_spr532. (new_reader_slot): Clear it. (check_pcsc_pinpad): Set it. (pcsc_pinpad_verify, pcsc_pinpad_modify): Add fix for SPR532. Signed-off-by: Werner Koch <[email protected]>
* scd: Improve --enable-pinpad-varlen.Werner Koch2013-08-213-5/+15
| | | | | | | | * tools/gpgconf-comp.c (gc_options_scdaemon): Add enable-pinpad-varlen. * scd/apdu.c (check_pcsc_pinpad): Detect SPRx32 reader. Signed-off-by: Werner Koch <[email protected]>