From: Werner Koch Date: Wed, 18 Mar 2009 11:19:29 +0000 (+0000) Subject: Add GPGME_KEYLIST_MODE_EPHEMERAL. X-Git-Tag: gpgme-1.3.0~87 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=aceb60d4dd12bac405c4fa670e772965903ed04d;p=gpgme.git Add GPGME_KEYLIST_MODE_EPHEMERAL. --- diff --git a/NEWS b/NEWS index 3999bbb..05d14f1 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ Noteworthy changes in version 1.1.9 * Interface changes relative to the 1.1.7 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + GPGME_KEYLIST_MODE_EPHEMERAL NEW. GPGME_PROTOCOL_ASSUAN NEW. gpgme_assuan_data_cb_t NEW. gpgme_assuan_inquire_cb_t NEW. diff --git a/doc/gpgme.texi b/doc/gpgme.texi index 5ff92a7..ae6ede0 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -2208,6 +2208,10 @@ signature notations on key signatures should be included in the listed keys. This only works if @code{GPGME_KEYLIST_MODE_SIGS} is also enabled. +@item GPGME_KEYLIST_MODE_EPHEMERAL +The @code{GPGME_KEYLIST_MODE_EPHEMERAL} symbol specifies that keys +flagged as ephemeral are included in the listing. + @item GPGME_KEYLIST_MODE_VALIDATE The @code{GPGME_KEYLIST_MODE_VALIDATE} symbol specifies that the backend should do key or certificate validation and not just get the diff --git a/src/ChangeLog b/src/ChangeLog index a9b2ed1..307543a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-03-18 Werner Koch + + * gpgme.h.in (GPGME_KEYLIST_MODE_EPHEMERAL): New. + * engine-gpgsm.c (gpgsm_keylist): Send new option. + 2009-03-13 Werner Koch * gpgme-config.in: Make sure locale is set to C. diff --git a/src/engine-gpgsm.c b/src/engine-gpgsm.c index 7179b3c..bdd1ff9 100644 --- a/src/engine-gpgsm.c +++ b/src/engine-gpgsm.c @@ -1,6 +1,6 @@ /* engine-gpgsm.c - GpgSM engine. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2009 g10 Code GmbH This file is part of GPGME. @@ -1575,13 +1575,20 @@ gpgsm_keylist (void *engine, const char *pattern, int secret_only, /* Always send key validation because RESET does not reset it. */ - /* Use the validation mode if required. We don't check for an error + /* Use the validation mode if requested. We don't check for an error yet because this is a pretty fresh gpgsm features. */ gpgsm_assuan_simple_command (gpgsm->assuan_ctx, (mode & GPGME_KEYLIST_MODE_VALIDATE)? "OPTION with-validation=1": "OPTION with-validation=0" , NULL, NULL); + /* Include the ephemeral keys if requested. We don't check for an error + yet because this is a pretty fresh gpgsm features. */ + gpgsm_assuan_simple_command (gpgsm->assuan_ctx, + (mode & GPGME_KEYLIST_MODE_EPHEMERAL)? + "OPTION with-ephemeral-keys=1": + "OPTION with-ephemeral-keys=0" , + NULL, NULL); /* Length is "LISTSECRETKEYS " + p + '\0'. */ diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 2538aaf..65823a6 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -312,6 +312,7 @@ gpgme_protocol_t; #define GPGME_KEYLIST_MODE_EXTERN 2 #define GPGME_KEYLIST_MODE_SIGS 4 #define GPGME_KEYLIST_MODE_SIG_NOTATIONS 8 +#define GPGME_KEYLIST_MODE_EPHEMERAL 128 #define GPGME_KEYLIST_MODE_VALIDATE 256 typedef unsigned int gpgme_keylist_mode_t;