Blame doc/functions/gnutls_x509_crt_get_basic_constraints

Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
@deftypefun {int} {gnutls_x509_crt_get_basic_constraints} (gnutls_x509_crt_t @var{cert}, unsigned int * @var{critical}, unsigned int * @var{ca}, int * @var{pathlen})
Packit aea12f
@var{cert}: should contain a @code{gnutls_x509_crt_t}  type
Packit aea12f
Packit aea12f
@var{critical}: will be non-zero if the extension is marked as critical
Packit aea12f
Packit aea12f
@var{ca}: pointer to output integer indicating CA status, may be NULL,
Packit aea12f
value is 1 if the certificate CA flag is set, 0 otherwise.
Packit aea12f
Packit aea12f
@var{pathlen}: pointer to output integer indicating path length (may be
Packit aea12f
NULL), non-negative error codes indicate a present pathLenConstraint
Packit aea12f
field and the actual value, -1 indicate that the field is absent.
Packit aea12f
Packit aea12f
This function will read the certificate's basic constraints, and
Packit aea12f
return the certificates CA status.  It reads the basicConstraints
Packit aea12f
X.509 extension (2.5.29.19).
Packit aea12f
Packit aea12f
@strong{Returns:} If the certificate is a CA a positive value will be
Packit aea12f
returned, or (0) if the certificate does not have CA flag set.  A
Packit aea12f
negative error code may be returned in case of errors.  If the
Packit aea12f
certificate does not contain the basicConstraints extension
Packit aea12f
GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned.
Packit aea12f
@end deftypefun