Changeset View
Changeset View
Standalone View
Standalone View
b/agent/command.c
/* command.c - gpg-agent command handler | /* command.c - gpg-agent command handler | ||||
* Copyright (C) 2001-2011 Free Software Foundation, Inc. | * Copyright (C) 2001-2011 Free Software Foundation, Inc. | ||||
* Copyright (C) 2001-2013 Werner Koch | * Copyright (C) 2001-2013 Werner Koch | ||||
* Copyright (C) 2015 g10 Code GmbH. | |||||
* | * | ||||
* This file is part of GnuPG. | * This file is part of GnuPG. | ||||
* | * | ||||
Context not available. | |||||
char *p; | char *p; | ||||
int opt_data, opt_check, opt_no_ask, opt_qualbar; | int opt_data, opt_check, opt_no_ask, opt_qualbar; | ||||
int opt_repeat = 0; | int opt_repeat = 0; | ||||
char *repeat_errtext = NULL; | char *entry_errtext = NULL; | ||||
if (ctrl->restricted) | if (ctrl->restricted) | ||||
return leave_cmd (ctx, gpg_error (GPG_ERR_FORBIDDEN)); | return leave_cmd (ctx, gpg_error (GPG_ERR_FORBIDDEN)); | ||||
Context not available. | |||||
next_try: | next_try: | ||||
rc = agent_get_passphrase (ctrl, &response, desc, prompt, | rc = agent_get_passphrase (ctrl, &response, desc, prompt, | ||||
repeat_errtext? repeat_errtext:errtext, | entry_errtext? entry_errtext:errtext, | ||||
opt_qualbar, cacheid, CACHE_MODE_USER); | opt_qualbar, cacheid, CACHE_MODE_USER); | ||||
xfree (repeat_errtext); | xfree (entry_errtext); | ||||
repeat_errtext = NULL; | entry_errtext = NULL; | ||||
if (!rc) | if (!rc) | ||||
{ | { | ||||
int i; | int i; | ||||
if (opt_check && check_passphrase_constraints (ctrl, response, 0)) | if (opt_check | ||||
&& check_passphrase_constraints (ctrl, response, &entry_errtext)) | |||||
{ | { | ||||
xfree (response); | xfree (response); | ||||
goto next_try; | goto next_try; | ||||
Context not available. | |||||
{ | { | ||||
xfree (response2); | xfree (response2); | ||||
xfree (response); | xfree (response); | ||||
repeat_errtext = try_percent_escape | entry_errtext = try_percent_escape | ||||
(_("does not match - try again"), NULL); | (_("does not match - try again"), NULL); | ||||
if (!repeat_errtext) | if (!entry_errtext) | ||||
{ | { | ||||
rc = gpg_error_from_syserror (); | rc = gpg_error_from_syserror (); | ||||
break; | break; | ||||
Context not available. |