1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-11 23:59:50 +02:00
gnupg/agent
Werner Koch c6a4a660fd
agent: New option --check-sym-passphrase-pattern.
* agent/gpg-agent.c (oCheckSymPassphrasePattern): New.
(opts): Add --check-sym-passphrase-pattern.
(parse_rereadable_options): Set option.
(main): Return option info.
* tools/gpgconf-comp.c: Add new option.
* agent/agent.h (opt): Add var check_sym_passphrase_pattern.
(struct pin_entry_info_s): Add var constraints_flags.
(CHECK_CONSTRAINTS_NOT_EMPTY): New to replace a hardwired 1.
(CHECK_CONSTRAINTS_NEW_SYMKEY): New.
* agent/genkey.c (check_passphrase_pattern): Rename to ...
(do_check_passphrase_pattern): this to make code reading
easier. Handle the --check-sym-passphrase-pattern option.
(check_passphrase_constraints): Replace arg no_empty by a generic
flags arg.  Also handle --check-sym-passphrase-pattern here.
* agent/command.c (cmd_get_passphrase): In --newsymkey mode pass
CHECK_CONSTRAINTS_NEW_SYMKEY flag.
* agent/call-pinentry.c (struct entry_parm_s): Add constraints_flags.
(struct inq_cb_parm_s): New.
(inq_cb): Use new struct for parameter passing.  Pass flags to teh
constraints checking.
(do_getpin): Pass constraints flag down.
(agent_askpin): Take constraints flag from the supplied pinentry
struct.
--

Requirements for a passphrase to protect a private key and for a
passphrase used for symmetric encryption are different.  Thus a
the use of a different pattern file will be useful.  Note that a
pattern file can be used to replace the other passphrase constraints
options and thus we don't need to duplicate them for symmetric
encryption.

GnuPG-bug-id: 5517
Signed-off-by: Werner Koch <wk@gnupg.org>
Backported-from-master: 7c45a69eb9
agent: New option --check-sym-passphrase-pattern.
2021-08-17 10:40:23 +02:00
..
agent.h agent: New option --check-sym-passphrase-pattern. 2021-08-17 10:40:23 +02:00
all-tests.scm tests: Make it possible to run all tests using our infrastructure. 2017-05-11 18:12:37 +02:00
cache.c agent: Make the request origin a part of the cache items. 2018-03-27 08:40:58 +02:00
call-pinentry.c agent: New option --check-sym-passphrase-pattern. 2021-08-17 10:40:23 +02:00
call-scd.c agent: Stop scdaemon after reload when disable_scdaemon. 2019-05-27 09:01:55 +02:00
ChangeLog-2011 Fix typos 2015-10-28 10:20:17 +01:00
command-ssh.c agent: Skip unknown unknown ssh curves seen on cards. 2021-05-03 18:59:07 +02:00
command.c agent: New option --check-sym-passphrase-pattern. 2021-08-17 10:40:23 +02:00
cvt-openpgp.c agent: Appropriate error code for importing key with no passwd. 2021-06-08 09:12:26 +09:00
cvt-openpgp.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
divert-scd.c gpg: Provide better diagnostic for replaced card keys. 2020-11-13 16:06:59 +01:00
findkey.c Replace all calls to access by gnupg_access 2020-10-21 20:49:18 +02:00
genkey.c agent: New option --check-sym-passphrase-pattern. 2021-08-17 10:40:23 +02:00
gpg-agent-w32info.rc w32: Add manifest files to most binaries 2020-10-02 17:04:12 +02:00
gpg-agent.c agent: New option --check-sym-passphrase-pattern. 2021-08-17 10:40:23 +02:00
gpg-agent.w32-manifest.in w32: Add manifest files to most binaries 2020-10-02 17:04:12 +02:00
keyformat.txt agent: Silence error messages for READKEY --card 2021-05-04 08:42:51 +02:00
learncard.c agent: Fix returning GPG_ERR_NOT_FOUND wrongly. 2017-11-02 17:04:03 +01:00
Makefile.am w32: Add manifest files to most binaries 2020-10-02 17:04:12 +02:00
pkdecrypt.c gpg: Provide better diagnostic for replaced card keys. 2020-11-13 16:06:59 +01:00
pksign.c gpg: Provide better diagnostic for replaced card keys. 2020-11-13 16:06:59 +01:00
preset-passphrase.c Backport of the new option parser from 2.3 2020-12-04 12:12:20 +01:00
protect-tool.c Backport of the new option parser from 2.3 2020-12-04 12:12:20 +01:00
protect.c gpg: Provide better diagnostic for replaced card keys. 2020-11-13 16:06:59 +01:00
t-protect.c build: Always use EXTERN_UNLESS_MAIN_MODULE pattern. 2020-02-10 16:37:34 +01:00
trans.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
trustlist.c Replace all calls to access by gnupg_access 2020-10-21 20:49:18 +02:00
w32main.c agent: Resolve conflict of util.h. 2017-03-07 19:22:48 +09:00
w32main.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00