2004-05-21  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Key Management): Add note about new field
	keylist_mode of gpgme_key_t.

gpgme/
2004-05-21  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h (struct _gpgme_key): New member keylist_mode.
	* keylist.c (keylist_colon_handler): Set the keylist_mode of KEY.
This commit is contained in:
Marcus Brinkmann 2004-05-21 15:15:21 +00:00
parent 54f9887cf6
commit 6aeee0426a
7 changed files with 46 additions and 10 deletions

11
NEWS
View File

@ -1,3 +1,14 @@
Noteworthy changes in version 0.9.0 (unreleased)
------------------------------------------------
* The type gpgme_key_t has now a new field keylist_mode that contains
the keylist mode that was active at the time the key was retrieved.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_key_t EXTENDED: New field keylist_mode.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.4.7 (2004-04-29) Noteworthy changes in version 0.4.7 (2004-04-29)
------------------------------------------------ ------------------------------------------------

4
TODO
View File

@ -8,6 +8,10 @@ Hey Emacs, this is -*- outline -*- mode!
* ABI's to break: * ABI's to break:
** I/O and User Data could be made extensible. But this can be done ** I/O and User Data could be made extensible. But this can be done
without breaking the ABI hopefully. without breaking the ABI hopefully.
** gpgme_keylist_mode_t should not be an enum. Maybe some other values
should also not be an enum. All enums that should be enums need to
have a maximum value to ensure a certain minimum width for
extensibility.
** Compatibility interfaces that can be removed in future versions: ** Compatibility interfaces that can be removed in future versions:
*** ath compatibility modules. *** ath compatibility modules.
*** gpgme_data_new_from_filepart *** gpgme_data_new_from_filepart

View File

@ -1,3 +1,8 @@
2004-05-21 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Key Management): Add note about new field
keylist_mode of gpgme_key_t.
2004-04-29 Marcus Brinkmann <marcus@g10code.de> 2004-04-29 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Verify): Correct type of member wrong_key_usage. * gpgme.texi (Verify): Correct type of member wrong_key_usage.

View File

@ -2348,6 +2348,9 @@ The @code{gpgme_key_t} type is a pointer to a key object. It has the
following members: following members:
@table @code @table @code
@item unsigned int keylist_mode
The keylist mode that was active when the key was retrieved.
@item unsigned int revoked : 1 @item unsigned int revoked : 1
This is true if the key is revoked. This is true if the key is revoked.

View File

@ -1,3 +1,8 @@
2004-05-21 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (struct _gpgme_key): New member keylist_mode.
* keylist.c (keylist_colon_handler): Set the keylist_mode of KEY.
2004-04-29 Marcus Brinkmann <marcus@g10code.de> 2004-04-29 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (struct _gpgme_signature): Change member WRONG_KEY_USAGE * gpgme.h (struct _gpgme_signature): Change member WRONG_KEY_USAGE

View File

@ -304,6 +304,17 @@ typedef enum
} }
gpgme_protocol_t; gpgme_protocol_t;
/* The available keylist mode flags. */
typedef enum
{
GPGME_KEYLIST_MODE_LOCAL = 1,
GPGME_KEYLIST_MODE_EXTERN = 2,
GPGME_KEYLIST_MODE_SIGS = 4,
GPGME_KEYLIST_MODE_VALIDATE = 256
}
gpgme_keylist_mode_t;
/* The possible stati for the edit operation. */ /* The possible stati for the edit operation. */
typedef enum typedef enum
@ -639,6 +650,12 @@ struct _gpgme_key
/* Internal to GPGME, do not use. */ /* Internal to GPGME, do not use. */
gpgme_user_id_t _last_uid; gpgme_user_id_t _last_uid;
/* The keylist mode that was active when listing the key. */
/* Implementation note: We are using unsigned int here, and not
gpgme_keylist_mode_t, as the latter is currently an enum of
unknown size. */
unsigned int keylist_mode;
}; };
typedef struct _gpgme_key *gpgme_key_t; typedef struct _gpgme_key *gpgme_key_t;
@ -697,16 +714,6 @@ void gpgme_set_include_certs (gpgme_ctx_t ctx, int nr_of_certs);
/* Return the number of certs to include in an S/MIME message. */ /* Return the number of certs to include in an S/MIME message. */
int gpgme_get_include_certs (gpgme_ctx_t ctx); int gpgme_get_include_certs (gpgme_ctx_t ctx);
/* The available keylist mode flags. */
typedef enum
{
GPGME_KEYLIST_MODE_LOCAL = 1,
GPGME_KEYLIST_MODE_EXTERN = 2,
GPGME_KEYLIST_MODE_SIGS = 4,
GPGME_KEYLIST_MODE_VALIDATE = 256
}
gpgme_keylist_mode_t;
/* Set keylist mode in CTX to MODE. */ /* Set keylist mode in CTX to MODE. */
gpgme_error_t gpgme_set_keylist_mode (gpgme_ctx_t ctx, gpgme_error_t gpgme_set_keylist_mode (gpgme_ctx_t ctx,
gpgme_keylist_mode_t mode); gpgme_keylist_mode_t mode);

View File

@ -430,6 +430,7 @@ keylist_colon_handler (void *priv, char *line)
err = _gpgme_key_new (&key); err = _gpgme_key_new (&key);
if (err) if (err)
return err; return err;
key->keylist_mode = ctx->keylist_mode;
err = _gpgme_key_add_subkey (key, &subkey); err = _gpgme_key_add_subkey (key, &subkey);
if (err) if (err)
{ {