mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
scd: Change parameters of readkey fucntion pointer.
* scd/app-common.h (APP_READKEY_FLAG_ADVANCED): New. (struct app_ctx_s): Replace param advanced by flags in readkey. Change all users.
This commit is contained in:
parent
669786cf64
commit
41979ed730
4 changed files with 10 additions and 7 deletions
|
@ -608,7 +608,7 @@ do_readcert (app_t app, const char *certid,
|
|||
certificate parsing code in commands.c:cmd_readkey. For internal
|
||||
use PK and PKLEN may be NULL to just check for an existing key. */
|
||||
static gpg_error_t
|
||||
do_readkey (app_t app, ctrl_t ctrl, int advanced, const char *keyid,
|
||||
do_readkey (app_t app, ctrl_t ctrl, const char *keyid, unsigned int flags,
|
||||
unsigned char **pk, size_t *pklen)
|
||||
{
|
||||
gpg_error_t err;
|
||||
|
@ -618,7 +618,7 @@ do_readkey (app_t app, ctrl_t ctrl, int advanced, const char *keyid,
|
|||
|
||||
(void)ctrl;
|
||||
|
||||
if (advanced)
|
||||
if ((flags & APP_READKEY_FLAG_ADVANCED))
|
||||
return GPG_ERR_NOT_SUPPORTED;
|
||||
|
||||
/* We use a generic name to retrieve PK.AUT.IFD-SPK. */
|
||||
|
@ -693,7 +693,7 @@ do_writekey (app_t app, ctrl_t ctrl,
|
|||
else
|
||||
return gpg_error (GPG_ERR_INV_ID);
|
||||
|
||||
if (!force && !do_readkey (app, ctrl, 0, keyid, NULL, NULL))
|
||||
if (!force && !do_readkey (app, ctrl, keyid, 0, NULL, NULL))
|
||||
return gpg_error (GPG_ERR_EEXIST);
|
||||
|
||||
/* Parse the S-expression. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue