Home GnuPG
Diffusion GnuPG 2778c6f8f40d

Show passphrase constraints errors as password prompt errors
2778c6f8f40dUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Show passphrase constraints errors as password prompt errors

* agent/agent.h (check_passphrase_constraints): Add parameter
failed_constraint and remove parameter silent.  Update callers.
* agent/genkey.c (check_passphrase_constraints): Add parameter
failed_constraint and remove parameter silent.  If FAILED_CONSTRAINT
is not NULL and OPT.ENFORCE_PASSPHRASE_CONSTRAINTS is FALSE, save the
error text in *FAILED_CONSTRAINT and don't call take_this_one_anyway
or take_this_one_anyway2.  If FAILED_CONSTRAINT is NULL, act as if
SILENT was set.
(agent_ask_new_passphrase): Change initial_errtext's type from a const
char * to a char *.  Pass it to check_passphrase_constraints.  If it
contains malloc's memory, free it.

Based on a patch provided by Watson Yuuma Sato <yuuma.sato@gmail.com>
in issue 2018.

  • Signed-off-by: Neal H. Walfield <neal@g10code.com>

Details

Provenance
nealAuthored on Jun 18 2015, 5:10 AM
Neal H. Walfield <neal@g10code.com>Committed on Jun 29 2015, 3:53 PM
Parents
rG0416aed4abf6: Improve documentation for default-cache-ttl and default-cache-ttl-ssh.
Branches
Unknown
Tags
Unknown