Blame doc/functions/gnutls_x509_crt_get_dn_by_oid

Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
@deftypefun {int} {gnutls_x509_crt_get_dn_by_oid} (gnutls_x509_crt_t @var{cert}, const char * @var{oid}, unsigned @var{indx}, unsigned int @var{raw_flag}, void * @var{buf}, size_t * @var{buf_size})
Packit Service 4684c1
@var{cert}: should contain a @code{gnutls_x509_crt_t}  type
Packit Service 4684c1
Packit Service 4684c1
@var{oid}: holds an Object Identified in null terminated string
Packit Service 4684c1
Packit Service 4684c1
@var{indx}: In case multiple same OIDs exist in the RDN, this specifies which to send. Use (0) to get the first one.
Packit Service 4684c1
Packit Service 4684c1
@var{raw_flag}: If non-zero returns the raw DER data of the DN part.
Packit Service 4684c1
Packit Service 4684c1
@var{buf}: a pointer where the DN part will be copied (may be null).
Packit Service 4684c1
Packit Service 4684c1
@var{buf_size}: initially holds the size of  @code{buf} 
Packit Service 4684c1
Packit Service 4684c1
This function will extract the part of the name of the Certificate
Packit Service 4684c1
subject specified by the given OID. The output, if the raw flag is
Packit Service 4684c1
not used, will be encoded as described in RFC4514. Thus a string
Packit Service 4684c1
that is ASCII or UTF-8 encoded, depending on the certificate data.
Packit Service 4684c1
Packit Service 4684c1
Some helper macros with popular OIDs can be found in gnutls/x509.h
Packit Service 4684c1
If raw flag is (0), this function will only return known OIDs as
Packit Service 4684c1
text. Other OIDs will be DER encoded, as described in RFC4514 --
Packit Service 4684c1
in hex format with a '#' prefix.  You can check about known OIDs
Packit Service 4684c1
using @code{gnutls_x509_dn_oid_known()} .
Packit Service 4684c1
Packit Service 4684c1
If  @code{buf} is null then only the size will be filled. If the  @code{raw_flag} is not specified the output is always null terminated, although the
Packit Service 4684c1
 @code{buf_size} will not include the null character.
Packit Service 4684c1
Packit Service 4684c1
@strong{Returns:} @code{GNUTLS_E_SHORT_MEMORY_BUFFER}  if the provided buffer is not
Packit Service 4684c1
long enough, and in that case the  @code{buf_size} will be updated with
Packit Service 4684c1
the required size. @code{GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE}  if there
Packit Service 4684c1
are no data in the current index. On success 0 is returned.
Packit Service 4684c1
@end deftypefun