/*******************************************************************
 *
 * 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
 *
 ******************************************************************/

#ifndef cert_H_
#define cert_H_

#include "cert_util.h"
#include "cert_struct.h"

/*******************************************************************
 *
 * Function declarations for internal functions
 *
 ******************************************************************/

#define PKISizeofAttributeTypeInternal PKISizeofOBJECT_IDInternal
#define PKIDropInPlaceAttributeType PKIDropInPlaceOBJECT_ID
#define PKIPackAttributeTypeInternal PKIPackOBJECT_IDInternal
#define PKIUnpkInPlaceAttributeType PKIUnpkInPlaceOBJECT_ID
#define PKIUnpackAttributeTypeInternal PKIUnpackOBJECT_IDInternal

#define PKISizeofAttributeValueInternal PKISizeofANYInternal
#define PKIDropInPlaceAttributeValue PKIDropInPlaceANY
#define PKIPackAttributeValueInternal PKIPackANYInternal
#define PKIUnpkInPlaceAttributeValue PKIUnpkInPlaceANY
#define PKIUnpackAttributeValueInternal PKIUnpackANYInternal

#define PKISizeofBMPStringInternal PKISizeofOCTET_STRINGInternal
#define PKIDropInPlaceBMPString PKIDropInPlaceOCTET_STRING
#define PKIPackBMPStringInternal PKIPackOCTET_STRINGInternal
#define PKIUnpkInPlaceBMPString PKIUnpkInPlaceOCTET_STRING
#define PKIUnpackBMPStringInternal PKIUnpackOCTET_STRINGInternal

#define PKISizeofBaseDistanceInternal PKISizeofINTEGERInternal
#define PKIDropInPlaceBaseDistance PKIDropInPlaceINTEGER
#define PKIPackBaseDistanceInternal PKIPackINTEGERInternal
#define PKIUnpkInPlaceBaseDistance PKIUnpkInPlaceINTEGER
#define PKIUnpackBaseDistanceInternal PKIUnpackINTEGERInternal

#define PKISizeofCPSuriInternal PKISizeofIA5StringInternal
#define PKIDropInPlaceCPSuri PKIDropInPlaceIA5String
#define PKIPackCPSuriInternal PKIPackIA5StringInternal
#define PKIUnpkInPlaceCPSuri PKIUnpkInPlaceIA5String
#define PKIUnpackCPSuriInternal PKIUnpackIA5StringInternal

#define PKISizeofCRLNumberInternal PKISizeofINTEGERInternal
#define PKIDropInPlaceCRLNumber PKIDropInPlaceINTEGER
#define PKIPackCRLNumberInternal PKIPackINTEGERInternal
#define PKIUnpkInPlaceCRLNumber PKIUnpkInPlaceINTEGER
#define PKIUnpackCRLNumberInternal PKIUnpackINTEGERInternal

#define PKISizeofCRLReasonInternal PKISizeofINTEGERInternal
#define PKIDropInPlaceCRLReason PKIDropInPlaceINTEGER
#define PKIPackCRLReasonInternal PKIPackINTEGERInternal
#define PKIUnpkInPlaceCRLReason PKIUnpkInPlaceINTEGER
#define PKIUnpackCRLReasonInternal PKIUnpackINTEGERInternal

#define PKISizeofCertPolicyIdInternal PKISizeofOBJECT_IDInternal
#define PKIDropInPlaceCertPolicyId PKIDropInPlaceOBJECT_ID
#define PKIPackCertPolicyIdInternal PKIPackOBJECT_IDInternal
#define PKIUnpkInPlaceCertPolicyId PKIUnpkInPlaceOBJECT_ID
#define PKIUnpackCertPolicyIdInternal PKIUnpackOBJECT_IDInternal

#define PKISizeofCertificateSerialNumberInternal PKISizeofINTEGERInternal
#define PKIDropInPlaceCertificateSerialNumber PKIDropInPlaceINTEGER
#define PKIPackCertificateSerialNumberInternal PKIPackINTEGERInternal
#define PKIUnpkInPlaceCertificateSerialNumber PKIUnpkInPlaceINTEGER
#define PKIUnpackCertificateSerialNumberInternal PKIUnpackINTEGERInternal

#define PKISizeofDSAPublicKeyInternal PKISizeofINTEGERInternal
#define PKIDropInPlaceDSAPublicKey PKIDropInPlaceINTEGER
#define PKIPackDSAPublicKeyInternal PKIPackINTEGERInternal
#define PKIUnpkInPlaceDSAPublicKey PKIUnpkInPlaceINTEGER
#define PKIUnpackDSAPublicKeyInternal PKIUnpackINTEGERInternal

#define PKISizeofHoldInstructionCodeInternal PKISizeofOBJECT_IDInternal
#define PKIDropInPlaceHoldInstructionCode PKIDropInPlaceOBJECT_ID
#define PKIPackHoldInstructionCodeInternal PKIPackOBJECT_IDInternal
#define PKIUnpkInPlaceHoldInstructionCode PKIUnpkInPlaceOBJECT_ID
#define PKIUnpackHoldInstructionCodeInternal PKIUnpackOBJECT_IDInternal

#define PKISizeofInvalidityDateInternal PKISizeofGeneralizedTimeInternal
#define PKIDropInPlaceInvalidityDate PKIDropInPlaceGeneralizedTime
#define PKIPackInvalidityDateInternal PKIPackGeneralizedTimeInternal
#define PKIUnpkInPlaceInvalidityDate PKIUnpkInPlaceGeneralizedTime
#define PKIUnpackInvalidityDateInternal PKIUnpackGeneralizedTimeInternal

#define PKISizeofKeyIdentifierInternal PKISizeofOCTET_STRINGInternal
#define PKIDropInPlaceKeyIdentifier PKIDropInPlaceOCTET_STRING
#define PKIPackKeyIdentifierInternal PKIPackOCTET_STRINGInternal
#define PKIUnpkInPlaceKeyIdentifier PKIUnpkInPlaceOCTET_STRING
#define PKIUnpackKeyIdentifierInternal PKIUnpackOCTET_STRINGInternal

#define PKISizeofKeyPurposeIdInternal PKISizeofOBJECT_IDInternal
#define PKIDropInPlaceKeyPurposeId PKIDropInPlaceOBJECT_ID
#define PKIPackKeyPurposeIdInternal PKIPackOBJECT_IDInternal
#define PKIUnpkInPlaceKeyPurposeId PKIUnpkInPlaceOBJECT_ID
#define PKIUnpackKeyPurposeIdInternal PKIUnpackOBJECT_IDInternal

#define PKISizeofKeyUsageInternal PKISizeofBIT_STRINGInternal
#define PKIDropInPlaceKeyUsage PKIDropInPlaceBIT_STRING
#define PKIPackKeyUsageInternal PKIPackBIT_STRINGInternal
#define PKIUnpkInPlaceKeyUsage PKIUnpkInPlaceBIT_STRING
#define PKIUnpackKeyUsageInternal PKIUnpackBIT_STRINGInternal

#define PKISizeofPkcs9emailInternal PKISizeofIA5StringInternal
#define PKIDropInPlacePkcs9email PKIDropInPlaceIA5String
#define PKIPackPkcs9emailInternal PKIPackIA5StringInternal
#define PKIUnpkInPlacePkcs9email PKIUnpkInPlaceIA5String
#define PKIUnpackPkcs9emailInternal PKIUnpackIA5StringInternal

#define PKISizeofPolicyQualifierIdInternal PKISizeofOBJECT_IDInternal
#define PKIDropInPlacePolicyQualifierId PKIDropInPlaceOBJECT_ID
#define PKIPackPolicyQualifierIdInternal PKIPackOBJECT_IDInternal
#define PKIUnpkInPlacePolicyQualifierId PKIUnpkInPlaceOBJECT_ID
#define PKIUnpackPolicyQualifierIdInternal PKIUnpackOBJECT_IDInternal

#define PKISizeofReasonFlagsInternal PKISizeofBIT_STRINGInternal
#define PKIDropInPlaceReasonFlags PKIDropInPlaceBIT_STRING
#define PKIPackReasonFlagsInternal PKIPackBIT_STRINGInternal
#define PKIUnpkInPlaceReasonFlags PKIUnpkInPlaceBIT_STRING
#define PKIUnpackReasonFlagsInternal PKIUnpackBIT_STRINGInternal

#define PKISizeofSkipCertsInternal PKISizeofINTEGERInternal
#define PKIDropInPlaceSkipCerts PKIDropInPlaceINTEGER
#define PKIPackSkipCertsInternal PKIPackINTEGERInternal
#define PKIUnpkInPlaceSkipCerts PKIUnpkInPlaceINTEGER
#define PKIUnpackSkipCertsInternal PKIUnpackINTEGERInternal

#define PKISizeofUTF8StringInternal PKISizeofOCTET_STRINGInternal
#define PKIDropInPlaceUTF8String PKIDropInPlaceOCTET_STRING
#define PKIPackUTF8StringInternal PKIPackOCTET_STRINGInternal
#define PKIUnpkInPlaceUTF8String PKIUnpkInPlaceOCTET_STRING
#define PKIUnpackUTF8StringInternal PKIUnpackOCTET_STRINGInternal

#define PKISizeofUniqueIdentifierInternal PKISizeofBIT_STRINGInternal
#define PKIDropInPlaceUniqueIdentifier PKIDropInPlaceBIT_STRING
#define PKIPackUniqueIdentifierInternal PKIPackBIT_STRINGInternal
#define PKIUnpkInPlaceUniqueIdentifier PKIUnpkInPlaceBIT_STRING
#define PKIUnpackUniqueIdentifierInternal PKIUnpackBIT_STRINGInternal

#define PKISizeofUniversalStringInternal PKISizeofOCTET_STRINGInternal
#define PKIDropInPlaceUniversalString PKIDropInPlaceOCTET_STRING
#define PKIPackUniversalStringInternal PKIPackOCTET_STRINGInternal
#define PKIUnpkInPlaceUniversalString PKIUnpkInPlaceOCTET_STRING
#define PKIUnpackUniversalStringInternal PKIUnpackOCTET_STRINGInternal

#define PKISizeofVersionInternal PKISizeofINTEGERInternal
#define PKIDropInPlaceVersion PKIDropInPlaceINTEGER
#define PKIPackVersionInternal PKIPackINTEGERInternal
#define PKIUnpkInPlaceVersion PKIUnpkInPlaceINTEGER
#define PKIUnpackVersionInternal PKIUnpackINTEGERInternal

size_t PKISizeofnoticeNumbers_SEQ_OFInternal(
    PKInoticeNumbers_SEQ_OF *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlacenoticeNumbers_SEQ_OF(
    PKICONTEXT *ctx,
    PKInoticeNumbers_SEQ_OF *f);
size_t PKIPacknoticeNumbers_SEQ_OFInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKInoticeNumbers_SEQ_OF *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlacenoticeNumbers_SEQ_OF (
    PKICONTEXT *ctx,
    PKInoticeNumbers_SEQ_OF *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpacknoticeNumbers_SEQ_OFInternal(
    PKICONTEXT *ctx,
    PKInoticeNumbers_SEQ_OF **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofAlgorithmIdentifierInternal(
    PKIAlgorithmIdentifier *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceAlgorithmIdentifier(
    PKICONTEXT *ctx,
    PKIAlgorithmIdentifier *f);
size_t PKIPackAlgorithmIdentifierInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAlgorithmIdentifier *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceAlgorithmIdentifier (
    PKICONTEXT *ctx,
    PKIAlgorithmIdentifier *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackAlgorithmIdentifierInternal(
    PKICONTEXT *ctx,
    PKIAlgorithmIdentifier **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofAnotherNameInternal(
    PKIAnotherName *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceAnotherName(
    PKICONTEXT *ctx,
    PKIAnotherName *f);
size_t PKIPackAnotherNameInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAnotherName *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceAnotherName (
    PKICONTEXT *ctx,
    PKIAnotherName *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackAnotherNameInternal(
    PKICONTEXT *ctx,
    PKIAnotherName **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofAttributeTypeAndValueInternal(
    PKIAttributeTypeAndValue *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceAttributeTypeAndValue(
    PKICONTEXT *ctx,
    PKIAttributeTypeAndValue *f);
size_t PKIPackAttributeTypeAndValueInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAttributeTypeAndValue *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceAttributeTypeAndValue (
    PKICONTEXT *ctx,
    PKIAttributeTypeAndValue *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackAttributeTypeAndValueInternal(
    PKICONTEXT *ctx,
    PKIAttributeTypeAndValue **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

#define PKISizeofBaseCRLNumberInternal PKISizeofCRLNumberInternal
#define PKIDropInPlaceBaseCRLNumber PKIDropInPlaceCRLNumber
#define PKIPackBaseCRLNumberInternal PKIPackCRLNumberInternal
#define PKIUnpkInPlaceBaseCRLNumber PKIUnpkInPlaceCRLNumber
#define PKIUnpackBaseCRLNumberInternal PKIUnpackCRLNumberInternal

size_t PKISizeofBasicConstraintsInternal(
    PKIBasicConstraints *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceBasicConstraints(
    PKICONTEXT *ctx,
    PKIBasicConstraints *f);
size_t PKIPackBasicConstraintsInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIBasicConstraints *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceBasicConstraints (
    PKICONTEXT *ctx,
    PKIBasicConstraints *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackBasicConstraintsInternal(
    PKICONTEXT *ctx,
    PKIBasicConstraints **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofDirectoryStringInternal(
    PKIDirectoryString *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceDirectoryString(
    PKICONTEXT *ctx,
    PKIDirectoryString *f);
size_t PKIPackDirectoryStringInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDirectoryString *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceDirectoryString (
    PKICONTEXT *ctx,
    PKIDirectoryString *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackDirectoryStringInternal(
    PKICONTEXT *ctx,
    PKIDirectoryString **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofDisplayTextInternal(
    PKIDisplayText *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceDisplayText(
    PKICONTEXT *ctx,
    PKIDisplayText *f);
size_t PKIPackDisplayTextInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDisplayText *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceDisplayText (
    PKICONTEXT *ctx,
    PKIDisplayText *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackDisplayTextInternal(
    PKICONTEXT *ctx,
    PKIDisplayText **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofDss_ParmsInternal(
    PKIDss_Parms *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceDss_Parms(
    PKICONTEXT *ctx,
    PKIDss_Parms *f);
size_t PKIPackDss_ParmsInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDss_Parms *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceDss_Parms (
    PKICONTEXT *ctx,
    PKIDss_Parms *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackDss_ParmsInternal(
    PKICONTEXT *ctx,
    PKIDss_Parms **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofDss_Sig_ValueInternal(
    PKIDss_Sig_Value *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceDss_Sig_Value(
    PKICONTEXT *ctx,
    PKIDss_Sig_Value *f);
size_t PKIPackDss_Sig_ValueInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDss_Sig_Value *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceDss_Sig_Value (
    PKICONTEXT *ctx,
    PKIDss_Sig_Value *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackDss_Sig_ValueInternal(
    PKICONTEXT *ctx,
    PKIDss_Sig_Value **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofExtKeyUsageSyntaxInternal(
    PKIExtKeyUsageSyntax *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceExtKeyUsageSyntax(
    PKICONTEXT *ctx,
    PKIExtKeyUsageSyntax *f);
size_t PKIPackExtKeyUsageSyntaxInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIExtKeyUsageSyntax *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceExtKeyUsageSyntax (
    PKICONTEXT *ctx,
    PKIExtKeyUsageSyntax *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackExtKeyUsageSyntaxInternal(
    PKICONTEXT *ctx,
    PKIExtKeyUsageSyntax **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofExtensionInternal(
    PKIExtension *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceExtension(
    PKICONTEXT *ctx,
    PKIExtension *f);
size_t PKIPackExtensionInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIExtension *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceExtension (
    PKICONTEXT *ctx,
    PKIExtension *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackExtensionInternal(
    PKICONTEXT *ctx,
    PKIExtension **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofPolicyConstraintsInternal(
    PKIPolicyConstraints *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlacePolicyConstraints(
    PKICONTEXT *ctx,
    PKIPolicyConstraints *f);
size_t PKIPackPolicyConstraintsInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIPolicyConstraints *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlacePolicyConstraints (
    PKICONTEXT *ctx,
    PKIPolicyConstraints *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackPolicyConstraintsInternal(
    PKICONTEXT *ctx,
    PKIPolicyConstraints **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofPolicyMappings_SEQUENCEInternal(
    PKIPolicyMappings_SEQUENCE *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlacePolicyMappings_SEQUENCE(
    PKICONTEXT *ctx,
    PKIPolicyMappings_SEQUENCE *f);
size_t PKIPackPolicyMappings_SEQUENCEInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIPolicyMappings_SEQUENCE *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlacePolicyMappings_SEQUENCE (
    PKICONTEXT *ctx,
    PKIPolicyMappings_SEQUENCE *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackPolicyMappings_SEQUENCEInternal(
    PKICONTEXT *ctx,
    PKIPolicyMappings_SEQUENCE **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofPolicyQualifierInfoInternal(
    PKIPolicyQualifierInfo *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlacePolicyQualifierInfo(
    PKICONTEXT *ctx,
    PKIPolicyQualifierInfo *f);
size_t PKIPackPolicyQualifierInfoInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIPolicyQualifierInfo *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlacePolicyQualifierInfo (
    PKICONTEXT *ctx,
    PKIPolicyQualifierInfo *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackPolicyQualifierInfoInternal(
    PKICONTEXT *ctx,
    PKIPolicyQualifierInfo **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofPrivateKeyUsagePeriodInternal(
    PKIPrivateKeyUsagePeriod *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlacePrivateKeyUsagePeriod(
    PKICONTEXT *ctx,
    PKIPrivateKeyUsagePeriod *f);
size_t PKIPackPrivateKeyUsagePeriodInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIPrivateKeyUsagePeriod *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlacePrivateKeyUsagePeriod (
    PKICONTEXT *ctx,
    PKIPrivateKeyUsagePeriod *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackPrivateKeyUsagePeriodInternal(
    PKICONTEXT *ctx,
    PKIPrivateKeyUsagePeriod **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofRSAKeyInternal(
    PKIRSAKey *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceRSAKey(
    PKICONTEXT *ctx,
    PKIRSAKey *f);
size_t PKIPackRSAKeyInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIRSAKey *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceRSAKey (
    PKICONTEXT *ctx,
    PKIRSAKey *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackRSAKeyInternal(
    PKICONTEXT *ctx,
    PKIRSAKey **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

#define PKISizeofSubjectKeyIdentifierInternal PKISizeofKeyIdentifierInternal
#define PKIDropInPlaceSubjectKeyIdentifier PKIDropInPlaceKeyIdentifier
#define PKIPackSubjectKeyIdentifierInternal PKIPackKeyIdentifierInternal
#define PKIUnpkInPlaceSubjectKeyIdentifier PKIUnpkInPlaceKeyIdentifier
#define PKIUnpackSubjectKeyIdentifierInternal PKIUnpackKeyIdentifierInternal

size_t PKISizeofTimeInternal(
    PKITime *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceTime(
    PKICONTEXT *ctx,
    PKITime *f);
size_t PKIPackTimeInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKITime *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceTime (
    PKICONTEXT *ctx,
    PKITime *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackTimeInternal(
    PKICONTEXT *ctx,
    PKITime **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofValidationParmsInternal(
    PKIValidationParms *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceValidationParms(
    PKICONTEXT *ctx,
    PKIValidationParms *f);
size_t PKIPackValidationParmsInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIValidationParms *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceValidationParms (
    PKICONTEXT *ctx,
    PKIValidationParms *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackValidationParmsInternal(
    PKICONTEXT *ctx,
    PKIValidationParms **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofvalues_SET_OFInternal(
    PKIvalues_SET_OF *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlacevalues_SET_OF(
    PKICONTEXT *ctx,
    PKIvalues_SET_OF *f);
size_t PKIPackvalues_SET_OFInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIvalues_SET_OF *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlacevalues_SET_OF (
    PKICONTEXT *ctx,
    PKIvalues_SET_OF *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackvalues_SET_OFInternal(
    PKICONTEXT *ctx,
    PKIvalues_SET_OF **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofAttributeInternal(
    PKIAttribute *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceAttribute(
    PKICONTEXT *ctx,
    PKIAttribute *f);
size_t PKIPackAttributeInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAttribute *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceAttribute (
    PKICONTEXT *ctx,
    PKIAttribute *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackAttributeInternal(
    PKICONTEXT *ctx,
    PKIAttribute **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofDomainParametersInternal(
    PKIDomainParameters *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceDomainParameters(
    PKICONTEXT *ctx,
    PKIDomainParameters *f);
size_t PKIPackDomainParametersInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDomainParameters *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceDomainParameters (
    PKICONTEXT *ctx,
    PKIDomainParameters *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackDomainParametersInternal(
    PKICONTEXT *ctx,
    PKIDomainParameters **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofEDIPartyNameInternal(
    PKIEDIPartyName *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceEDIPartyName(
    PKICONTEXT *ctx,
    PKIEDIPartyName *f);
size_t PKIPackEDIPartyNameInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIEDIPartyName *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceEDIPartyName (
    PKICONTEXT *ctx,
    PKIEDIPartyName *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackEDIPartyNameInternal(
    PKICONTEXT *ctx,
    PKIEDIPartyName **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofExtensionsInternal(
    PKIExtensions *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceExtensions(
    PKICONTEXT *ctx,
    PKIExtensions *f);
size_t PKIPackExtensionsInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIExtensions *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceExtensions (
    PKICONTEXT *ctx,
    PKIExtensions *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackExtensionsInternal(
    PKICONTEXT *ctx,
    PKIExtensions **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofNoticeReferenceInternal(
    PKINoticeReference *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceNoticeReference(
    PKICONTEXT *ctx,
    PKINoticeReference *f);
size_t PKIPackNoticeReferenceInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKINoticeReference *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceNoticeReference (
    PKICONTEXT *ctx,
    PKINoticeReference *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackNoticeReferenceInternal(
    PKICONTEXT *ctx,
    PKINoticeReference **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofPolicyMappingsInternal(
    PKIPolicyMappings *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlacePolicyMappings(
    PKICONTEXT *ctx,
    PKIPolicyMappings *f);
size_t PKIPackPolicyMappingsInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIPolicyMappings *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlacePolicyMappings (
    PKICONTEXT *ctx,
    PKIPolicyMappings *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackPolicyMappingsInternal(
    PKICONTEXT *ctx,
    PKIPolicyMappings **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofRelativeDistinguishedNameInternal(
    PKIRelativeDistinguishedName *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceRelativeDistinguishedName(
    PKICONTEXT *ctx,
    PKIRelativeDistinguishedName *f);
size_t PKIPackRelativeDistinguishedNameInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIRelativeDistinguishedName *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceRelativeDistinguishedName (
    PKICONTEXT *ctx,
    PKIRelativeDistinguishedName *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackRelativeDistinguishedNameInternal(
    PKICONTEXT *ctx,
    PKIRelativeDistinguishedName **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofSubjectPublicKeyInfoInternal(
    PKISubjectPublicKeyInfo *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceSubjectPublicKeyInfo(
    PKICONTEXT *ctx,
    PKISubjectPublicKeyInfo *f);
size_t PKIPackSubjectPublicKeyInfoInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKISubjectPublicKeyInfo *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceSubjectPublicKeyInfo (
    PKICONTEXT *ctx,
    PKISubjectPublicKeyInfo *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackSubjectPublicKeyInfoInternal(
    PKICONTEXT *ctx,
    PKISubjectPublicKeyInfo **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofValidityInternal(
    PKIValidity *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceValidity(
    PKICONTEXT *ctx,
    PKIValidity *f);
size_t PKIPackValidityInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIValidity *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceValidity (
    PKICONTEXT *ctx,
    PKIValidity *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackValidityInternal(
    PKICONTEXT *ctx,
    PKIValidity **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofXCertificateInternal(
    PKIXCertificate *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceXCertificate(
    PKICONTEXT *ctx,
    PKIXCertificate *f);
size_t PKIPackXCertificateInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIXCertificate *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceXCertificate (
    PKICONTEXT *ctx,
    PKIXCertificate *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackXCertificateInternal(
    PKICONTEXT *ctx,
    PKIXCertificate **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofpolicyQualifiers_SEQ_OFInternal(
    PKIpolicyQualifiers_SEQ_OF *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlacepolicyQualifiers_SEQ_OF(
    PKICONTEXT *ctx,
    PKIpolicyQualifiers_SEQ_OF *f);
size_t PKIPackpolicyQualifiers_SEQ_OFInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIpolicyQualifiers_SEQ_OF *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlacepolicyQualifiers_SEQ_OF (
    PKICONTEXT *ctx,
    PKIpolicyQualifiers_SEQ_OF *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackpolicyQualifiers_SEQ_OFInternal(
    PKICONTEXT *ctx,
    PKIpolicyQualifiers_SEQ_OF **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofAttributesInternal(
    PKIAttributes *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceAttributes(
    PKICONTEXT *ctx,
    PKIAttributes *f);
size_t PKIPackAttributesInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAttributes *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceAttributes (
    PKICONTEXT *ctx,
    PKIAttributes *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackAttributesInternal(
    PKICONTEXT *ctx,
    PKIAttributes **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofPolicyInformationInternal(
    PKIPolicyInformation *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlacePolicyInformation(
    PKICONTEXT *ctx,
    PKIPolicyInformation *f);
size_t PKIPackPolicyInformationInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIPolicyInformation *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlacePolicyInformation (
    PKICONTEXT *ctx,
    PKIPolicyInformation *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackPolicyInformationInternal(
    PKICONTEXT *ctx,
    PKIPolicyInformation **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofRDNSequenceInternal(
    PKIRDNSequence *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceRDNSequence(
    PKICONTEXT *ctx,
    PKIRDNSequence *f);
size_t PKIPackRDNSequenceInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIRDNSequence *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceRDNSequence (
    PKICONTEXT *ctx,
    PKIRDNSequence *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackRDNSequenceInternal(
    PKICONTEXT *ctx,
    PKIRDNSequence **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofRevokedCertificateInternal(
    PKIRevokedCertificate *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceRevokedCertificate(
    PKICONTEXT *ctx,
    PKIRevokedCertificate *f);
size_t PKIPackRevokedCertificateInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIRevokedCertificate *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceRevokedCertificate (
    PKICONTEXT *ctx,
    PKIRevokedCertificate *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackRevokedCertificateInternal(
    PKICONTEXT *ctx,
    PKIRevokedCertificate **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofSubjectDirectoryAttributesInternal(
    PKISubjectDirectoryAttributes *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceSubjectDirectoryAttributes(
    PKICONTEXT *ctx,
    PKISubjectDirectoryAttributes *f);
size_t PKIPackSubjectDirectoryAttributesInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKISubjectDirectoryAttributes *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceSubjectDirectoryAttributes (
    PKICONTEXT *ctx,
    PKISubjectDirectoryAttributes *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackSubjectDirectoryAttributesInternal(
    PKICONTEXT *ctx,
    PKISubjectDirectoryAttributes **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofUserNoticeInternal(
    PKIUserNotice *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceUserNotice(
    PKICONTEXT *ctx,
    PKIUserNotice *f);
size_t PKIPackUserNoticeInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIUserNotice *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceUserNotice (
    PKICONTEXT *ctx,
    PKIUserNotice *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackUserNoticeInternal(
    PKICONTEXT *ctx,
    PKIUserNotice **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofCertificatePoliciesInternal(
    PKICertificatePolicies *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceCertificatePolicies(
    PKICONTEXT *ctx,
    PKICertificatePolicies *f);
size_t PKIPackCertificatePoliciesInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICertificatePolicies *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceCertificatePolicies (
    PKICONTEXT *ctx,
    PKICertificatePolicies *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackCertificatePoliciesInternal(
    PKICONTEXT *ctx,
    PKICertificatePolicies **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

#define PKISizeofDistinguishedNameInternal PKISizeofRDNSequenceInternal
#define PKIDropInPlaceDistinguishedName PKIDropInPlaceRDNSequence
#define PKIPackDistinguishedNameInternal PKIPackRDNSequenceInternal
#define PKIUnpkInPlaceDistinguishedName PKIUnpkInPlaceRDNSequence
#define PKIUnpackDistinguishedNameInternal PKIUnpackRDNSequenceInternal

size_t PKISizeofNameInternal(
    PKIName *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceName(
    PKICONTEXT *ctx,
    PKIName *f);
size_t PKIPackNameInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIName *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceName (
    PKICONTEXT *ctx,
    PKIName *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackNameInternal(
    PKICONTEXT *ctx,
    PKIName **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofRevokedCertificatesInternal(
    PKIRevokedCertificates *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceRevokedCertificates(
    PKICONTEXT *ctx,
    PKIRevokedCertificates *f);
size_t PKIPackRevokedCertificatesInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIRevokedCertificates *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceRevokedCertificates (
    PKICONTEXT *ctx,
    PKIRevokedCertificates *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackRevokedCertificatesInternal(
    PKICONTEXT *ctx,
    PKIRevokedCertificates **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofCertificationRequestInfoInternal(
    PKICertificationRequestInfo *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceCertificationRequestInfo(
    PKICONTEXT *ctx,
    PKICertificationRequestInfo *f);
size_t PKIPackCertificationRequestInfoInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICertificationRequestInfo *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceCertificationRequestInfo (
    PKICONTEXT *ctx,
    PKICertificationRequestInfo *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackCertificationRequestInfoInternal(
    PKICONTEXT *ctx,
    PKICertificationRequestInfo **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofGeneralNameInternal(
    PKIGeneralName *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceGeneralName(
    PKICONTEXT *ctx,
    PKIGeneralName *f);
size_t PKIPackGeneralNameInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIGeneralName *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceGeneralName (
    PKICONTEXT *ctx,
    PKIGeneralName *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackGeneralNameInternal(
    PKICONTEXT *ctx,
    PKIGeneralName **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofTBSCertListInternal(
    PKITBSCertList *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceTBSCertList(
    PKICONTEXT *ctx,
    PKITBSCertList *f);
size_t PKIPackTBSCertListInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKITBSCertList *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceTBSCertList (
    PKICONTEXT *ctx,
    PKITBSCertList *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackTBSCertListInternal(
    PKICONTEXT *ctx,
    PKITBSCertList **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofTBSCertificateInternal(
    PKITBSCertificate *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceTBSCertificate(
    PKICONTEXT *ctx,
    PKITBSCertificate *f);
size_t PKIPackTBSCertificateInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKITBSCertificate *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceTBSCertificate (
    PKICONTEXT *ctx,
    PKITBSCertificate *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackTBSCertificateInternal(
    PKICONTEXT *ctx,
    PKITBSCertificate **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofAccessDescriptionInternal(
    PKIAccessDescription *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceAccessDescription(
    PKICONTEXT *ctx,
    PKIAccessDescription *f);
size_t PKIPackAccessDescriptionInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAccessDescription *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceAccessDescription (
    PKICONTEXT *ctx,
    PKIAccessDescription *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackAccessDescriptionInternal(
    PKICONTEXT *ctx,
    PKIAccessDescription **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofCertificateInternal(
    PKICertificate *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceCertificate(
    PKICONTEXT *ctx,
    PKICertificate *f);
size_t PKIPackCertificateInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICertificate *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceCertificate (
    PKICONTEXT *ctx,
    PKICertificate *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackCertificateInternal(
    PKICONTEXT *ctx,
    PKICertificate **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofCertificateListInternal(
    PKICertificateList *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceCertificateList(
    PKICONTEXT *ctx,
    PKICertificateList *f);
size_t PKIPackCertificateListInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICertificateList *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceCertificateList (
    PKICONTEXT *ctx,
    PKICertificateList *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackCertificateListInternal(
    PKICONTEXT *ctx,
    PKICertificateList **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofCertificationRequestInternal(
    PKICertificationRequest *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceCertificationRequest(
    PKICONTEXT *ctx,
    PKICertificationRequest *f);
size_t PKIPackCertificationRequestInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICertificationRequest *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceCertificationRequest (
    PKICONTEXT *ctx,
    PKICertificationRequest *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackCertificationRequestInternal(
    PKICONTEXT *ctx,
    PKICertificationRequest **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofGeneralNamesInternal(
    PKIGeneralNames *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceGeneralNames(
    PKICONTEXT *ctx,
    PKIGeneralNames *f);
size_t PKIPackGeneralNamesInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIGeneralNames *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceGeneralNames (
    PKICONTEXT *ctx,
    PKIGeneralNames *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackGeneralNamesInternal(
    PKICONTEXT *ctx,
    PKIGeneralNames **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofGeneralSubtreeInternal(
    PKIGeneralSubtree *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceGeneralSubtree(
    PKICONTEXT *ctx,
    PKIGeneralSubtree *f);
size_t PKIPackGeneralSubtreeInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIGeneralSubtree *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceGeneralSubtree (
    PKICONTEXT *ctx,
    PKIGeneralSubtree *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackGeneralSubtreeInternal(
    PKICONTEXT *ctx,
    PKIGeneralSubtree **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofAuthorityInfoAccessSyntaxInternal(
    PKIAuthorityInfoAccessSyntax *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceAuthorityInfoAccessSyntax(
    PKICONTEXT *ctx,
    PKIAuthorityInfoAccessSyntax *f);
size_t PKIPackAuthorityInfoAccessSyntaxInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAuthorityInfoAccessSyntax *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceAuthorityInfoAccessSyntax (
    PKICONTEXT *ctx,
    PKIAuthorityInfoAccessSyntax *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackAuthorityInfoAccessSyntaxInternal(
    PKICONTEXT *ctx,
    PKIAuthorityInfoAccessSyntax **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofAuthorityKeyIdentifierInternal(
    PKIAuthorityKeyIdentifier *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceAuthorityKeyIdentifier(
    PKICONTEXT *ctx,
    PKIAuthorityKeyIdentifier *f);
size_t PKIPackAuthorityKeyIdentifierInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAuthorityKeyIdentifier *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceAuthorityKeyIdentifier (
    PKICONTEXT *ctx,
    PKIAuthorityKeyIdentifier *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackAuthorityKeyIdentifierInternal(
    PKICONTEXT *ctx,
    PKIAuthorityKeyIdentifier **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

#define PKISizeofCertificateIssuerInternal PKISizeofGeneralNamesInternal
#define PKIDropInPlaceCertificateIssuer PKIDropInPlaceGeneralNames
#define PKIPackCertificateIssuerInternal PKIPackGeneralNamesInternal
#define PKIUnpkInPlaceCertificateIssuer PKIUnpkInPlaceGeneralNames
#define PKIUnpackCertificateIssuerInternal PKIUnpackGeneralNamesInternal

size_t PKISizeofDistributionPointNameInternal(
    PKIDistributionPointName *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceDistributionPointName(
    PKICONTEXT *ctx,
    PKIDistributionPointName *f);
size_t PKIPackDistributionPointNameInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDistributionPointName *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceDistributionPointName (
    PKICONTEXT *ctx,
    PKIDistributionPointName *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackDistributionPointNameInternal(
    PKICONTEXT *ctx,
    PKIDistributionPointName **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofGeneralSubtreesInternal(
    PKIGeneralSubtrees *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceGeneralSubtrees(
    PKICONTEXT *ctx,
    PKIGeneralSubtrees *f);
size_t PKIPackGeneralSubtreesInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIGeneralSubtrees *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceGeneralSubtrees (
    PKICONTEXT *ctx,
    PKIGeneralSubtrees *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackGeneralSubtreesInternal(
    PKICONTEXT *ctx,
    PKIGeneralSubtrees **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

#define PKISizeofIssuerAltNameInternal PKISizeofGeneralNamesInternal
#define PKIDropInPlaceIssuerAltName PKIDropInPlaceGeneralNames
#define PKIPackIssuerAltNameInternal PKIPackGeneralNamesInternal
#define PKIUnpkInPlaceIssuerAltName PKIUnpkInPlaceGeneralNames
#define PKIUnpackIssuerAltNameInternal PKIUnpackGeneralNamesInternal

#define PKISizeofSubjectAltNameInternal PKISizeofGeneralNamesInternal
#define PKIDropInPlaceSubjectAltName PKIDropInPlaceGeneralNames
#define PKIPackSubjectAltNameInternal PKIPackGeneralNamesInternal
#define PKIUnpkInPlaceSubjectAltName PKIUnpkInPlaceGeneralNames
#define PKIUnpackSubjectAltNameInternal PKIUnpackGeneralNamesInternal

size_t PKISizeofDistributionPointInternal(
    PKIDistributionPoint *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceDistributionPoint(
    PKICONTEXT *ctx,
    PKIDistributionPoint *f);
size_t PKIPackDistributionPointInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDistributionPoint *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceDistributionPoint (
    PKICONTEXT *ctx,
    PKIDistributionPoint *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackDistributionPointInternal(
    PKICONTEXT *ctx,
    PKIDistributionPoint **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofIssuingDistributionPointInternal(
    PKIIssuingDistributionPoint *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceIssuingDistributionPoint(
    PKICONTEXT *ctx,
    PKIIssuingDistributionPoint *f);
size_t PKIPackIssuingDistributionPointInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIIssuingDistributionPoint *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceIssuingDistributionPoint (
    PKICONTEXT *ctx,
    PKIIssuingDistributionPoint *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackIssuingDistributionPointInternal(
    PKICONTEXT *ctx,
    PKIIssuingDistributionPoint **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofNameConstraintsInternal(
    PKINameConstraints *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceNameConstraints(
    PKICONTEXT *ctx,
    PKINameConstraints *f);
size_t PKIPackNameConstraintsInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKINameConstraints *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceNameConstraints (
    PKICONTEXT *ctx,
    PKINameConstraints *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackNameConstraintsInternal(
    PKICONTEXT *ctx,
    PKINameConstraints **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofCRLDistPointsSyntaxInternal(
    PKICRLDistPointsSyntax *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceCRLDistPointsSyntax(
    PKICONTEXT *ctx,
    PKICRLDistPointsSyntax *f);
size_t PKIPackCRLDistPointsSyntaxInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICRLDistPointsSyntax *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceCRLDistPointsSyntax (
    PKICONTEXT *ctx,
    PKICRLDistPointsSyntax *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackCRLDistPointsSyntaxInternal(
    PKICONTEXT *ctx,
    PKICRLDistPointsSyntax **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);


#endif /* cert_H_ */
