aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpgv.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* gpg: Move all DNS access to Dirmngr.Werner Koch2015-04-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/dns-cert.h: Move to ../dirmngr/. * common/dns-cert.c: Move to ../dirmngr/. Change args to return the key as a buffer. * common/t-dns-cert.c: Move to ../dirmngr/. * common/pka.c, common/pka.h, common/t-pka.c: Remove. * dirmngr/server.c (data_line_cookie_write): Factor code out to data_line_write and make it a wrapper for that. (data_line_write): New. (cmd_dns_cert): New. (register_commands): Register new command. * g10/Makefile.am (LDADD): Remove DNSLIBS. * g10/call-dirmngr.c (dns_cert_parm_s): New. (dns_cert_data_cb, dns_cert_status_cb): New. (gpg_dirmngr_dns_cert): New. (gpg_dirmngr_get_pka): New. * g10/gpgv.c (gpg_dirmngr_get_pka): New dummy function. * g10/keyserver.c (keyserver_import_cert): Replace get_dns_cert by gpg_dirmngr_dns_cert. (keyserver_import_pka): Replace get_pka_info by gpg_dirmngr_get_pka. * g10/mainproc.c: Include call-dirmngr.h. (pka_uri_from_sig): Add CTX arg. Replace get_pka_info by gpg_dirmngr_get_pka. -- With this patch gpg does not do any network access itself but uses dirmngr for that. Note that we need to keep linking to NETLIBS due to the logging code and because we need TCP for our socket emulation under Windows. Probably also required for Solaris etc. Signed-off-by: Werner Koch <[email protected]>
* Add a hook to be called right after main.Werner Koch2015-01-281-0/+1
| | | | | | * common/init.c (early_system_init): New stub function. Signed-off-by: Werner Koch <[email protected]>
* gpg: Replace remaining old error code macros by GPG_ERR_.Werner Koch2015-01-221-5/+5
| | | | | | | | | * 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 PGP-2 related cruft.Werner Koch2014-11-131-1/+0
| | | | | | | | | | | | | | | | | | | | * g10/armor.c (parse_hash_header,carmor_filter): Ignore MD5 in hash header. (fake_packet): Remove pgp-2 workaround for white space stripping. * g10/filter.h (armor_filter_context_t): Remove field pgp2mode. * g10/options.h (opt): Remove field pgp2_workarounds. * g10/gpg.c (main): Do not set this field. * g10/gpgv.c (main): Ditto. * g10/mainproc.c (proc_encrypted): Use SHA-1 as fallback s2k hash algo. Using MD5 here is useless. (proc_plaintext): Remove PGP-2 related woraround (proc_tree): Remove another workaround but keep the one for PGP-5. -- The removed code was either not anymore used or its use would have caused an error message later anyway. Signed-off-by: Werner Koch <[email protected]>
* gpgv: Init Libgcrypt to avoid syslog warning.Werner Koch2014-03-071-1/+9
| | | | | | | | | | | | | * g10/gpgv.c (main): Check libgcrypt version and disable secure memory. -- GnuPG-bug-id: 1376 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 3966eb244518d5612385d35a5149f7164a9fb707) Resolved conflicts: g10/gpgv.c
* gpg: Remove cipher.h and put algo ids into a common file.Werner Koch2014-01-291-1/+0
| | | | | | | | | | | | | | | | | | * common/openpgpdefs.h (cipher_algo_t, pubkey_algo_t, digest_algo_t) (compress_algo_t): New. * agent/gpg-agent.c: Remove ../g10/cipher.h. Add openpgpdefs.h. * g10/cipher.h (DEK): Move to ... * g10/dek.h: new file. * g10/cipher.h (is_RSA, is_ELGAMAL, is_DSA) (PUBKEY_MAX_NPKEY, PUBKEY_MAX_NSKEY, PUBKEY_MAX_NSIG, PUBKEY_MAX_NENC) (PUBKEY_USAGE_SIG, PUBKEY_USAGE_ENC, PUBKEY_USAGE_CERT) (PUBKEY_USAGE_AUTH, PUBKEY_USAGE_NONE): Move to * g10/packet.h: here. * g10/cipher.h: Remove. Remove from all files. * g10/filter.h, g10/packet.h: Include dek.h. * g10/Makefile.am (common_source): Remove cipher.h. Add dek.h. Signed-off-by: Werner Koch <[email protected]>
* Make use of the *_NAME etc macros.Werner Koch2013-11-181-2/+2
| | | | | | | | | 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.
* gpg: First patches to support a keybox storage backend.Werner Koch2012-12-271-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * kbx/keybox-defs.h (_keybox_write_header_blob): Move prototype to .. * kbx/keybox.h: here. * kbx/keybox-init.c (keybox_lock): Add dummy function * g10/keydb.c: Include keybox.h. (KeydbResourceType): Add KEYDB_RESOURCE_TYPE_KEYBOX. (struct resource_item): Add field kb. (maybe_create_keyring_or_box): Add error descriptions to diagnostics. Add arg IS_BOX. Write a header for a new keybox file. (keydb_add_resource): No more need for the force flag. Rename the local variable "force" to "create". Add URL scheme "gnupg-kbx". Add magic test to detect a keybox file. Add basic support for keybox. (keydb_new, keydb_get_resource_name, keydb_delete_keyblock) (keydb_locate_writable, keydb_search_reset, keydb_search2): Add support for keybox. (lock_all, unlock_all): Ditto. * g10/Makefile.am (needed_libs): Add libkeybox.a. (gpg2_LDADD, gpgv2_LDADD): Add KSBA_LIBS as a workaround. * g10/keydb.h (KEYDB_RESOURCE_FLAG_PRIMARY) KEYDB_RESOURCE_FLAG_DEFAULT, KEYDB_RESOURCE_FLAG_READONLY): New. * g10/gpg.c, g10/gpgv.c (main): Use new constants. -- I did most of these changes back in 2011 and only cleaned them up now. More to follow soon.
* common: Add a global variable to for the default error source.Werner Koch2012-02-061-0/+1
| | | | | | | | | | | | | | For the shared code parts it is cumbersome to pass an error sourse variable to each function. Its value is always a constant for a given binary and thus a global variable makes things a lot easier than the former macro stuff. * common/init.c (default_errsource): New global var. (init_common_subsystems): Rename to _init_common_subsystems. Set DEFAULT_ERRSOURCE. * common/init.h: Assert value of GPG_ERR_SOURCE_DEFAULT. (init_common_subsystems): New macro. * common/util.h (default_errsource): Add declaration. * kbx/keybox-defs.h: Add some GPG_ERR_SOURCE_DEFAULT trickery.
* Changes to --min-cert-level should cause a trustdb rebuild (issue 1366)David Shaw2012-01-201-3/+5
| | | | | | | | | | | | | | | | * g10/gpgv.c, g10/trustdb.c (read_trust_options): Add min_cert_level * g10/trustdb.c (check_trustdb_stale): Request a rebuild if pending_check_trustdb is true (set when we detect a trustdb parameter has changed). * g10/keylist.c (public_key_list): Use 'l' in the "tru" with-colons listing for min_cert_level not matching. * g10/tdbio.c (tdbio_update_version_record, create_version_record, tdbio_db_matches_options, tdbio_dump_record, tdbio_read_record, tdbio_write_record): Add a byte for min_cert_level in the tdbio version record.
* Add a flag parameter to dotlock_create.Werner Koch2011-09-281-1/+2
| | | | This allows us to extend this function in the future.
* Renamed the lock functions.Werner Koch2011-09-231-7/+7
| | | | Also cleaned up the dotlock code for easier readability.
* Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch2011-02-041-32/+31
| | | | | | | | We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
* More agent support for gpg.Werner Koch2010-10-131-0/+18
|
* Exporting secret keys via gpg-agent is now basically supported.Werner Koch2010-10-011-4/+10
| | | | | | A couple of forward ported changes. Doc updates.
* Decryption and signi via agent is now implemented.Werner Koch2010-04-231-2/+2
|
* Re-indent and changed return type.Werner Koch2010-04-211-2/+2
|
* More changes on the way to remove secring.gpg.Werner Koch2010-04-211-0/+7
|
* Generating an OpenPGP key cia gpg-agent basically works.Werner Koch2010-04-201-2/+2
|
* More chnages to use estream. Add a way to replace the standardWerner Koch2010-03-221-1/+1
| | | | | descriptors.
* s/DOTLOCK/dotlock_t/.Werner Koch2009-09-231-4/+4
| | | | | Add some stuff for g13.
* 2009-08-20 Daiki Ueno <[email protected]>Werner Koch2009-08-201-0/+8
| | | | | | | | | * mainproc.c (proc_encrypted): Clear passphrase cached with S2K cache ID if decryption failed. * passphrase.c (passphrase_to_dek_ext): Set dek->s2k_cacheid. * gpgv.c (passphrase_clear_cache): New stub.
* Make bug reporting address easier changeable.Werner Koch2009-07-211-2/+2
|
* Make gpgv error message about a missing keyring more useful. This fixesWerner Koch2009-04-031-5/+6
| | | | | Debian#494040. Also implement readonly semantic for extra safety.
* Move password repetition from gpg to gpg-agent.Werner Koch2009-03-171-3/+3
|
* * gpg.c (my_strusage): gpg2 and gpgv2 (not gpg and gpgv).David Shaw2009-03-151-3/+3
| | | | | * gpgv.c (my_strusage): Same.
* * gpgv.c (my_strusage): Fix name of program in "Syntax" line.David Shaw2009-03-151-1/+1
|
* Minor fixes.Werner Koch2008-12-091-1/+1
|
* Print library versions according to GNU standards.Werner Koch2008-11-181-0/+21
|
* Cleaned up unused gpgsm and gpg options.Werner Koch2008-11-131-107/+111
|
* Marked all unused args on non-W32 platforms.Werner Koch2008-10-201-58/+174
|
* Translate all file descriptors received from assuan.Werner Koch2007-07-121-1/+1
|
* Changed to GPLv3.Werner Koch2007-07-041-4/+2
| | | | | Removed intl/.
* More W32 related changesWerner Koch2007-06-261-0/+1
|
* Fixed a problem in estream-printf.c.Werner Koch2007-06-251-1/+1
| | | | | Changes for Windows (gpgsm -k does now work). Minor cleanups.
* A whole bunch of changes to allow building for Windows.Werner Koch2007-06-141-2/+5
| | | | | See the ChangeLogs for details.
* First steps towards supporting W32.Werner Koch2007-06-061-15/+0
| | | | | | | This is mainly source code reorganization. Update gnulib. g10/ does currently not build.
* Various changesWerner Koch2006-10-101-16/+0
|
* Fix for bug 537Werner Koch2006-10-021-3/+3
|
* Various updatesWerner Koch2006-09-211-1/+1
|
* With --enable-gpg the keyservers are now build and a first test using gpg2Werner Koch2006-08-161-0/+1
| | | | | shows no prblems. Needs more testing of course.
* Still making gpg2 work.Werner Koch2006-05-241-1/+0
| | | | | At least the keyids are now correctly computed again.
* g10/ does build again.Werner Koch2006-05-231-20/+0
|
* Continued with merging.Werner Koch2006-04-191-10/+8
| | | | | Still does not build.
* Merged with gpg 1.4.3 code. Werner Koch2006-04-191-42/+101
| | | | | The gpg part does not yet build.
* * gpg-agent.c (main): Use default_homedir().Werner Koch2004-12-211-9/+2
| | | | | | | | | | | | | | | | | | | * protect-tool.c (main): Ditto. * signal.c (got_fatal_signal, got_usr_signal) (got_fatal_signal) [DOSISH]: Don't build. * simple-gettext.c: Include sysutils.h * homedir.c: New. * Makefile.am (libcommon_a_SOURCES): Add it. (EXTRA_DIST): Removed mkerror and mkerrtok. * gpgv.c, g10.c (main): Use default_hoemdir (). * scdaemon.c (main): Use default_homedir(). * gpgsm.c (main): Use default_homedir().
* * gpgv.c (i18n_init): Always use LC_ALL.Werner Koch2004-09-301-6/+1
| | | | | | | | | | | | | | | | | | | * kbxutil.c (i18n_init): Always use LC_ALL. * gpgsm.c (i18n_init): Always use LC_ALL. * certdump.c (gpgsm_format_name): Factored code out to .. (gpgsm_format_name2): .. new. (gpgsm_print_name): Factored code out to .. (gpgsm_print_name2): .. new. (print_dn_part): New arg TRANSLATE. Changed all callers. (print_dn_parts): Ditto. (gpgsm_format_keydesc): Do not translate the SUBJECT; we require it to stay UTF-8 but we still want to filter out bad control characters. * gpgconf.c (i18n_init): Always use LC_ALL.
* * configure.ac: Require libgcrypt 1.1.94.Werner Koch2004-04-061-3/+3
| | | | | | | | | | Introduce PACKAGE_GT and set it to gnupg2. * gpg-agent.c (main): Use new libgcrypt thread library register scheme. * Makevars (DOMAIN): Init from PACKAGE_GT
* * gpgv.c: Removed g10defs.h.Werner Koch2004-02-121-2/+1
| | | | | * Makefile.am: Include cmacros.am for common flags.
* Merged most of David Shaw's changes in 1.3 since 2003-06-03.Werner Koch2003-09-231-3/+13
|