NPKIT_x509BasicConstraintsInfo

Retrieves the details about the Basic Constraints extension, if the extension exists on the certificate (formerly NWx509BasicConstraintsInfo).

Syntax

   #include "NPKIT_x509.h"
   
   NWRCODE NPKIT_x509BasicConstraintsInfo
   (
      NPKIT_x509Context     context, 
      nuint8 const        **cA,
      nuint32 const       **pathLenConstraint
   ); 
   

Parameters

context
(IN) Specifies the NPKIT_x509 context handle for the request. This is a nuint32 value.
cA
(OUT) Points to the value cA as encoded in the extension. If this value is zero, the certificate is not for a CA. If the value is non-zero, the certificate is for a CA. For more information, see the Section 4.1, Basic Constraints Extension Values.
pathLenConstraint
(OUT) Points to the value pathLenConstraint as encoded in the extension. This value represents the number of levels of CAs that this Certificate Authority is authorized to create. The value -1 is returned if there is no constraint. For more information, see the Section 4.1, Basic Constraints Extension Values.

Return Values

Returns 0 if successful, or a PKI error code if not successful. For a listing of NPKIT error codes, see Certificate Server Error Code Constants.

Remarks

Before calling this function, you must first successfully call NPKIT_x509BasicConstraintsInfo. The Basic Constraints extension is an optional extension. Therefore, not all certificates have Basic Constraints information.

See Also

NPKIT_x509DecodeCertificate, NPKIT_x509GetExtensionData