Blame doc/functions/gnutls_x509_ext_import_name_constraints

Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
@deftypefun {int} {gnutls_x509_ext_import_name_constraints} (const gnutls_datum_t * @var{ext}, gnutls_x509_name_constraints_t @var{nc}, unsigned int @var{flags})
Packit aea12f
@var{ext}: a DER encoded extension
Packit aea12f
Packit aea12f
@var{nc}: The nameconstraints
Packit aea12f
Packit aea12f
@var{flags}: zero or @code{GNUTLS_NAME_CONSTRAINTS_FLAG_APPEND} 
Packit aea12f
Packit aea12f
This function will return an intermediate type containing
Packit aea12f
the name constraints of the provided NameConstraints extension. That
Packit aea12f
can be used in combination with @code{gnutls_x509_name_constraints_check()} 
Packit aea12f
to verify whether a server's name is in accordance with the constraints.
Packit aea12f
Packit aea12f
When the  @code{flags} is set to @code{GNUTLS_NAME_CONSTRAINTS_FLAG_APPEND} , then if 
Packit aea12f
the  @code{nc} type is empty this function will behave identically as if the flag was not set.
Packit aea12f
Otherwise if there are elements in the  @code{nc} structure then the
Packit aea12f
constraints will be merged with the existing constraints following
Packit aea12f
RFC5280 p6.1.4 (excluded constraints will be appended, permitted
Packit aea12f
will be intersected).
Packit aea12f
Packit aea12f
Note that  @code{nc} must be initialized prior to calling this function.
Packit aea12f
Packit aea12f
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, @code{GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE} 
Packit aea12f
if the extension is not present, otherwise a negative error value.
Packit aea12f
Packit aea12f
@strong{Since:} 3.3.0
Packit aea12f
@end deftypefun