Blame doc/functions/gnutls_x509_crt_get_extension_info

Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
@deftypefun {int} {gnutls_x509_crt_get_extension_info} (gnutls_x509_crt_t @var{cert}, unsigned @var{indx}, void * @var{oid}, size_t * @var{oid_size}, unsigned int * @var{critical})
Packit aea12f
@var{cert}: should contain a @code{gnutls_x509_crt_t}  type
Packit aea12f
Packit aea12f
@var{indx}: Specifies which extension OID to send. Use (0) to get the first one.
Packit aea12f
Packit aea12f
@var{oid}: a pointer to a structure to hold the OID
Packit aea12f
Packit aea12f
@var{oid_size}: initially holds the maximum size of  @code{oid} , on return
Packit aea12f
holds actual size of  @code{oid} .
Packit aea12f
Packit aea12f
@var{critical}: output variable with critical flag, may be NULL.
Packit aea12f
Packit aea12f
This function will return the requested extension OID in the
Packit aea12f
certificate, and the critical flag for it.  The extension OID will
Packit aea12f
be stored as a string in the provided buffer.  Use
Packit aea12f
@code{gnutls_x509_crt_get_extension()}  to extract the data.
Packit aea12f
Packit aea12f
If the buffer provided is not long enough to hold the output, then
Packit aea12f
 @code{oid_size} is updated and @code{GNUTLS_E_SHORT_MEMORY_BUFFER}  will be
Packit Service 991b93
returned. The  @code{oid} returned will be null terminated, although
Packit aea12f
 @code{oid_size} will not account for the trailing null (the latter is not
Packit aea12f
true for GnuTLS prior to 3.6.0).
Packit aea12f
Packit aea12f
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned,
Packit aea12f
otherwise a negative error code is returned.  If you have reached the
Packit aea12f
last extension available @code{GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE} 
Packit aea12f
will be returned.
Packit aea12f
@end deftypefun