mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
wks: Let the client only export the requested UID.
* tools/gpg-wks-client.c (get_key): Export only the requested uid. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
7705f310f1
commit
1bfed0bbc5
@ -46,6 +46,8 @@ are
|
|||||||
- scd :: The scdaemon component
|
- scd :: The scdaemon component
|
||||||
- ccid :: The CCID driver in scdaemon
|
- ccid :: The CCID driver in scdaemon
|
||||||
- dirmngr :: The dirmngr component
|
- dirmngr :: The dirmngr component
|
||||||
|
- wks :: The web key service tools
|
||||||
|
- tools :: Other code in tools
|
||||||
- w32 :: Windows related code
|
- w32 :: Windows related code
|
||||||
- po :: Translations
|
- po :: Translations
|
||||||
- build :: Changes to the build system
|
- build :: Changes to the build system
|
||||||
|
@ -291,11 +291,10 @@ get_key (estream_t *r_key, const char *fingerprint, const char *addrspec)
|
|||||||
{
|
{
|
||||||
gpg_error_t err;
|
gpg_error_t err;
|
||||||
ccparray_t ccp;
|
ccparray_t ccp;
|
||||||
const char **argv;
|
const char **argv = NULL;
|
||||||
estream_t key;
|
estream_t key = NULL;
|
||||||
struct get_key_status_parm_s parm;
|
struct get_key_status_parm_s parm;
|
||||||
|
char *filterexp = NULL;
|
||||||
(void)addrspec; /* FIXME - need to use it. */
|
|
||||||
|
|
||||||
memset (&parm, 0, sizeof parm);
|
memset (&parm, 0, sizeof parm);
|
||||||
|
|
||||||
@ -306,7 +305,15 @@ get_key (estream_t *r_key, const char *fingerprint, const char *addrspec)
|
|||||||
{
|
{
|
||||||
err = gpg_error_from_syserror ();
|
err = gpg_error_from_syserror ();
|
||||||
log_error ("error allocating memory buffer: %s\n", gpg_strerror (err));
|
log_error ("error allocating memory buffer: %s\n", gpg_strerror (err));
|
||||||
return err;
|
goto leave;
|
||||||
|
}
|
||||||
|
|
||||||
|
filterexp = es_bsprintf ("keep-uid=mbox = %s", addrspec);
|
||||||
|
if (!filterexp)
|
||||||
|
{
|
||||||
|
err = gpg_error_from_syserror ();
|
||||||
|
log_error ("error allocating memory buffer: %s\n", gpg_strerror (err));
|
||||||
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
ccparray_init (&ccp, 0);
|
ccparray_init (&ccp, 0);
|
||||||
@ -321,6 +328,8 @@ get_key (estream_t *r_key, const char *fingerprint, const char *addrspec)
|
|||||||
ccparray_put (&ccp, "--always-trust");
|
ccparray_put (&ccp, "--always-trust");
|
||||||
ccparray_put (&ccp, "--armor");
|
ccparray_put (&ccp, "--armor");
|
||||||
ccparray_put (&ccp, "--export-options=export-minimal");
|
ccparray_put (&ccp, "--export-options=export-minimal");
|
||||||
|
ccparray_put (&ccp, "--export-filter");
|
||||||
|
ccparray_put (&ccp, filterexp);
|
||||||
ccparray_put (&ccp, "--export");
|
ccparray_put (&ccp, "--export");
|
||||||
ccparray_put (&ccp, "--");
|
ccparray_put (&ccp, "--");
|
||||||
ccparray_put (&ccp, fingerprint);
|
ccparray_put (&ccp, fingerprint);
|
||||||
@ -353,6 +362,7 @@ get_key (estream_t *r_key, const char *fingerprint, const char *addrspec)
|
|||||||
leave:
|
leave:
|
||||||
es_fclose (key);
|
es_fclose (key);
|
||||||
xfree (argv);
|
xfree (argv);
|
||||||
|
xfree (filterexp);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -388,7 +398,6 @@ command_send (const char *fingerprint, char *userid)
|
|||||||
err = get_key (&key, fingerprint, addrspec);
|
err = get_key (&key, fingerprint, addrspec);
|
||||||
if (err)
|
if (err)
|
||||||
goto leave;
|
goto leave;
|
||||||
log_debug ("fixme: Check that the key has the requested user-id.\n");
|
|
||||||
|
|
||||||
/* Get the submission address. */
|
/* Get the submission address. */
|
||||||
err = wkd_get_submission_address (addrspec, &submission_to);
|
err = wkd_get_submission_address (addrspec, &submission_to);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user