aboutsummaryrefslogtreecommitdiffstats
path: root/common/simple-pwquery.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-10-24agent: Fix possible uninitalized use of CTX in simple_pwquery.Werner Koch1-0/+1
* common/simple-pwquery.c (agent_open): Clear CTX even on early error. -- GnuPG-bug-id: 4223 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit bafcf7095159493a656382997f8b0d0bb11a20e8)
2017-02-21Clean up word replication.Yuri Chornoivan1-1/+1
-- This fixes extra word repetitions (like "the the" or "is is") in the code and docs. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
2016-11-05Change all http://www.gnu.org in license notices to https://Werner Koch1-1/+1
--
2016-08-22common: Remove unused vars in simple-pwquery.Werner Koch1-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 <[email protected]>
2016-08-11common: Rework the simple password query module.Justus Winter1-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 <[email protected]>
2016-08-11common: Remove simple password query error codes.Justus Winter1-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 <[email protected]>
2016-06-30common: Fix memory leak.Justus Winter1-1/+5
* common/simple-pwquery.c (agent_open): Free socket path. Signed-off-by: Justus Winter <[email protected]>
2016-05-04Some minor string changes and fixed a printf format.Werner Koch1-1/+1
* g10/build-packet.c (notation_value_to_human_readable_string): Use %zu for size_t. Signed-off-by: Werner Koch <[email protected]>
2016-02-12common: Change simple_query to ignore status messages.Neal H. Walfield1-28/+67
* common/simple-pwquery.c (simple_query): Ignore status messages. -- Signed-off-by: Neal H. Walfield <[email protected]> GnuPG-bug-id: 2229
2015-04-24common: Remove two JNLIB_ macros (jnlib merge).Werner Koch1-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 <[email protected]>
2014-11-19common: Change a string to a simlar one to ease translation.Werner Koch1-1/+1
--
2014-10-03Remove support for the GPG_AGENT_INFO envvar.Werner Koch1-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.
2013-11-18Make use of the *_NAME etc macros.Werner Koch1-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.
2012-11-20Do not use a broken ttyname.Werner Koch1-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.
2012-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch1-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.
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-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.
2010-03-10Merged jnlib into common.Werner Koch1-2/+2
2009-05-19Fix possible system freeze on Mac OS X.Werner Koch1-2/+4
2008-03-20Fix a bug in the ambigious name detection.Werner Koch1-3/+2
Minor cleanups.
2008-03-06Comment fixes.Werner Koch1-0/+21
Convey the new envvars when using simple-pwquery.
2007-07-16Properly close files opened by es_fopen.Werner Koch1-3/+0
Allow setting of an empty passphrase. Assorted W32 changes.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-06-14A whole bunch of changes to allow building for Windows.Werner Koch1-5/+44
See the ChangeLogs for details.
2007-01-25agent/Werner Koch1-6/+10
* genkey.c (check_passphrase_constraints): Get ngettext call right.
2006-06-20Updated FSF's address.Werner Koch1-1/+2
2005-07-27Removed directories which are only used by the 1.9 branchWerner Koch1-486/+0
2005-07-042005-07-04 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-1/+23
* simple-pwquery.h (simple_pwclear): New prototype. * simple-pwquery.c (simple_pwclear): New function.
2005-06-16gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch1-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-102005-04-11 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-1/+1
* simple-pwquery.c (simple_pwquery): Use spwq_secure_free.
2005-02-24* gpg-agent.c (handle_connections): Need to check for events ifWerner Koch1-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.
2004-12-21* preset-passphrase.c (preset_passphrase): Handle --passphrase.Werner Koch1-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.
2004-12-15A whole bunch of changes to allow building for W32.Werner Koch1-4/+2
2004-12-13VArious hacks to make it at least build under W32.Werner Koch1-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.
2004-12-02First take on a W32 portWerner Koch1-0/+8
2004-08-18(simple_pwquery): Handle gpg-error style returnWerner Koch1-2/+8
code for canceled.
2004-04-13(copy_and_escape): Relaxed quoting.Werner Koch1-5/+7
2004-02-19* protect-tool.c: New options --have-cert and --prompt.Werner Koch1-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.
2004-02-18* simple-pwquery.c (agent_open): Ignore an empty GPG_AGENT_INFO.Werner Koch1-1/+1
2003-08-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+486
'GNUPG-1-9-BRANCH'.
2003-07-16* simple-pwquery.c, simple-pwquery.h: New; moved from ../agent.Werner Koch1-0/+0
* Makefile.am (libsimple_pwquery_a_LIBADD): New.
2003-01-09Updated from latest NewPG projectWerner Koch1-3/+4
2002-10-19This commit was manufactured by cvs2svn to create branchRepo Admin1-485/+0
'GNUPG-1-9-BRANCH'.
2002-06-27* Makefile.am (pkglib_PROGRAMS): Put protect-tool there.Werner Koch1-0/+485
* findkey.c (agent_write_private_key,agent_key_from_file) (agent_key_available): Use GNUPG_PRIVATE_KEYS_DIR constant. * gpg-agent.c (main): Use GNUPG_DEFAULT_HOMEDIR constant. * protect-tool.c (store_private_key): New. (import_p12_file): Store the new file if requested. (main): New options --force and --store. * gpg-agent.c (main): Set a global flag when runing detached. * query.c (start_pinentry): Pass the list of FD to keep in the child when not running detached. * call-scd.c (start_scd): Ditto.