Next: Manipulating Keys, Previous: Information About Keys, Up: Key Management [Contents][Index]
The following interfaces are deprecated and only provided for backward compatibility. Don’t use them. They will be removed in a future version of GPGME.
The signatures on a key are only available if the key was retrieved
via a listing operation with the GPGME_KEYLIST_MODE_SIGS
mode
enabled, because it is expensive to retrieve all signatures of a key.
So, before using the below interfaces to retrieve the signatures on a
key, you have to make sure that the key was listed with signatures
enabled. One convenient, but blocking, way to do this is to use the
function gpgme_get_key
.
The gpgme_attr_t
type is used to specify a key signature
attribute. The following attributes are defined:
GPGME_ATTR_KEYID
This is the key ID of the key which was used for the signature. It is representable as a string.
GPGME_ATTR_ALGO
This is the crypto algorithm used to create the signature. It is
representable as a string and as a number. The numbers correspond to
the enum gcry_pk_algos
values in the gcrypt library.
GPGME_ATTR_CREATED
This is the timestamp at creation time of the signature. It is representable as a number.
GPGME_ATTR_EXPIRE
This is the expiration time of the signature. It is representable as a number.
GPGME_ATTR_USERID
This is the user ID associated with the signing key. The user ID is representable as a number.
GPGME_ATTR_NAME
This is the name belonging to a user ID. It is representable as a string.
GPGME_ATTR_EMAIL
This is the email address belonging to a user ID. It is representable as a string.
GPGME_ATTR_COMMENT
This is the comment belonging to a user ID. It is representable as a string.
GPGME_ATTR_KEY_REVOKED
This specifies if a key signature is a revocation signature. It is
representable as a number, and is 1
if the key is revoked, and
0
otherwise.
GPGME_ATTR_SIG_CLASS
This specifies the signature class of a key signature. It is representable as a number. The meaning is specific to the crypto engine.
GPGME_ATTR_SIG_CLASS
This specifies the signature class of a key signature. It is representable as a number. The meaning is specific to the crypto engine.
GPGME_ATTR_SIG_STATUS
This is the same value as returned by gpgme_get_sig_status
.
The function gpgme_key_sig_get_string_attr
returns the value of
the string-representable attribute what of the signature
idx on the user ID uid_idx in the key key. The
argument reserved is reserved for later use and should be
NULL
.
The string returned is only valid as long as the key is valid.
The function returns 0
if an attribute can’t be returned as a
string, key is not a valid pointer, uid_idx or idx
out of range, or reserved not NULL
.
The function gpgme_key_sig_get_ulong_attr
returns the value of
the number-representable attribute what of the signature
idx on the user ID uid_idx in the key key. The
argument reserved is reserved for later use and should be
NULL
.
The function returns 0
if an attribute can’t be returned as a
string, key is not a valid pointer, uid_idx or idx
out of range, or reserved not NULL
.
Next: Manipulating Keys, Previous: Information About Keys, Up: Key Management [Contents][Index]