NPKIT_x509SubjectAltNamesInfo

Retrieves the number of subject alternative names encoded in the certificate if the subject alternative names extension exists in the certificate (formerly NWx509SubjectAltNamesInfo).

Syntax

   #include "NPKIT_x509.h"
   
   NWRCODE NPKIT_x509SubjectAltNamesInfo
   (
      NPKIT_x509Context     context,
      pnuint32              numSubjectAltNames
   );
   

Parameters

context
(IN) Specifies the NPKIT_x509 context handle for the request. This is a nuint32 value.
numSubjectAltNames
(OUT) Specifies the number of subject alternative names encoded in the certificate.

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. Iterative calls to NPKIT_x509SubjectAltName can be made to retrieve each of the subject alternative names.

The subject alternative name extension is optional. Therefore, not all certificates have subject alternative names.

See Also

NPKIT_x509DecodeCertificate, NPKIT_x509SubjectAltName