Fix a parsing bug in gpgconf interface.
Maintainer: Marcus Brinkmann <marcus@g10code.com>
Bug reports: bug-gpgme@gnupg.org
Security related bug reports: security@gnupg.org
-License: LGPLv2.1+
+License (software): LGPLv2.1+
+License (manual): GPLv3+
FSF <gnu@gnu.org>
The test is currently disabled there and in gpg/t-import.
** When gpg supports it, write binary subpackets directly,
and parse SUBPACKET status lines.
+** A few months after 1.1.7:
+ Remove GPGME_CONF_PATHNAME macro.
* ABI's to break:
** gpgme_edit_cb_t: Add "processed" return argument
+2008-06-05 Werner Koch <wk@g10code.com>
+
+ * uiserver.texi (Miscellaneous UI Server Commands): Describe
+ START_CONFDIALOG.
+
2008-06-04 Werner Koch <wk@g10code.com>
* gpgme.texi: Use @copying command. Change license to
@noindent
-GpgOL features a button to invoke the certificate manager. To do this
-it uses the Assuan command:
+A client may want to fire up the certificate manager of the server. To
+do this it uses the Assuan command:
@deffn Command START_KEYMANAGER
The server shall pop up the main window of the key manager (aka
wait until the key manager has been fully brought up).
@end deffn
+@noindent
+A client may want to fire up the configuration dialog of the server. To
+do this it uses the Assuan command:
+
+@deffn Command START_CONFDIALOG
+The server shall pop up its configuration dialog. The client expects
+that this dialog is brought into the foregound and that this command
+immediatley returns (i.e. it does not wait until the dialog has been
+fully brought up).
+@end deffn
+
@anchor{command SENDER}
@noindent
When doing an operation on a mail, it is useful to let the server know
+2008-06-19 Werner Koch <wk@g10code.com>
+
+ * gpgme.h (GPGME_CONF_PATHNAME): Replace by GPGME_CONF_FILENAME,
+ change all callers and provide compatibilty macro.
+ (gpgme_conf_type_t): Add complex types 34..37.
+ * engine-gpgconf.c (gpgconf_parse_option, arg_to_data)
+ (_gpgme_conf_arg_new, _gpgme_conf_arg_release): Add new types.
+
+2008-06-19 Marcus Brinkmann <marcus@g10code.de>
+
+ * engine-gpgconf.c (gpgconf_parse_option): Fix comma detection.
+
2008-05-09 Werner Koch <wk@g10code.com>
* engine-gpgconf.c (gpgconf_read): Do not pass empty lines to the
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
#if HAVE_CONFIG_H
#include <config.h>
if (!line[0])
return 0;
- mark = strchr (line, ',');
- if (mark)
- *mark = '\0';
-
while (line)
{
- gpgme_conf_arg_t arg = calloc (1, sizeof (*arg));
+ gpgme_conf_arg_t arg;
+
+ mark = strchr (line, ',');
+ if (mark)
+ *mark = '\0';
+
+ arg = calloc (1, sizeof (*arg));
if (!arg)
return gpg_error_from_syserror ();
*arg_p = arg;
break;
case GPGME_CONF_STRING:
- case GPGME_CONF_PATHNAME:
- case GPGME_CONF_LDAP_SERVER:
+ /* The complex types below are only here to silent the
+ compiler warning. */
+ case GPGME_CONF_FILENAME:
+ case GPGME_CONF_LDAP_SERVER:
+ case GPGME_CONF_KEY_FPR:
+ case GPGME_CONF_PUB_KEY:
+ case GPGME_CONF_SEC_KEY:
+ case GPGME_CONF_ALIAS_LIST:
/* Skip quote character. */
line++;
arg->no_arg = 1;
else
{
+ /* We need to switch on type here because the alt-type is not
+ yet known. */
switch (type)
{
case GPGME_CONF_NONE:
break;
case GPGME_CONF_STRING:
- case GPGME_CONF_PATHNAME:
+ case GPGME_CONF_FILENAME:
case GPGME_CONF_LDAP_SERVER:
+ case GPGME_CONF_KEY_FPR:
+ case GPGME_CONF_PUB_KEY:
+ case GPGME_CONF_SEC_KEY:
+ case GPGME_CONF_ALIAS_LIST:
arg->value.string = strdup (value);
if (!arg->value.string)
{
void
_gpgme_conf_arg_release (gpgme_conf_arg_t arg, gpgme_conf_type_t type)
{
+ /* Lacking the alt_type we need to switch on type here. */
switch (type)
{
case GPGME_CONF_NONE:
default:
break;
- case GPGME_CONF_PATHNAME:
+ case GPGME_CONF_FILENAME:
case GPGME_CONF_LDAP_SERVER:
+ case GPGME_CONF_KEY_FPR:
+ case GPGME_CONF_PUB_KEY:
+ case GPGME_CONF_SEC_KEY:
+ case GPGME_CONF_ALIAS_LIST:
type = GPGME_CONF_STRING;
break;
}
buf[sizeof (buf) - 1] = '\0';
amt = gpgme_data_write (conf, buf, strlen (buf));
break;
-
+
+
case GPGME_CONF_STRING:
- case GPGME_CONF_PATHNAME:
- case GPGME_CONF_LDAP_SERVER:
+ /* The complex types below are only here to silent the
+ compiler warning. */
+ case GPGME_CONF_FILENAME:
+ case GPGME_CONF_LDAP_SERVER:
+ case GPGME_CONF_KEY_FPR:
+ case GPGME_CONF_PUB_KEY:
+ case GPGME_CONF_SEC_KEY:
+ case GPGME_CONF_ALIAS_LIST:
/* One quote character, and three times to allow
for percent escaping. */
{
unsigned int flags);
\f
-/* Interface to gpg-conf. */
+/* Interface to gpgconf(1). */
/* The expert level at which a configuration option or group of
- options should be displayed. See the gpg-conf documentation for
+ options should be displayed. See the gpgconf(1) documentation for
more details. */
typedef enum
{
gpgme_conf_level_t;
-/* The data type of a configuration option argument. See the gpg-conf
+/* The data type of a configuration option argument. See the gpgconf(1)
documentation for more details. */
typedef enum
{
GPGME_CONF_UINT32 = 3,
/* Complex types. */
- GPGME_CONF_PATHNAME = 32,
- GPGME_CONF_LDAP_SERVER = 33
+ GPGME_CONF_FILENAME = 32,
+ GPGME_CONF_LDAP_SERVER = 33,
+ GPGME_CONF_KEY_FPR = 34,
+ GPGME_CONF_PUB_KEY = 35,
+ GPGME_CONF_SEC_KEY = 36,
+ GPGME_CONF_ALIAS_LIST = 37
}
gpgme_conf_type_t;
+/* Macro for backward compatibility (even though it was undocumented
+ and marked as experimental in 1.1.6 - will be removed after 1.1.7): */
+#define GPGME_CONF_PATHNAME GPGME_CONF_FILENAME
/* This represents a single argument for a configuration option.