Blame doc/functions/gnutls_x509_crt_set_dn_by_oid

Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
@deftypefun {int} {gnutls_x509_crt_set_dn_by_oid} (gnutls_x509_crt_t @var{crt}, const char * @var{oid}, unsigned int @var{raw_flag}, const void * @var{name}, unsigned int @var{sizeof_name})
Packit aea12f
@var{crt}: a certificate of type @code{gnutls_x509_crt_t} 
Packit aea12f
Packit aea12f
@var{oid}: holds an Object Identifier in a null terminated string
Packit aea12f
Packit aea12f
@var{raw_flag}: must be 0, or 1 if the data are DER encoded
Packit aea12f
Packit aea12f
@var{name}: a pointer to the name
Packit aea12f
Packit aea12f
@var{sizeof_name}: holds the size of  @code{name} 
Packit aea12f
Packit aea12f
This function will set the part of the name of the Certificate
Packit aea12f
subject, specified by the given OID. The input string should be
Packit aea12f
ASCII or UTF-8 encoded.
Packit aea12f
Packit aea12f
Some helper macros with popular OIDs can be found in gnutls/x509.h
Packit aea12f
With this function you can only set the known OIDs. You can test
Packit aea12f
for known OIDs using @code{gnutls_x509_dn_oid_known()} . For OIDs that are
Packit aea12f
not known (by gnutls) you should properly DER encode your data,
Packit aea12f
and call this function with  @code{raw_flag} set.
Packit aea12f
Packit aea12f
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, otherwise a
Packit aea12f
negative error value.
Packit aea12f
@end deftypefun