NPKIT_x509GetExtensionData

Retrieves the ASN.1 encoded certificate extension specified by index (formerly NWx509GetExtensionData).

Syntax

   #include "NPKIT_x509.h"
   
   NWRCODE NPKIT_x509GetExtensionData
   (
      NPKIT_x509Context             context,
      nuint32                       index,
      enum NPKIT_x509Extension      type,
      unicode const               **OID,
      pnbool8                       critical,
      pnuint32                      valueLen,
      nuint8 const                **value
   );
   

Parameters

context
(IN) Specifies the NPKIT_x509 context for the request. This is a nuint32 value.
index
(IN) Specifies which extension is to be returned. index is 0 based.
type
(OUT) Specifies the type of extension. For more information, see the NPKIT_x509Extension section.
OID
(OUT) Points to a Unicode string that contains a human-readable representation of the OID.
critical
(OUT) Specifies whether the extension is critical or not.
valueLen
(OUT) Specifies the length of the value.
value
(OUT) Points to the ASN.1 encoded extension.

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_x509DecodeCertificate. If the extension is of the corresponding type, you can call one of the following functions to retrieve the decoded extension information:

See Also

NPKIT_x509BasicConstraintsInfo, NPKIT_x509CRLDistributionPointsInfo, NPKIT_x509DecodeCertificate, NPKIT_x509IssuerAltNamesInfo, NPKIT_x509KeyUsageInfo, NPKIT_x509NovellExtensionInfo, NPKIT_x509SubjectAltNamesInfo