summaryrefslogtreecommitdiffstats
path: root/common/simple-pwquery.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* all: fix spelling and typosDaniel Kahn Gillmor2018-10-241-1/+1
| | | | Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* agent: Fix possible uninitalized use of CTX in simple_pwquery.Werner Koch2018-10-241-0/+1
| | | | | | | | * common/simple-pwquery.c (agent_open): Clear CTX even on early error. -- GnuPG-bug-id: 4223 Signed-off-by: Werner Koch <wk@gnupg.org>
* Clean up word replication.Yuri Chornoivan2017-02-211-1/+1
| | | | | | | | | -- This fixes extra word repetitions (like "the the" or "is is") in the code and docs. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* Change all http://www.gnu.org in license notices to https://Werner Koch2016-11-051-1/+1
| | | | --
* common: Remove unused vars in simple-pwquery.Werner Koch2016-08-221-16/+5
| | | | | | | | | * common/simple-pwquery.c (agent_send_option): Remove unused vars. (simple_query): Ditto. (agent_open): Ditto. Return RC on error. (simple_pwquery): Remove unused vars. Remove shadowing of 'p'. Signed-off-by: Werner Koch <wk@gnupg.org>
* common: Rework the simple password query module.Justus Winter2016-08-111-319/+101
| | | | | | | | | | | | | * common/simple-pwquery.c (writen, readline): Drop. (agent_send_option, agent_send_all_options, agent_open): Just use libassuan. (simple_pw_set_socket): Simplify. (default_inq_cb): New function. (simple_pwquery, simple_query): Just use libassuan. * agent/Makefile.am (gpg_preset_passphrase_LDADD): Add libassuan. * tools/Makefile.am (symcryptrun_LDADD): Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
* common: Remove simple password query error codes.Justus Winter2016-08-111-0/+9
| | | | | | | | | | | | * common/simple-pwquery.h: Remove mapping function. Move all definitions of status codes... * common/simple-pwquery.c: ... here, and define them to meaningful gpg error values. * agent/preset-passphrase.c (preset_passphrase): Use error code as-is. (forget_passphrase): Likewise. * tools/symcryptrun.c (confucius_get_pass): Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
* common: Fix memory leak.Justus Winter2016-06-301-1/+5
| | | | | | * common/simple-pwquery.c (agent_open): Free socket path. Signed-off-by: Justus Winter <justus@g10code.com>
* Some minor string changes and fixed a printf format.Werner Koch2016-05-041-1/+1
| | | | | | | * g10/build-packet.c (notation_value_to_human_readable_string): Use %zu for size_t. Signed-off-by: Werner Koch <wk@gnupg.org>
* common: Change simple_query to ignore status messages.Neal H. Walfield2016-02-121-28/+67
| | | | | | | | * common/simple-pwquery.c (simple_query): Ignore status messages. -- Signed-off-by: Neal H. Walfield <neal@g10code.com> GnuPG-bug-id: 2229
* common: Remove two JNLIB_ macros (jnlib merge).Werner Koch2015-04-241-5/+1
| | | | | | | | | | * configure.ac: Merge seperate jnlib checks. (HAVE_JNLIB_LOGGING): Remove. * common/logging.c, common/simple-pwquery.c (JNLIB_NEED_AFLOCAL): Rename to GNUPG_COMMON_NEED_AFLOCAL. Change all tests. -- Signed-off-by: Werner Koch <wk@gnupg.org>
* common: Change a string to a simlar one to ease translation.Werner Koch2014-11-191-1/+1
| | | | --
* Remove support for the GPG_AGENT_INFO envvar.Werner Koch2014-10-031-18/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | * agent/agent.h (opt): Remove field use_standard_socket. * agent/command.c (cmd_killagent): Always allow killing. * agent/gpg-agent.c (main): Turn --{no,}use-standard-socket and --write-env-file into dummy options. Always return true for --use-standard-socket-p. Do not print the GPG_AGENT_INFO envvar setting or set that envvar. (create_socket_name): Simplify by removing non standard socket support. (check_for_running_agent): Ditto. * common/asshelp.c (start_new_gpg_agent): Remove GPG_AGENT_INFO use. * common/simple-pwquery.c (agent_open): Ditto. * configure.ac (GPG_AGENT_INFO_NAME): Remove. * g10/server.c (gpg_server): Do not print the AgentInfo comment. * g13/server.c (g13_server): Ditto. * sm/server.c (gpgsm_server): Ditto. * tools/gpgconf.c (main): Simplify by removing non standard socket support. -- The indented fix to allow using a different socket than the one in the gnupg home directory is to change Libassuan to check whether the socket files exists as a regualr file with a special keyword to redirect to another socket file name.
* 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.
* Do not use a broken ttyname.Werner Koch2012-11-201-1/+1
| | | | | | | | | | | | * configure.ac (HAVE_BROKEN_TTYNAME): New ac_define set for Android systems. * common/util.h (gnupg_ttyname): New macro. Change all callers of ttyname to use this macro instead. (ttyname) [W32]: Rename to _gnupg_ttyname and use also if HAVE_BROKEN_TTYNAME is defined. * common/simple-pwquery.c (agent_send_all_options): Keep on using ttyname unless HAVE_BROKEN_TTYNAME is set. This is because this file may be used standalone.
* Change all quotes in strings and comments to the new GNU standard.Werner Koch2012-06-051-1/+1
| | | | | | | | | | | | | | | | | | | The asymmetric quotes used by GNU in the past (`...') don't render nicely on modern systems. We now use two \x27 characters ('...'). The proper solution would be to use the correct Unicode symmetric quotes here. However this has the disadvantage that the system requires Unicode support. We don't want that today. If Unicode is available a generated po file can be used to output proper quotes. A simple sed script like the one used for en@quote is sufficient to change them. The changes have been done by applying sed -i "s/\`\([^'\`]*\)'/'\1'/g" to most files and fixing obvious problems by hand. The msgid strings in the po files were fixed with a similar command.
* Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch2011-02-041-35/+35
| | | | | | | | 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.
* Merged jnlib into common.Werner Koch2010-03-101-2/+2
|
* Fix possible system freeze on Mac OS X.Werner Koch2009-05-201-2/+4
|
* Fix a bug in the ambigious name detection.Werner Koch2008-03-201-3/+2
| | | | | Minor cleanups.
* Comment fixes.Werner Koch2008-03-061-0/+21
| | | | | Convey the new envvars when using simple-pwquery.
* Properly close files opened by es_fopen.Werner Koch2007-07-161-3/+0
| | | | | | Allow setting of an empty passphrase. Assorted W32 changes.
* Changed to GPLv3.Werner Koch2007-07-041-4/+2
| | | | | Removed intl/.
* A whole bunch of changes to allow building for Windows.Werner Koch2007-06-141-5/+44
| | | | | See the ChangeLogs for details.
* agent/Werner Koch2007-01-251-6/+10
| | | | | * genkey.c (check_passphrase_constraints): Get ngettext call right.
* Updated FSF's address.Werner Koch2006-06-201-1/+2
|
* 2005-07-04 Marcus Brinkmann <marcus@g10code.de>Marcus Brinkmann2005-07-041-1/+23
| | | | | | * simple-pwquery.h (simple_pwclear): New prototype. * simple-pwquery.c (simple_pwclear): New function.
* gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch2005-06-161-1/+1
| | | | | | | char * vs. unsigned char * warnings. The GNU coding standards used to say that these mismatches are okay and better than a bunch of casts. Obviously this has changed now.
* 2005-04-11 Marcus Brinkmann <marcus@g10code.de>Marcus Brinkmann2005-04-111-1/+1
| | | | | * simple-pwquery.c (simple_pwquery): Use spwq_secure_free.
* * gpg-agent.c (handle_connections): Need to check for events ifWerner Koch2005-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | select returns with -1. * tools.texi (gpg-connect-agent): New. * app-openpgp.c (get_one_do): Never try to get a non cacheable object from the cache. (get_one_do): Add new arg to return an error code. Changed all callers. (do_getattr): Let it return a proper error code. * app.c (select_application): Return an error code and the application context in an new arg. * command.c (open_card): Adjusted for that. Don't use the fallback if no card is present. Return an error if the card has been removed without a reset. (do_reset, cmd_serialno): Clear that error flag. (TEST_CARD_REMOVAL): New. Use it with all command handlers. * scdaemon.c (ticker_thread): Termintate if a shutdown is pending. * apdu.c: Added some PCSC error codes. (pcsc_error_to_sw): New. (reset_pcsc_reader, pcsc_get_status, pcsc_send_apdu) (open_pcsc_reader): Do proper error code mapping. * gpg-connect-agent.c: New. * Makefile.am: Add it.
* * preset-passphrase.c (preset_passphrase): Handle --passphrase.Werner Koch2004-12-211-12/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am (gpg_preset_passphrase_LDADD): Reorder libs so that pwquery may use stuff from jnlib. Conditionally add -lwsock2 (gpg_protect_tool_LDADD): Ditto. * preset-passphrase.c (main): Use default_homedir(). (main) [W32]: Initialize sockets. * simple-pwquery.c (agent_open) [W32]: Implement for W32. (readline) [W32]: Use recv instead of read. (writen) [W32]: Use send instead of write. (my_stpcpy): Define a stpcpy replacement so that this file continues to be self-contained. (agent_send_all_options) [W32]: Don't call ttyname. * gnupg-badge-openpgp.eps, gnupg-badge-openpgp.jpg: New * gnupg.texi: Add a logo. * sysnotes.texi: New. * gpgsm.c (main): Use default_homedir(). (main) [W32]: Default to disabled CRL checks. * gpgconf-comp.c (get_config_pathname) [DOSISH]: Detect absolute pathnames with a drive letter.
* A whole bunch of changes to allow building for W32.Werner Koch2004-12-151-4/+2
|
* VArious hacks to make it at least build under W32.Werner Koch2004-12-131-0/+2
| | | | | | | | | | * stringhelp.c (w32_strerror) [W32]: New. * w32-pth.c, w32-pth.h: Added real code written by Timo Schulz. Not finished, though. * gpgconf-comp.c <ignore-ocsp-service-url>: Fixed typo.
* First take on a W32 portWerner Koch2004-12-021-0/+8
|
* (simple_pwquery): Handle gpg-error style returnWerner Koch2004-08-181-2/+8
| | | | | code for canceled.
* (copy_and_escape): Relaxed quoting.Werner Koch2004-04-131-5/+7
|
* * protect-tool.c: New options --have-cert and --prompt.Werner Koch2004-02-191-1/+6
| | | | | | | | | | | | | | | | | | | | (export_p12_file): Read a certificate from STDIN and pass it to p12_build. Detect a keygrip and construct the filename in that case. Unprotcet a key if needed. Print error messages for key formats we can't handle. (release_passphrase): New. (get_passphrase): New arg PROMPTNO. Return the allocated string. Changed all callers. * minip12.c: Revamped the build part. (p12_build): New args CERT and CERTLEN. * simple-pwquery.c (agent_open): Don't mangle INFOSTR. * export.c (export_p12, popen_protect_tool) (gpgsm_p12_export): New. * gpgsm.c (main): New command --export-secret-key-p12.
* * simple-pwquery.c (agent_open): Ignore an empty GPG_AGENT_INFO.Werner Koch2004-02-181-1/+1
|
* This commit was manufactured by cvs2svn to create branchRepo Admin2003-08-051-0/+486
'GNUPG-1-9-BRANCH'.