* 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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2003-07-31 Marcus Brinkmann <marcus@g10code.de>
+ * gpgme.texi (Key Management): Add can_authenticate flag.
+
* gpgme.texi (Listing Keys): Document GPG_ERR_AMBIGUOUS_NAME for
gpgme_get_key.
@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.
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.
2003-07-31 Marcus Brinkmann <marcus@g10code.de>
+ * 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.
/* 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;
/* 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;
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
case 'C':
key->can_certify = 1;
break;
+
+ case 'A':
+ key->can_authenticate = 1;
+ break;
}
src++;
}
case 'c':
subkey->can_certify = 1;
break;
+
+ case 'a':
+ subkey->can_authenticate = 1;
+ break;
}
src++;
}