



@deftypefun {int} {gnutls_x509_key_purpose_get} (gnutls_x509_key_purposes_t @var{p}, unsigned @var{idx}, gnutls_datum_t * @var{oid})
@var{p}: The key purposes

@var{idx}: The index of the key purpose to retrieve

@var{oid}: Will hold the object identifier of the key purpose (to be treated as constant)

This function will retrieve the specified by the index key purpose in the
purposes type. The object identifier will be a null terminated string.

@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, @code{GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE} 
if the index is out of bounds, otherwise a negative error value.

@strong{Since:} 3.3.0
@end deftypefun
