Blame doc/functions/gnutls_x509_crt_get_name_constraints

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