5.1 ASN1 Encoded Extension

The following structure allows ASN1 encoded extensions to be specified during the creation of server and user certificates. To add multiple extensions, create a structure for each extension and then link the structures using the next field in the structures.

IMPORTANT:Each extension must be a fully ASN.1 encoded extension conforming to RFC 2459.

    typedef struct NPKI_ASN1_Extensions
    {
         NPKI_Extension                 extension;
         struct NPKI_ASN1Extensions     *next;
         NPKI_AltNames                 *altName;    // Array of structures
    }
    
    NPKI_ASN1_Extensions;
    
    
extensions
Contains the values of the ASN1 encoded extension to be encoded into the certificate. See General Purpose Extension Structure.

NOTE:Creating an ASN.1 encoded extension is an advanced operation, requiring detailed knowledge of ASN.1 and X.509 extensions. However, existing ASN.1 encoded extensions may be used without such detailed knowledge. To review an example that uses the parameters to include in an extended key usage extension on the user certificate as it is created, see UserExtendedKeyUsage.

next
Points to the next node of type NPKI_ASN1_Extensions structure. To add multiple extensions, create a structure for each extension and then link the structures using the next field in the structures. The next field in last structure in the linked list should be set to null.
altName
Points to an array of NPKI-AltName structures; each element in the array contains one alternative name.