



@deftypefun {int} {gnutls_openpgp_crt_get_subkey_usage} (gnutls_openpgp_crt_t @var{key}, unsigned int @var{idx}, unsigned int * @var{key_usage})
@var{key}: should contain a gnutls_openpgp_crt_t type

@var{idx}: the subkey index

@var{key_usage}: where the key usage bits will be stored

This function will return certificate's key usage, by checking the
key algorithm.  The key usage value will ORed values of
@code{GNUTLS_KEY_DIGITAL_SIGNATURE}  or @code{GNUTLS_KEY_KEY_ENCIPHERMENT} .

A negative error code may be returned in case of parsing error.

@strong{Returns:} key usage value.

@strong{Since:} 2.4.0
@end deftypefun
