NPKIT_CRLDecode

Decodes the specified Certificate Revocation List (CRL) from its ASN.1 DER encoding (formerly NWx509DecodeCRL).

Syntax

   #include "NPKIT_x509.h"
   
   NWRCODE NPKIT_CRLDecode
   (
      NPKIT_CRLContext     context,
      const nuint8        *cRLData,
      nuint32              cRLDataLen,
      nuint8 const       **unsignedCRL,
      pnuint32             unsignedCRLLength,
      pnuint32             signatureAlgorithmType,
      unicode const      **signatureAlgorithmOID,
      nuint8 const       **signature,
      pnuint32             signatureLength,
      pnuint32             version,
      uniocode const     **issuerName,
      struct tm const    **thisUpdate,
      time_t const       **thisUpdateTime,
      struct tm const    **nextUpdate,
      time_t const       **nextUpdateTime,
      pnuint32             numberOfRevokedCertificates,
      pnuint32             numberOfCRLExtensions
   );
   

Parameters

context
(IN) Specifies the NPKIT_CRL context handle for the request. This is a nuint32 value.
cRLData
(IN) Points to the CRL to be decoded.
cRLDataLen
(IN) Specifies the size of the data pointed to by cRLData.
unsignedCRL
(OUT) Points to the unsigned portion of the CRL.
unsignedCRLLength
(OUT) Specifies the length of the unsigned portion of the CRL.
signatureAlgorithmType
(OUT) Points to the algorithm used in the signature.
signatureAlgorithmOID
(OUT) Points to a Unicode string that contains a human-readable form of the signature algorithm object identifier (OID) (for example, {1 2 840 113549 1 1 1}).
signature
(OUT) Points to the signature of the CRL.
signatureLength
(OUT) Points to the length of the data in signature.
version
(OUT) Points to the version number of the CRL.
issuerName
(OUT) Points to a Unicode string that contains the name of the Certificate Authority (CA) that issued the CRL.
thisUpdate
(OUT) Points to a struct tm representation of the most recent date the CRL was updated. The time is in UTC standard time.
thisUpdateTime
(OUT) Points to a time_t representation of the date when the CRL was last updated. Represented as the number of seconds since 00:00:00 UTC January 1, 1970.
nextUpdate
(OUT) Points to a struct tm representation of the next date the CRL will be updated. The time is in UTC standard time.
nextUpdateTime
(OUT) Points to a time_t representation of the date when the CRL will be updated next. Represented as the number of seconds since 00:00:00 UTC January 1, 1970.
numberOfRevokedCertificates
(OUT) Points to the number of revoked certificates in the CRL.
numberOfCRLExtensions
(OUT) Points to the number of extensions associated with the CRL.

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.

See Also

NPKIT_CRLCreateContext, NPKIT_CRLEntryInfo, NPKIT_CRLExtensionInfo, NPKIT_CRLFreeContext