



@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 structure

@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 structure.

@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
