/*******************************************************************
 *
 * This file was generated by TIS/ASN1COMP Ver. 4.2, an ASN.1 compiler.
 * TIS/ASN1COMP is Copyright (c) 1998, TIS Labs at Network Associates, Inc.
 *
 * This file was AUTOMATICALLY GENERATED on Mon May 17 09:25:53 1999
 *
 ******************************************************************/

/*******************************************************************
 *
 *  .h file to declare ASN.1 functions
 *
 ******************************************************************/

#ifndef cert_ASN_H_
#define cert_ASN_H_

#include <stdio.h>

#include "cert.h"

/*******************************************************************
 *
 * Function declarations
 *
 ******************************************************************/

#define PKINewAttributeType  (PKIAttributeType *)PKINewOBJECT_ID
#define PKIFreeAttributeType PKIFreeOBJECT_ID
#define PKISizeofAttributeType PKISizeofOBJECT_ID
#define PKIPackAttributeType PKIPackOBJECT_ID
#define PKIUnpackAttributeType PKIUnpackOBJECT_ID

#define PKINewAttributeValue  (PKIAttributeValue *)PKINewANY
#define PKIFreeAttributeValue PKIFreeANY
#define PKISizeofAttributeValue PKISizeofANY
#define PKIPackAttributeValue PKIPackANY
#define PKIUnpackAttributeValue PKIUnpackANY

#define PKINewBMPString  (PKIBMPString *)PKINewOCTET_STRING
#define PKIFreeBMPString PKIFreeOCTET_STRING
#define PKISizeofBMPString PKISizeofOCTET_STRING
size_t PKIPackBMPString(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIBMPString *asnstruct,
    int *erret);
size_t PKIUnpackBMPString(
    PKICONTEXT *ctx,
    PKIBMPString **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

#define PKINewBaseDistance  (PKIBaseDistance *)PKINewINTEGER
#define PKIFreeBaseDistance PKIFreeINTEGER
#define PKISizeofBaseDistance PKISizeofINTEGER
#define PKIPackBaseDistance PKIPackINTEGER
#define PKIUnpackBaseDistance PKIUnpackINTEGER

#define PKINewCPSuri  (PKICPSuri *)PKINewIA5String
#define PKIFreeCPSuri PKIFreeIA5String
#define PKISizeofCPSuri PKISizeofIA5String
#define PKIPackCPSuri PKIPackIA5String
#define PKIUnpackCPSuri PKIUnpackIA5String

#define PKINewCRLNumber  (PKICRLNumber *)PKINewINTEGER
#define PKIFreeCRLNumber PKIFreeINTEGER
#define PKISizeofCRLNumber PKISizeofINTEGER
#define PKIPackCRLNumber PKIPackINTEGER
#define PKIUnpackCRLNumber PKIUnpackINTEGER

#define PKINewCRLReason  (PKICRLReason *)PKINewINTEGER
#define PKIFreeCRLReason PKIFreeINTEGER
#define PKISizeofCRLReason PKISizeofINTEGER
#define PKIPackCRLReason PKIPackINTEGER
#define PKIUnpackCRLReason PKIUnpackINTEGER

#define PKINewCertPolicyId  (PKICertPolicyId *)PKINewOBJECT_ID
#define PKIFreeCertPolicyId PKIFreeOBJECT_ID
#define PKISizeofCertPolicyId PKISizeofOBJECT_ID
#define PKIPackCertPolicyId PKIPackOBJECT_ID
#define PKIUnpackCertPolicyId PKIUnpackOBJECT_ID

#define PKINewCertificateSerialNumber  (PKICertificateSerialNumber *)PKINewINTEGER
#define PKIFreeCertificateSerialNumber PKIFreeINTEGER
#define PKISizeofCertificateSerialNumber PKISizeofINTEGER
#define PKIPackCertificateSerialNumber PKIPackINTEGER
#define PKIUnpackCertificateSerialNumber PKIUnpackINTEGER

#define PKINewDSAPublicKey  (PKIDSAPublicKey *)PKINewINTEGER
#define PKIFreeDSAPublicKey PKIFreeINTEGER
#define PKISizeofDSAPublicKey PKISizeofINTEGER
#define PKIPackDSAPublicKey PKIPackINTEGER
#define PKIUnpackDSAPublicKey PKIUnpackINTEGER

#define PKINewHoldInstructionCode  (PKIHoldInstructionCode *)PKINewOBJECT_ID
#define PKIFreeHoldInstructionCode PKIFreeOBJECT_ID
#define PKISizeofHoldInstructionCode PKISizeofOBJECT_ID
#define PKIPackHoldInstructionCode PKIPackOBJECT_ID
#define PKIUnpackHoldInstructionCode PKIUnpackOBJECT_ID

#define PKINewInvalidityDate  (PKIInvalidityDate *)PKINewGeneralizedTime
#define PKIFreeInvalidityDate PKIFreeGeneralizedTime
#define PKISizeofInvalidityDate PKISizeofGeneralizedTime
#define PKIPackInvalidityDate PKIPackGeneralizedTime
#define PKIUnpackInvalidityDate PKIUnpackGeneralizedTime

#define PKINewKeyIdentifier  (PKIKeyIdentifier *)PKINewOCTET_STRING
#define PKIFreeKeyIdentifier PKIFreeOCTET_STRING
#define PKISizeofKeyIdentifier PKISizeofOCTET_STRING
#define PKIPackKeyIdentifier PKIPackOCTET_STRING
#define PKIUnpackKeyIdentifier PKIUnpackOCTET_STRING

#define PKINewKeyPurposeId  (PKIKeyPurposeId *)PKINewOBJECT_ID
#define PKIFreeKeyPurposeId PKIFreeOBJECT_ID
#define PKISizeofKeyPurposeId PKISizeofOBJECT_ID
#define PKIPackKeyPurposeId PKIPackOBJECT_ID
#define PKIUnpackKeyPurposeId PKIUnpackOBJECT_ID

#define PKINewKeyUsage  (PKIKeyUsage *)PKINewBIT_STRING
#define PKIFreeKeyUsage PKIFreeBIT_STRING
#define PKISizeofKeyUsage PKISizeofBIT_STRING
#define PKIPackKeyUsage PKIPackBIT_STRING
#define PKIUnpackKeyUsage PKIUnpackBIT_STRING

#define PKINewPkcs9email  (PKIPkcs9email *)PKINewIA5String
#define PKIFreePkcs9email PKIFreeIA5String
#define PKISizeofPkcs9email PKISizeofIA5String
#define PKIPackPkcs9email PKIPackIA5String
#define PKIUnpackPkcs9email PKIUnpackIA5String

#define PKINewPolicyQualifierId  (PKIPolicyQualifierId *)PKINewOBJECT_ID
#define PKIFreePolicyQualifierId PKIFreeOBJECT_ID
#define PKISizeofPolicyQualifierId PKISizeofOBJECT_ID
#define PKIPackPolicyQualifierId PKIPackOBJECT_ID
#define PKIUnpackPolicyQualifierId PKIUnpackOBJECT_ID

#define PKINewReasonFlags  (PKIReasonFlags *)PKINewBIT_STRING
#define PKIFreeReasonFlags PKIFreeBIT_STRING
#define PKISizeofReasonFlags PKISizeofBIT_STRING
#define PKIPackReasonFlags PKIPackBIT_STRING
#define PKIUnpackReasonFlags PKIUnpackBIT_STRING

#define PKINewSkipCerts  (PKISkipCerts *)PKINewINTEGER
#define PKIFreeSkipCerts PKIFreeINTEGER
#define PKISizeofSkipCerts PKISizeofINTEGER
#define PKIPackSkipCerts PKIPackINTEGER
#define PKIUnpackSkipCerts PKIUnpackINTEGER

#define PKINewUTF8String  (PKIUTF8String *)PKINewOCTET_STRING
#define PKIFreeUTF8String PKIFreeOCTET_STRING
#define PKISizeofUTF8String PKISizeofOCTET_STRING
size_t PKIPackUTF8String(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIUTF8String *asnstruct,
    int *erret);
size_t PKIUnpackUTF8String(
    PKICONTEXT *ctx,
    PKIUTF8String **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

#define PKINewUniqueIdentifier  (PKIUniqueIdentifier *)PKINewBIT_STRING
#define PKIFreeUniqueIdentifier PKIFreeBIT_STRING
#define PKISizeofUniqueIdentifier PKISizeofBIT_STRING
#define PKIPackUniqueIdentifier PKIPackBIT_STRING
#define PKIUnpackUniqueIdentifier PKIUnpackBIT_STRING

#define PKINewUniversalString  (PKIUniversalString *)PKINewOCTET_STRING
#define PKIFreeUniversalString PKIFreeOCTET_STRING
#define PKISizeofUniversalString PKISizeofOCTET_STRING
size_t PKIPackUniversalString(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIUniversalString *asnstruct,
    int *erret);
size_t PKIUnpackUniversalString(
    PKICONTEXT *ctx,
    PKIUniversalString **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

#define PKINewVersion  (PKIVersion *)PKINewINTEGER
#define PKIFreeVersion PKIFreeINTEGER
#define PKISizeofVersion PKISizeofINTEGER
#define PKIPackVersion PKIPackINTEGER
#define PKIUnpackVersion PKIUnpackINTEGER

PKInoticeNumbers_SEQ_OF *PKINewnoticeNumbers_SEQ_OF(
    PKICONTEXT *ctx);
void PKIFreenoticeNumbers_SEQ_OF(
    PKICONTEXT *ctx,
    PKInoticeNumbers_SEQ_OF *f);
size_t PKISizeofnoticeNumbers_SEQ_OF (
    PKICONTEXT *ctx,
    PKInoticeNumbers_SEQ_OF *asnstruct,
    int outerSizeFlag);
size_t PKIPacknoticeNumbers_SEQ_OF(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKInoticeNumbers_SEQ_OF *asnstruct,
    int *erret);
size_t PKIUnpacknoticeNumbers_SEQ_OF(
    PKICONTEXT *ctx,
    PKInoticeNumbers_SEQ_OF **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIAlgorithmIdentifier *PKINewAlgorithmIdentifier(
    PKICONTEXT *ctx);
void PKIFreeAlgorithmIdentifier(
    PKICONTEXT *ctx,
    PKIAlgorithmIdentifier *f);
size_t PKISizeofAlgorithmIdentifier (
    PKICONTEXT *ctx,
    PKIAlgorithmIdentifier *asnstruct,
    int outerSizeFlag);
size_t PKIPackAlgorithmIdentifier(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAlgorithmIdentifier *asnstruct,
    int *erret);
size_t PKIUnpackAlgorithmIdentifier(
    PKICONTEXT *ctx,
    PKIAlgorithmIdentifier **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIAnotherName *PKINewAnotherName(
    PKICONTEXT *ctx);
void PKIFreeAnotherName(
    PKICONTEXT *ctx,
    PKIAnotherName *f);
size_t PKISizeofAnotherName (
    PKICONTEXT *ctx,
    PKIAnotherName *asnstruct,
    int outerSizeFlag);
size_t PKIPackAnotherName(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAnotherName *asnstruct,
    int *erret);
size_t PKIUnpackAnotherName(
    PKICONTEXT *ctx,
    PKIAnotherName **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIAttributeTypeAndValue *PKINewAttributeTypeAndValue(
    PKICONTEXT *ctx);
void PKIFreeAttributeTypeAndValue(
    PKICONTEXT *ctx,
    PKIAttributeTypeAndValue *f);
size_t PKISizeofAttributeTypeAndValue (
    PKICONTEXT *ctx,
    PKIAttributeTypeAndValue *asnstruct,
    int outerSizeFlag);
size_t PKIPackAttributeTypeAndValue(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAttributeTypeAndValue *asnstruct,
    int *erret);
size_t PKIUnpackAttributeTypeAndValue(
    PKICONTEXT *ctx,
    PKIAttributeTypeAndValue **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

#define PKINewBaseCRLNumber  (PKIBaseCRLNumber *)PKINewCRLNumber
#define PKIFreeBaseCRLNumber PKIFreeCRLNumber
#define PKISizeofBaseCRLNumber PKISizeofCRLNumber
#define PKIPackBaseCRLNumber PKIPackCRLNumber
#define PKIUnpackBaseCRLNumber PKIUnpackCRLNumber

PKIBasicConstraints *PKINewBasicConstraints(
    PKICONTEXT *ctx);
void PKIFreeBasicConstraints(
    PKICONTEXT *ctx,
    PKIBasicConstraints *f);
size_t PKISizeofBasicConstraints (
    PKICONTEXT *ctx,
    PKIBasicConstraints *asnstruct,
    int outerSizeFlag);
size_t PKIPackBasicConstraints(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIBasicConstraints *asnstruct,
    int *erret);
size_t PKIUnpackBasicConstraints(
    PKICONTEXT *ctx,
    PKIBasicConstraints **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIDirectoryString *PKINewDirectoryString(
    PKICONTEXT *ctx);
void PKIFreeDirectoryString(
    PKICONTEXT *ctx,
    PKIDirectoryString *f);
size_t PKISizeofDirectoryString (
    PKICONTEXT *ctx,
    PKIDirectoryString *asnstruct,
    int outerSizeFlag);
size_t PKIPackDirectoryString(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDirectoryString *asnstruct,
    int *erret);
size_t PKIUnpackDirectoryString(
    PKICONTEXT *ctx,
    PKIDirectoryString **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIDisplayText *PKINewDisplayText(
    PKICONTEXT *ctx);
void PKIFreeDisplayText(
    PKICONTEXT *ctx,
    PKIDisplayText *f);
size_t PKISizeofDisplayText (
    PKICONTEXT *ctx,
    PKIDisplayText *asnstruct,
    int outerSizeFlag);
size_t PKIPackDisplayText(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDisplayText *asnstruct,
    int *erret);
size_t PKIUnpackDisplayText(
    PKICONTEXT *ctx,
    PKIDisplayText **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIDss_Parms *PKINewDss_Parms(
    PKICONTEXT *ctx);
void PKIFreeDss_Parms(
    PKICONTEXT *ctx,
    PKIDss_Parms *f);
size_t PKISizeofDss_Parms (
    PKICONTEXT *ctx,
    PKIDss_Parms *asnstruct,
    int outerSizeFlag);
size_t PKIPackDss_Parms(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDss_Parms *asnstruct,
    int *erret);
size_t PKIUnpackDss_Parms(
    PKICONTEXT *ctx,
    PKIDss_Parms **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIDss_Sig_Value *PKINewDss_Sig_Value(
    PKICONTEXT *ctx);
void PKIFreeDss_Sig_Value(
    PKICONTEXT *ctx,
    PKIDss_Sig_Value *f);
size_t PKISizeofDss_Sig_Value (
    PKICONTEXT *ctx,
    PKIDss_Sig_Value *asnstruct,
    int outerSizeFlag);
size_t PKIPackDss_Sig_Value(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDss_Sig_Value *asnstruct,
    int *erret);
size_t PKIUnpackDss_Sig_Value(
    PKICONTEXT *ctx,
    PKIDss_Sig_Value **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIExtKeyUsageSyntax *PKINewExtKeyUsageSyntax(
    PKICONTEXT *ctx);
void PKIFreeExtKeyUsageSyntax(
    PKICONTEXT *ctx,
    PKIExtKeyUsageSyntax *f);
size_t PKISizeofExtKeyUsageSyntax (
    PKICONTEXT *ctx,
    PKIExtKeyUsageSyntax *asnstruct,
    int outerSizeFlag);
size_t PKIPackExtKeyUsageSyntax(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIExtKeyUsageSyntax *asnstruct,
    int *erret);
size_t PKIUnpackExtKeyUsageSyntax(
    PKICONTEXT *ctx,
    PKIExtKeyUsageSyntax **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIExtension *PKINewExtension(
    PKICONTEXT *ctx);
void PKIFreeExtension(
    PKICONTEXT *ctx,
    PKIExtension *f);
size_t PKISizeofExtension (
    PKICONTEXT *ctx,
    PKIExtension *asnstruct,
    int outerSizeFlag);
size_t PKIPackExtension(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIExtension *asnstruct,
    int *erret);
size_t PKIUnpackExtension(
    PKICONTEXT *ctx,
    PKIExtension **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIPolicyConstraints *PKINewPolicyConstraints(
    PKICONTEXT *ctx);
void PKIFreePolicyConstraints(
    PKICONTEXT *ctx,
    PKIPolicyConstraints *f);
size_t PKISizeofPolicyConstraints (
    PKICONTEXT *ctx,
    PKIPolicyConstraints *asnstruct,
    int outerSizeFlag);
size_t PKIPackPolicyConstraints(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIPolicyConstraints *asnstruct,
    int *erret);
size_t PKIUnpackPolicyConstraints(
    PKICONTEXT *ctx,
    PKIPolicyConstraints **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIPolicyMappings_SEQUENCE *PKINewPolicyMappings_SEQUENCE(
    PKICONTEXT *ctx);
void PKIFreePolicyMappings_SEQUENCE(
    PKICONTEXT *ctx,
    PKIPolicyMappings_SEQUENCE *f);
size_t PKISizeofPolicyMappings_SEQUENCE (
    PKICONTEXT *ctx,
    PKIPolicyMappings_SEQUENCE *asnstruct,
    int outerSizeFlag);
size_t PKIPackPolicyMappings_SEQUENCE(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIPolicyMappings_SEQUENCE *asnstruct,
    int *erret);
size_t PKIUnpackPolicyMappings_SEQUENCE(
    PKICONTEXT *ctx,
    PKIPolicyMappings_SEQUENCE **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIPolicyQualifierInfo *PKINewPolicyQualifierInfo(
    PKICONTEXT *ctx);
void PKIFreePolicyQualifierInfo(
    PKICONTEXT *ctx,
    PKIPolicyQualifierInfo *f);
size_t PKISizeofPolicyQualifierInfo (
    PKICONTEXT *ctx,
    PKIPolicyQualifierInfo *asnstruct,
    int outerSizeFlag);
size_t PKIPackPolicyQualifierInfo(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIPolicyQualifierInfo *asnstruct,
    int *erret);
size_t PKIUnpackPolicyQualifierInfo(
    PKICONTEXT *ctx,
    PKIPolicyQualifierInfo **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIPrivateKeyUsagePeriod *PKINewPrivateKeyUsagePeriod(
    PKICONTEXT *ctx);
void PKIFreePrivateKeyUsagePeriod(
    PKICONTEXT *ctx,
    PKIPrivateKeyUsagePeriod *f);
size_t PKISizeofPrivateKeyUsagePeriod (
    PKICONTEXT *ctx,
    PKIPrivateKeyUsagePeriod *asnstruct,
    int outerSizeFlag);
size_t PKIPackPrivateKeyUsagePeriod(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIPrivateKeyUsagePeriod *asnstruct,
    int *erret);
size_t PKIUnpackPrivateKeyUsagePeriod(
    PKICONTEXT *ctx,
    PKIPrivateKeyUsagePeriod **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIRSAKey *PKINewRSAKey(
    PKICONTEXT *ctx);
void PKIFreeRSAKey(
    PKICONTEXT *ctx,
    PKIRSAKey *f);
size_t PKISizeofRSAKey (
    PKICONTEXT *ctx,
    PKIRSAKey *asnstruct,
    int outerSizeFlag);
size_t PKIPackRSAKey(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIRSAKey *asnstruct,
    int *erret);
size_t PKIUnpackRSAKey(
    PKICONTEXT *ctx,
    PKIRSAKey **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

#define PKINewSubjectKeyIdentifier  (PKISubjectKeyIdentifier *)PKINewKeyIdentifier
#define PKIFreeSubjectKeyIdentifier PKIFreeKeyIdentifier
#define PKISizeofSubjectKeyIdentifier PKISizeofKeyIdentifier
#define PKIPackSubjectKeyIdentifier PKIPackKeyIdentifier
#define PKIUnpackSubjectKeyIdentifier PKIUnpackKeyIdentifier

PKITime *PKINewTime(
    PKICONTEXT *ctx);
void PKIFreeTime(
    PKICONTEXT *ctx,
    PKITime *f);
size_t PKISizeofTime (
    PKICONTEXT *ctx,
    PKITime *asnstruct,
    int outerSizeFlag);
size_t PKIPackTime(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKITime *asnstruct,
    int *erret);
size_t PKIUnpackTime(
    PKICONTEXT *ctx,
    PKITime **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIValidationParms *PKINewValidationParms(
    PKICONTEXT *ctx);
void PKIFreeValidationParms(
    PKICONTEXT *ctx,
    PKIValidationParms *f);
size_t PKISizeofValidationParms (
    PKICONTEXT *ctx,
    PKIValidationParms *asnstruct,
    int outerSizeFlag);
size_t PKIPackValidationParms(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIValidationParms *asnstruct,
    int *erret);
size_t PKIUnpackValidationParms(
    PKICONTEXT *ctx,
    PKIValidationParms **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIvalues_SET_OF *PKINewvalues_SET_OF(
    PKICONTEXT *ctx);
void PKIFreevalues_SET_OF(
    PKICONTEXT *ctx,
    PKIvalues_SET_OF *f);
size_t PKISizeofvalues_SET_OF (
    PKICONTEXT *ctx,
    PKIvalues_SET_OF *asnstruct,
    int outerSizeFlag);
size_t PKIPackvalues_SET_OF(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIvalues_SET_OF *asnstruct,
    int *erret);
size_t PKIUnpackvalues_SET_OF(
    PKICONTEXT *ctx,
    PKIvalues_SET_OF **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIAttribute *PKINewAttribute(
    PKICONTEXT *ctx);
void PKIFreeAttribute(
    PKICONTEXT *ctx,
    PKIAttribute *f);
size_t PKISizeofAttribute (
    PKICONTEXT *ctx,
    PKIAttribute *asnstruct,
    int outerSizeFlag);
size_t PKIPackAttribute(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAttribute *asnstruct,
    int *erret);
size_t PKIUnpackAttribute(
    PKICONTEXT *ctx,
    PKIAttribute **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIDomainParameters *PKINewDomainParameters(
    PKICONTEXT *ctx);
void PKIFreeDomainParameters(
    PKICONTEXT *ctx,
    PKIDomainParameters *f);
size_t PKISizeofDomainParameters (
    PKICONTEXT *ctx,
    PKIDomainParameters *asnstruct,
    int outerSizeFlag);
size_t PKIPackDomainParameters(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDomainParameters *asnstruct,
    int *erret);
size_t PKIUnpackDomainParameters(
    PKICONTEXT *ctx,
    PKIDomainParameters **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIEDIPartyName *PKINewEDIPartyName(
    PKICONTEXT *ctx);
void PKIFreeEDIPartyName(
    PKICONTEXT *ctx,
    PKIEDIPartyName *f);
size_t PKISizeofEDIPartyName (
    PKICONTEXT *ctx,
    PKIEDIPartyName *asnstruct,
    int outerSizeFlag);
size_t PKIPackEDIPartyName(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIEDIPartyName *asnstruct,
    int *erret);
size_t PKIUnpackEDIPartyName(
    PKICONTEXT *ctx,
    PKIEDIPartyName **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIExtensions *PKINewExtensions(
    PKICONTEXT *ctx);
void PKIFreeExtensions(
    PKICONTEXT *ctx,
    PKIExtensions *f);
size_t PKISizeofExtensions (
    PKICONTEXT *ctx,
    PKIExtensions *asnstruct,
    int outerSizeFlag);
size_t PKIPackExtensions(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIExtensions *asnstruct,
    int *erret);
size_t PKIUnpackExtensions(
    PKICONTEXT *ctx,
    PKIExtensions **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKINoticeReference *PKINewNoticeReference(
    PKICONTEXT *ctx);
void PKIFreeNoticeReference(
    PKICONTEXT *ctx,
    PKINoticeReference *f);
size_t PKISizeofNoticeReference (
    PKICONTEXT *ctx,
    PKINoticeReference *asnstruct,
    int outerSizeFlag);
size_t PKIPackNoticeReference(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKINoticeReference *asnstruct,
    int *erret);
size_t PKIUnpackNoticeReference(
    PKICONTEXT *ctx,
    PKINoticeReference **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIPolicyMappings *PKINewPolicyMappings(
    PKICONTEXT *ctx);
void PKIFreePolicyMappings(
    PKICONTEXT *ctx,
    PKIPolicyMappings *f);
size_t PKISizeofPolicyMappings (
    PKICONTEXT *ctx,
    PKIPolicyMappings *asnstruct,
    int outerSizeFlag);
size_t PKIPackPolicyMappings(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIPolicyMappings *asnstruct,
    int *erret);
size_t PKIUnpackPolicyMappings(
    PKICONTEXT *ctx,
    PKIPolicyMappings **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIRelativeDistinguishedName *PKINewRelativeDistinguishedName(
    PKICONTEXT *ctx);
void PKIFreeRelativeDistinguishedName(
    PKICONTEXT *ctx,
    PKIRelativeDistinguishedName *f);
size_t PKISizeofRelativeDistinguishedName (
    PKICONTEXT *ctx,
    PKIRelativeDistinguishedName *asnstruct,
    int outerSizeFlag);
size_t PKIPackRelativeDistinguishedName(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIRelativeDistinguishedName *asnstruct,
    int *erret);
size_t PKIUnpackRelativeDistinguishedName(
    PKICONTEXT *ctx,
    PKIRelativeDistinguishedName **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKISubjectPublicKeyInfo *PKINewSubjectPublicKeyInfo(
    PKICONTEXT *ctx);
void PKIFreeSubjectPublicKeyInfo(
    PKICONTEXT *ctx,
    PKISubjectPublicKeyInfo *f);
size_t PKISizeofSubjectPublicKeyInfo (
    PKICONTEXT *ctx,
    PKISubjectPublicKeyInfo *asnstruct,
    int outerSizeFlag);
size_t PKIPackSubjectPublicKeyInfo(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKISubjectPublicKeyInfo *asnstruct,
    int *erret);
size_t PKIUnpackSubjectPublicKeyInfo(
    PKICONTEXT *ctx,
    PKISubjectPublicKeyInfo **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIValidity *PKINewValidity(
    PKICONTEXT *ctx);
void PKIFreeValidity(
    PKICONTEXT *ctx,
    PKIValidity *f);
size_t PKISizeofValidity (
    PKICONTEXT *ctx,
    PKIValidity *asnstruct,
    int outerSizeFlag);
size_t PKIPackValidity(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIValidity *asnstruct,
    int *erret);
size_t PKIUnpackValidity(
    PKICONTEXT *ctx,
    PKIValidity **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIXCertificate *PKINewXCertificate(
    PKICONTEXT *ctx);
void PKIFreeXCertificate(
    PKICONTEXT *ctx,
    PKIXCertificate *f);
size_t PKISizeofXCertificate (
    PKICONTEXT *ctx,
    PKIXCertificate *asnstruct,
    int outerSizeFlag);
size_t PKIPackXCertificate(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIXCertificate *asnstruct,
    int *erret);
size_t PKIUnpackXCertificate(
    PKICONTEXT *ctx,
    PKIXCertificate **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIpolicyQualifiers_SEQ_OF *PKINewpolicyQualifiers_SEQ_OF(
    PKICONTEXT *ctx);
void PKIFreepolicyQualifiers_SEQ_OF(
    PKICONTEXT *ctx,
    PKIpolicyQualifiers_SEQ_OF *f);
size_t PKISizeofpolicyQualifiers_SEQ_OF (
    PKICONTEXT *ctx,
    PKIpolicyQualifiers_SEQ_OF *asnstruct,
    int outerSizeFlag);
size_t PKIPackpolicyQualifiers_SEQ_OF(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIpolicyQualifiers_SEQ_OF *asnstruct,
    int *erret);
size_t PKIUnpackpolicyQualifiers_SEQ_OF(
    PKICONTEXT *ctx,
    PKIpolicyQualifiers_SEQ_OF **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIAttributes *PKINewAttributes(
    PKICONTEXT *ctx);
void PKIFreeAttributes(
    PKICONTEXT *ctx,
    PKIAttributes *f);
size_t PKISizeofAttributes (
    PKICONTEXT *ctx,
    PKIAttributes *asnstruct,
    int outerSizeFlag);
size_t PKIPackAttributes(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAttributes *asnstruct,
    int *erret);
size_t PKIUnpackAttributes(
    PKICONTEXT *ctx,
    PKIAttributes **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIPolicyInformation *PKINewPolicyInformation(
    PKICONTEXT *ctx);
void PKIFreePolicyInformation(
    PKICONTEXT *ctx,
    PKIPolicyInformation *f);
size_t PKISizeofPolicyInformation (
    PKICONTEXT *ctx,
    PKIPolicyInformation *asnstruct,
    int outerSizeFlag);
size_t PKIPackPolicyInformation(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIPolicyInformation *asnstruct,
    int *erret);
size_t PKIUnpackPolicyInformation(
    PKICONTEXT *ctx,
    PKIPolicyInformation **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIRDNSequence *PKINewRDNSequence(
    PKICONTEXT *ctx);
void PKIFreeRDNSequence(
    PKICONTEXT *ctx,
    PKIRDNSequence *f);
size_t PKISizeofRDNSequence (
    PKICONTEXT *ctx,
    PKIRDNSequence *asnstruct,
    int outerSizeFlag);
size_t PKIPackRDNSequence(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIRDNSequence *asnstruct,
    int *erret);
size_t PKIUnpackRDNSequence(
    PKICONTEXT *ctx,
    PKIRDNSequence **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIRevokedCertificate *PKINewRevokedCertificate(
    PKICONTEXT *ctx);
void PKIFreeRevokedCertificate(
    PKICONTEXT *ctx,
    PKIRevokedCertificate *f);
size_t PKISizeofRevokedCertificate (
    PKICONTEXT *ctx,
    PKIRevokedCertificate *asnstruct,
    int outerSizeFlag);
size_t PKIPackRevokedCertificate(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIRevokedCertificate *asnstruct,
    int *erret);
size_t PKIUnpackRevokedCertificate(
    PKICONTEXT *ctx,
    PKIRevokedCertificate **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKISubjectDirectoryAttributes *PKINewSubjectDirectoryAttributes(
    PKICONTEXT *ctx);
void PKIFreeSubjectDirectoryAttributes(
    PKICONTEXT *ctx,
    PKISubjectDirectoryAttributes *f);
size_t PKISizeofSubjectDirectoryAttributes (
    PKICONTEXT *ctx,
    PKISubjectDirectoryAttributes *asnstruct,
    int outerSizeFlag);
size_t PKIPackSubjectDirectoryAttributes(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKISubjectDirectoryAttributes *asnstruct,
    int *erret);
size_t PKIUnpackSubjectDirectoryAttributes(
    PKICONTEXT *ctx,
    PKISubjectDirectoryAttributes **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIUserNotice *PKINewUserNotice(
    PKICONTEXT *ctx);
void PKIFreeUserNotice(
    PKICONTEXT *ctx,
    PKIUserNotice *f);
size_t PKISizeofUserNotice (
    PKICONTEXT *ctx,
    PKIUserNotice *asnstruct,
    int outerSizeFlag);
size_t PKIPackUserNotice(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIUserNotice *asnstruct,
    int *erret);
size_t PKIUnpackUserNotice(
    PKICONTEXT *ctx,
    PKIUserNotice **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKICertificatePolicies *PKINewCertificatePolicies(
    PKICONTEXT *ctx);
void PKIFreeCertificatePolicies(
    PKICONTEXT *ctx,
    PKICertificatePolicies *f);
size_t PKISizeofCertificatePolicies (
    PKICONTEXT *ctx,
    PKICertificatePolicies *asnstruct,
    int outerSizeFlag);
size_t PKIPackCertificatePolicies(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICertificatePolicies *asnstruct,
    int *erret);
size_t PKIUnpackCertificatePolicies(
    PKICONTEXT *ctx,
    PKICertificatePolicies **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

#define PKINewDistinguishedName  (PKIDistinguishedName *)PKINewRDNSequence
#define PKIFreeDistinguishedName PKIFreeRDNSequence
#define PKISizeofDistinguishedName PKISizeofRDNSequence
#define PKIPackDistinguishedName PKIPackRDNSequence
#define PKIUnpackDistinguishedName PKIUnpackRDNSequence

PKIName *PKINewName(
    PKICONTEXT *ctx);
void PKIFreeName(
    PKICONTEXT *ctx,
    PKIName *f);
size_t PKISizeofName (
    PKICONTEXT *ctx,
    PKIName *asnstruct,
    int outerSizeFlag);
size_t PKIPackName(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIName *asnstruct,
    int *erret);
size_t PKIUnpackName(
    PKICONTEXT *ctx,
    PKIName **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIRevokedCertificates *PKINewRevokedCertificates(
    PKICONTEXT *ctx);
void PKIFreeRevokedCertificates(
    PKICONTEXT *ctx,
    PKIRevokedCertificates *f);
size_t PKISizeofRevokedCertificates (
    PKICONTEXT *ctx,
    PKIRevokedCertificates *asnstruct,
    int outerSizeFlag);
size_t PKIPackRevokedCertificates(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIRevokedCertificates *asnstruct,
    int *erret);
size_t PKIUnpackRevokedCertificates(
    PKICONTEXT *ctx,
    PKIRevokedCertificates **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKICertificationRequestInfo *PKINewCertificationRequestInfo(
    PKICONTEXT *ctx);
void PKIFreeCertificationRequestInfo(
    PKICONTEXT *ctx,
    PKICertificationRequestInfo *f);
size_t PKISizeofCertificationRequestInfo (
    PKICONTEXT *ctx,
    PKICertificationRequestInfo *asnstruct,
    int outerSizeFlag);
size_t PKIPackCertificationRequestInfo(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICertificationRequestInfo *asnstruct,
    int *erret);
size_t PKIUnpackCertificationRequestInfo(
    PKICONTEXT *ctx,
    PKICertificationRequestInfo **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIGeneralName *PKINewGeneralName(
    PKICONTEXT *ctx);
void PKIFreeGeneralName(
    PKICONTEXT *ctx,
    PKIGeneralName *f);
size_t PKISizeofGeneralName (
    PKICONTEXT *ctx,
    PKIGeneralName *asnstruct,
    int outerSizeFlag);
size_t PKIPackGeneralName(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIGeneralName *asnstruct,
    int *erret);
size_t PKIUnpackGeneralName(
    PKICONTEXT *ctx,
    PKIGeneralName **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKITBSCertList *PKINewTBSCertList(
    PKICONTEXT *ctx);
void PKIFreeTBSCertList(
    PKICONTEXT *ctx,
    PKITBSCertList *f);
size_t PKISizeofTBSCertList (
    PKICONTEXT *ctx,
    PKITBSCertList *asnstruct,
    int outerSizeFlag);
size_t PKIPackTBSCertList(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKITBSCertList *asnstruct,
    int *erret);
size_t PKIUnpackTBSCertList(
    PKICONTEXT *ctx,
    PKITBSCertList **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKITBSCertificate *PKINewTBSCertificate(
    PKICONTEXT *ctx);
void PKIFreeTBSCertificate(
    PKICONTEXT *ctx,
    PKITBSCertificate *f);
size_t PKISizeofTBSCertificate (
    PKICONTEXT *ctx,
    PKITBSCertificate *asnstruct,
    int outerSizeFlag);
size_t PKIPackTBSCertificate(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKITBSCertificate *asnstruct,
    int *erret);
size_t PKIUnpackTBSCertificate(
    PKICONTEXT *ctx,
    PKITBSCertificate **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIAccessDescription *PKINewAccessDescription(
    PKICONTEXT *ctx);
void PKIFreeAccessDescription(
    PKICONTEXT *ctx,
    PKIAccessDescription *f);
size_t PKISizeofAccessDescription (
    PKICONTEXT *ctx,
    PKIAccessDescription *asnstruct,
    int outerSizeFlag);
size_t PKIPackAccessDescription(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAccessDescription *asnstruct,
    int *erret);
size_t PKIUnpackAccessDescription(
    PKICONTEXT *ctx,
    PKIAccessDescription **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKICertificate *PKINewCertificate(
    PKICONTEXT *ctx);
void PKIFreeCertificate(
    PKICONTEXT *ctx,
    PKICertificate *f);
size_t PKISizeofCertificate (
    PKICONTEXT *ctx,
    PKICertificate *asnstruct,
    int outerSizeFlag);
size_t PKIPackCertificate(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICertificate *asnstruct,
    int *erret);
size_t PKIUnpackCertificate(
    PKICONTEXT *ctx,
    PKICertificate **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKICertificateList *PKINewCertificateList(
    PKICONTEXT *ctx);
void PKIFreeCertificateList(
    PKICONTEXT *ctx,
    PKICertificateList *f);
size_t PKISizeofCertificateList (
    PKICONTEXT *ctx,
    PKICertificateList *asnstruct,
    int outerSizeFlag);
size_t PKIPackCertificateList(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICertificateList *asnstruct,
    int *erret);
size_t PKIUnpackCertificateList(
    PKICONTEXT *ctx,
    PKICertificateList **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKICertificationRequest *PKINewCertificationRequest(
    PKICONTEXT *ctx);
void PKIFreeCertificationRequest(
    PKICONTEXT *ctx,
    PKICertificationRequest *f);
size_t PKISizeofCertificationRequest (
    PKICONTEXT *ctx,
    PKICertificationRequest *asnstruct,
    int outerSizeFlag);
size_t PKIPackCertificationRequest(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICertificationRequest *asnstruct,
    int *erret);
size_t PKIUnpackCertificationRequest(
    PKICONTEXT *ctx,
    PKICertificationRequest **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIGeneralNames *PKINewGeneralNames(
    PKICONTEXT *ctx);
void PKIFreeGeneralNames(
    PKICONTEXT *ctx,
    PKIGeneralNames *f);
size_t PKISizeofGeneralNames (
    PKICONTEXT *ctx,
    PKIGeneralNames *asnstruct,
    int outerSizeFlag);
size_t PKIPackGeneralNames(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIGeneralNames *asnstruct,
    int *erret);
size_t PKIUnpackGeneralNames(
    PKICONTEXT *ctx,
    PKIGeneralNames **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIGeneralSubtree *PKINewGeneralSubtree(
    PKICONTEXT *ctx);
void PKIFreeGeneralSubtree(
    PKICONTEXT *ctx,
    PKIGeneralSubtree *f);
size_t PKISizeofGeneralSubtree (
    PKICONTEXT *ctx,
    PKIGeneralSubtree *asnstruct,
    int outerSizeFlag);
size_t PKIPackGeneralSubtree(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIGeneralSubtree *asnstruct,
    int *erret);
size_t PKIUnpackGeneralSubtree(
    PKICONTEXT *ctx,
    PKIGeneralSubtree **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIAuthorityInfoAccessSyntax *PKINewAuthorityInfoAccessSyntax(
    PKICONTEXT *ctx);
void PKIFreeAuthorityInfoAccessSyntax(
    PKICONTEXT *ctx,
    PKIAuthorityInfoAccessSyntax *f);
size_t PKISizeofAuthorityInfoAccessSyntax (
    PKICONTEXT *ctx,
    PKIAuthorityInfoAccessSyntax *asnstruct,
    int outerSizeFlag);
size_t PKIPackAuthorityInfoAccessSyntax(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAuthorityInfoAccessSyntax *asnstruct,
    int *erret);
size_t PKIUnpackAuthorityInfoAccessSyntax(
    PKICONTEXT *ctx,
    PKIAuthorityInfoAccessSyntax **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIAuthorityKeyIdentifier *PKINewAuthorityKeyIdentifier(
    PKICONTEXT *ctx);
void PKIFreeAuthorityKeyIdentifier(
    PKICONTEXT *ctx,
    PKIAuthorityKeyIdentifier *f);
size_t PKISizeofAuthorityKeyIdentifier (
    PKICONTEXT *ctx,
    PKIAuthorityKeyIdentifier *asnstruct,
    int outerSizeFlag);
size_t PKIPackAuthorityKeyIdentifier(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAuthorityKeyIdentifier *asnstruct,
    int *erret);
size_t PKIUnpackAuthorityKeyIdentifier(
    PKICONTEXT *ctx,
    PKIAuthorityKeyIdentifier **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

#define PKINewCertificateIssuer  (PKICertificateIssuer *)PKINewGeneralNames
#define PKIFreeCertificateIssuer PKIFreeGeneralNames
#define PKISizeofCertificateIssuer PKISizeofGeneralNames
#define PKIPackCertificateIssuer PKIPackGeneralNames
#define PKIUnpackCertificateIssuer PKIUnpackGeneralNames

PKIDistributionPointName *PKINewDistributionPointName(
    PKICONTEXT *ctx);
void PKIFreeDistributionPointName(
    PKICONTEXT *ctx,
    PKIDistributionPointName *f);
size_t PKISizeofDistributionPointName (
    PKICONTEXT *ctx,
    PKIDistributionPointName *asnstruct,
    int outerSizeFlag);
size_t PKIPackDistributionPointName(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDistributionPointName *asnstruct,
    int *erret);
size_t PKIUnpackDistributionPointName(
    PKICONTEXT *ctx,
    PKIDistributionPointName **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIGeneralSubtrees *PKINewGeneralSubtrees(
    PKICONTEXT *ctx);
void PKIFreeGeneralSubtrees(
    PKICONTEXT *ctx,
    PKIGeneralSubtrees *f);
size_t PKISizeofGeneralSubtrees (
    PKICONTEXT *ctx,
    PKIGeneralSubtrees *asnstruct,
    int outerSizeFlag);
size_t PKIPackGeneralSubtrees(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIGeneralSubtrees *asnstruct,
    int *erret);
size_t PKIUnpackGeneralSubtrees(
    PKICONTEXT *ctx,
    PKIGeneralSubtrees **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

#define PKINewIssuerAltName  (PKIIssuerAltName *)PKINewGeneralNames
#define PKIFreeIssuerAltName PKIFreeGeneralNames
#define PKISizeofIssuerAltName PKISizeofGeneralNames
#define PKIPackIssuerAltName PKIPackGeneralNames
#define PKIUnpackIssuerAltName PKIUnpackGeneralNames

#define PKINewSubjectAltName  (PKISubjectAltName *)PKINewGeneralNames
#define PKIFreeSubjectAltName PKIFreeGeneralNames
#define PKISizeofSubjectAltName PKISizeofGeneralNames
#define PKIPackSubjectAltName PKIPackGeneralNames
#define PKIUnpackSubjectAltName PKIUnpackGeneralNames

PKIDistributionPoint *PKINewDistributionPoint(
    PKICONTEXT *ctx);
void PKIFreeDistributionPoint(
    PKICONTEXT *ctx,
    PKIDistributionPoint *f);
size_t PKISizeofDistributionPoint (
    PKICONTEXT *ctx,
    PKIDistributionPoint *asnstruct,
    int outerSizeFlag);
size_t PKIPackDistributionPoint(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDistributionPoint *asnstruct,
    int *erret);
size_t PKIUnpackDistributionPoint(
    PKICONTEXT *ctx,
    PKIDistributionPoint **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIIssuingDistributionPoint *PKINewIssuingDistributionPoint(
    PKICONTEXT *ctx);
void PKIFreeIssuingDistributionPoint(
    PKICONTEXT *ctx,
    PKIIssuingDistributionPoint *f);
size_t PKISizeofIssuingDistributionPoint (
    PKICONTEXT *ctx,
    PKIIssuingDistributionPoint *asnstruct,
    int outerSizeFlag);
size_t PKIPackIssuingDistributionPoint(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIIssuingDistributionPoint *asnstruct,
    int *erret);
size_t PKIUnpackIssuingDistributionPoint(
    PKICONTEXT *ctx,
    PKIIssuingDistributionPoint **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKINameConstraints *PKINewNameConstraints(
    PKICONTEXT *ctx);
void PKIFreeNameConstraints(
    PKICONTEXT *ctx,
    PKINameConstraints *f);
size_t PKISizeofNameConstraints (
    PKICONTEXT *ctx,
    PKINameConstraints *asnstruct,
    int outerSizeFlag);
size_t PKIPackNameConstraints(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKINameConstraints *asnstruct,
    int *erret);
size_t PKIUnpackNameConstraints(
    PKICONTEXT *ctx,
    PKINameConstraints **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKICRLDistPointsSyntax *PKINewCRLDistPointsSyntax(
    PKICONTEXT *ctx);
void PKIFreeCRLDistPointsSyntax(
    PKICONTEXT *ctx,
    PKICRLDistPointsSyntax *f);
size_t PKISizeofCRLDistPointsSyntax (
    PKICONTEXT *ctx,
    PKICRLDistPointsSyntax *asnstruct,
    int outerSizeFlag);
size_t PKIPackCRLDistPointsSyntax(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICRLDistPointsSyntax *asnstruct,
    int *erret);
size_t PKIUnpackCRLDistPointsSyntax(
    PKICONTEXT *ctx,
    PKICRLDistPointsSyntax **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

#endif /* cert_ASN_H_ */
