diff options
| -rw-r--r-- | NEWS | 5 | ||||
| -rw-r--r-- | doc/ChangeLog | 2 | ||||
| -rw-r--r-- | doc/gpgme.texi | 7 | ||||
| -rw-r--r-- | gpgme/ChangeLog | 6 | ||||
| -rw-r--r-- | gpgme/gpgme.h | 10 | ||||
| -rw-r--r-- | gpgme/keylist.c | 12 | 
6 files changed, 40 insertions, 2 deletions
| @@ -4,9 +4,14 @@ Noteworthy changes in version 0.4.3 (unreleased)   * gpgme_get_key fails with GPG_ERR_AMBIGUOUS_NAME if the key ID     provided was not unique, instead returning the first matching key. + * gpgme_key_t and gpgme_subkey_t have a new field, can_authenticate, +   that indicates if the key can be used for authentication. +   * Interface changes relative to the 0.4.3 release:  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  gpgme_get_key			CHANGED: Fails correctly if key ID not unique. +gpgme_key_t			EXTENDED: New field can_authenticate. +gpgme_subkey_t			EXTENDED: New field can_authenticate.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/ChangeLog b/doc/ChangeLog index 60336a8f..b06ffd72 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,5 +1,7 @@  2003-07-31  Marcus Brinkmann  <[email protected]> +	* gpgme.texi (Key Management): Add can_authenticate flag. +  	* gpgme.texi (Listing Keys): Document GPG_ERR_AMBIGUOUS_NAME for  	gpgme_get_key. diff --git a/doc/gpgme.texi b/doc/gpgme.texi index 4a97e8de..018102b2 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -2023,6 +2023,9 @@ This is true if the subkey can be used to create data signatures.  @item unsigned int can_certify : 1  This is true if the subkey can be used to create key certificates. +@item unsigned int can_authenticate : 1 +This is true if the subkey can be used for authentication. +  @item unsigned int secret : 1  This is true if the subkey is a secret key. @@ -2181,6 +2184,10 @@ data signatures.  This is true if the key (ie one of its subkeys) can be used to create  key certificates. +@item unsigned int can_authenticate : 1 +This is true if the key (ie one of its subkeys) can be used for +authentication. +  @item unsigned int secret : 1  This is true if the key is a secret key. diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 7108693f..eaa9b8a8 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,5 +1,11 @@  2003-07-31  Marcus Brinkmann  <[email protected]> +	* gpgme.h (struct _gpgme_subkey): Add flag CAN_AUTHENTICATE. +	Lower _UNUSED to 23 bits. +	(struct _gpgme_key): Likewise. +	* keylist.c (set_mainkey_capability): Support 'a' and 'A'. +	(set_subkey_capability): Support 'a'. +  	* keylist.c (gpgme_get_key): Check if there is more than one key  	listed, and return GPG_ERR_AMBIGUOUS_NAME in that case. diff --git a/gpgme/gpgme.h b/gpgme/gpgme.h index 42b4ec2b..2320f900 100644 --- a/gpgme/gpgme.h +++ b/gpgme/gpgme.h @@ -421,8 +421,11 @@ struct _gpgme_subkey    /* True if subkey is secret.  */    unsigned int secret : 1; +  /* True if subkey can be used for authentication.  */ +  unsigned int can_authenticate : 1; +    /* Internal to GPGME, do not use.  */ -  unsigned int _unused : 24; +  unsigned int _unused : 23;    /* Public key algorithm supported by this subkey.  */    gpgme_pubkey_algo_t pubkey_algo; @@ -572,8 +575,11 @@ struct _gpgme_key    /* True if key is secret.  */    unsigned int secret : 1; +  /* True if key can be used for authentication.  */ +  unsigned int can_authenticate : 1; +    /* Internal to GPGME, do not use.  */ -  unsigned int _unused : 24; +  unsigned int _unused : 23;    /* This is the protocol supported by this key.  */    gpgme_protocol_t protocol; diff --git a/gpgme/keylist.c b/gpgme/keylist.c index c47f3865..07c9385c 100644 --- a/gpgme/keylist.c +++ b/gpgme/keylist.c @@ -245,6 +245,10 @@ set_mainkey_capability (gpgme_key_t key, const char *src)  	  key->subkeys->can_certify = 1;  	  break; +	case 'a': +	  key->subkeys->can_authenticate = 1; +	  break; +          case 'd':          case 'D':            /* Note, that this flag is also set using the key validity @@ -266,6 +270,10 @@ set_mainkey_capability (gpgme_key_t key, const char *src)  	case 'C':  	  key->can_certify = 1;  	  break; + +	case 'A': +	  key->can_authenticate = 1; +	  break;          }        src++;      } @@ -290,6 +298,10 @@ set_subkey_capability (gpgme_subkey_t subkey, const char *src)  	case 'c':  	  subkey->can_certify = 1;  	  break; + +	case 'a': +	  subkey->can_authenticate = 1; +	  break;          }        src++;      } | 
