/*******************************************************************
 *
 * This file was generated by TIS/ASN1COMP Ver. 4.0, an ASN.1 compiler.
 * TIS/ASN1COMP is Copyright (c) 1998, TIS Labs at Network Associates, Inc.
 *
 * This file was AUTOMATICALLY GENERATED on Wed Nov 18 16:32:30 1998
 *
 ******************************************************************/

#ifndef pkcs7_H_
#define pkcs7_H_

#include "pkcs7_struct.h"

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

#define PKISizeofContentTypeInternal PKISizeofOBJECT_IDInternal
#define PKIDropInPlaceContentType PKIDropInPlaceOBJECT_ID
#define PKIPackContentTypeInternal PKIPackOBJECT_IDInternal
#define PKIUnpkInPlaceContentType PKIUnpkInPlaceOBJECT_ID
#define PKIUnpackContentTypeInternal PKIUnpackOBJECT_IDInternal

#define PKISizeofDataInternal PKISizeofOCTET_STRINGInternal
#define PKIDropInPlaceData PKIDropInPlaceOCTET_STRING
#define PKIPackDataInternal PKIPackOCTET_STRINGInternal
#define PKIUnpkInPlaceData PKIUnpkInPlaceOCTET_STRING
#define PKIUnpackDataInternal PKIUnpackOCTET_STRINGInternal

#define PKISizeofDigestInternal PKISizeofOCTET_STRINGInternal
#define PKIDropInPlaceDigest PKIDropInPlaceOCTET_STRING
#define PKIPackDigestInternal PKIPackOCTET_STRINGInternal
#define PKIUnpkInPlaceDigest PKIUnpkInPlaceOCTET_STRING
#define PKIUnpackDigestInternal PKIUnpackOCTET_STRINGInternal

#define PKISizeofEncryptedContentInternal PKISizeofOCTET_STRINGInternal
#define PKIDropInPlaceEncryptedContent PKIDropInPlaceOCTET_STRING
#define PKIPackEncryptedContentInternal PKIPackOCTET_STRINGInternal
#define PKIUnpkInPlaceEncryptedContent PKIUnpkInPlaceOCTET_STRING
#define PKIUnpackEncryptedContentInternal PKIUnpackOCTET_STRINGInternal

#define PKISizeofEncryptedDigestInternal PKISizeofOCTET_STRINGInternal
#define PKIDropInPlaceEncryptedDigest PKIDropInPlaceOCTET_STRING
#define PKIPackEncryptedDigestInternal PKIPackOCTET_STRINGInternal
#define PKIUnpkInPlaceEncryptedDigest PKIUnpkInPlaceOCTET_STRING
#define PKIUnpackEncryptedDigestInternal PKIUnpackOCTET_STRINGInternal

#define PKISizeofEncryptedKeyInternal PKISizeofOCTET_STRINGInternal
#define PKIDropInPlaceEncryptedKey PKIDropInPlaceOCTET_STRING
#define PKIPackEncryptedKeyInternal PKIPackOCTET_STRINGInternal
#define PKIUnpkInPlaceEncryptedKey PKIUnpkInPlaceOCTET_STRING
#define PKIUnpackEncryptedKeyInternal PKIUnpackOCTET_STRINGInternal

#define PKISizeofSignatureInternal PKISizeofBIT_STRINGInternal
#define PKIDropInPlaceSignature PKIDropInPlaceBIT_STRING
#define PKIPackSignatureInternal PKIPackBIT_STRINGInternal
#define PKIUnpkInPlaceSignature PKIUnpkInPlaceBIT_STRING
#define PKIUnpackSignatureInternal PKIUnpackBIT_STRINGInternal

size_t PKISizeofCertificateRevocationListsInternal(
    PKICertificateRevocationLists *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceCertificateRevocationLists(
    PKICONTEXT *ctx,
    PKICertificateRevocationLists *f);
size_t PKIPackCertificateRevocationListsInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICertificateRevocationLists *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceCertificateRevocationLists (
    PKICONTEXT *ctx,
    PKICertificateRevocationLists *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackCertificateRevocationListsInternal(
    PKICONTEXT *ctx,
    PKICertificateRevocationLists **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

#define PKISizeofContentEncryptionAlgorithmIdentifierInternal PKISizeofAlgorithmIdentifierInternal
#define PKIDropInPlaceContentEncryptionAlgorithmIdentifier PKIDropInPlaceAlgorithmIdentifier
#define PKIPackContentEncryptionAlgorithmIdentifierInternal PKIPackAlgorithmIdentifierInternal
#define PKIUnpkInPlaceContentEncryptionAlgorithmIdentifier PKIUnpkInPlaceAlgorithmIdentifier
#define PKIUnpackContentEncryptionAlgorithmIdentifierInternal PKIUnpackAlgorithmIdentifierInternal

size_t PKISizeofContentInfoInternal(
    PKIContentInfo *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceContentInfo(
    PKICONTEXT *ctx,
    PKIContentInfo *f);
size_t PKIPackContentInfoInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIContentInfo *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceContentInfo (
    PKICONTEXT *ctx,
    PKIContentInfo *asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackContentInfoInternal(
    PKICONTEXT *ctx,
    PKIContentInfo **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

#define PKISizeofDigestAlgorithmIdentifierInternal PKISizeofAlgorithmIdentifierInternal
#define PKIDropInPlaceDigestAlgorithmIdentifier PKIDropInPlaceAlgorithmIdentifier
#define PKIPackDigestAlgorithmIdentifierInternal PKIPackAlgorithmIdentifierInternal
#define PKIUnpkInPlaceDigestAlgorithmIdentifier PKIUnpkInPlaceAlgorithmIdentifier
#define PKIUnpackDigestAlgorithmIdentifierInternal PKIUnpackAlgorithmIdentifierInternal

#define PKISizeofDigestEncryptionAlgorithmIdentifierInternal PKISizeofAlgorithmIdentifierInternal
#define PKIDropInPlaceDigestEncryptionAlgorithmIdentifier PKIDropInPlaceAlgorithmIdentifier
#define PKIPackDigestEncryptionAlgorithmIdentifierInternal PKIPackAlgorithmIdentifierInternal
#define PKIUnpkInPlaceDigestEncryptionAlgorithmIdentifier PKIUnpkInPlaceAlgorithmIdentifier
#define PKIUnpackDigestEncryptionAlgorithmIdentifierInternal PKIUnpackAlgorithmIdentifierInternal

size_t PKISizeofExtendedCertificateInfoInternal(
    PKIExtendedCertificateInfo *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceExtendedCertificateInfo(
    PKICONTEXT *ctx,
    PKIExtendedCertificateInfo *f);
size_t PKIPackExtendedCertificateInfoInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIExtendedCertificateInfo *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceExtendedCertificateInfo (
    PKICONTEXT *ctx,
    PKIExtendedCertificateInfo *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackExtendedCertificateInfoInternal(
    PKICONTEXT *ctx,
    PKIExtendedCertificateInfo **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofIssuerAndSerialNumberInternal(
    PKIIssuerAndSerialNumber *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceIssuerAndSerialNumber(
    PKICONTEXT *ctx,
    PKIIssuerAndSerialNumber *f);
size_t PKIPackIssuerAndSerialNumberInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIIssuerAndSerialNumber *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceIssuerAndSerialNumber (
    PKICONTEXT *ctx,
    PKIIssuerAndSerialNumber *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackIssuerAndSerialNumberInternal(
    PKICONTEXT *ctx,
    PKIIssuerAndSerialNumber **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

#define PKISizeofKeyEncryptionAlgorithmIdentifierInternal PKISizeofAlgorithmIdentifierInternal
#define PKIDropInPlaceKeyEncryptionAlgorithmIdentifier PKIDropInPlaceAlgorithmIdentifier
#define PKIPackKeyEncryptionAlgorithmIdentifierInternal PKIPackAlgorithmIdentifierInternal
#define PKIUnpkInPlaceKeyEncryptionAlgorithmIdentifier PKIUnpkInPlaceAlgorithmIdentifier
#define PKIUnpackKeyEncryptionAlgorithmIdentifierInternal PKIUnpackAlgorithmIdentifierInternal

#define PKISizeofSignatureAlgorithmIdentifierInternal PKISizeofAlgorithmIdentifierInternal
#define PKIDropInPlaceSignatureAlgorithmIdentifier PKIDropInPlaceAlgorithmIdentifier
#define PKIPackSignatureAlgorithmIdentifierInternal PKIPackAlgorithmIdentifierInternal
#define PKIUnpkInPlaceSignatureAlgorithmIdentifier PKIUnpkInPlaceAlgorithmIdentifier
#define PKIUnpackSignatureAlgorithmIdentifierInternal PKIUnpackAlgorithmIdentifierInternal

size_t PKISizeofDigestAlgorithmIdentifiersInternal(
    PKIDigestAlgorithmIdentifiers *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceDigestAlgorithmIdentifiers(
    PKICONTEXT *ctx,
    PKIDigestAlgorithmIdentifiers *f);
size_t PKIPackDigestAlgorithmIdentifiersInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDigestAlgorithmIdentifiers *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceDigestAlgorithmIdentifiers (
    PKICONTEXT *ctx,
    PKIDigestAlgorithmIdentifiers *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackDigestAlgorithmIdentifiersInternal(
    PKICONTEXT *ctx,
    PKIDigestAlgorithmIdentifiers **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofDigestInfoInternal(
    PKIDigestInfo *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceDigestInfo(
    PKICONTEXT *ctx,
    PKIDigestInfo *f);
size_t PKIPackDigestInfoInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIDigestInfo *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceDigestInfo (
    PKICONTEXT *ctx,
    PKIDigestInfo *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackDigestInfoInternal(
    PKICONTEXT *ctx,
    PKIDigestInfo **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofEncryptedContentInfoInternal(
    PKIEncryptedContentInfo *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceEncryptedContentInfo(
    PKICONTEXT *ctx,
    PKIEncryptedContentInfo *f);
size_t PKIPackEncryptedContentInfoInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIEncryptedContentInfo *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceEncryptedContentInfo (
    PKICONTEXT *ctx,
    PKIEncryptedContentInfo *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackEncryptedContentInfoInternal(
    PKICONTEXT *ctx,
    PKIEncryptedContentInfo **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofExtendedCertificateInternal(
    PKIExtendedCertificate *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceExtendedCertificate(
    PKICONTEXT *ctx,
    PKIExtendedCertificate *f);
size_t PKIPackExtendedCertificateInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIExtendedCertificate *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceExtendedCertificate (
    PKICONTEXT *ctx,
    PKIExtendedCertificate *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackExtendedCertificateInternal(
    PKICONTEXT *ctx,
    PKIExtendedCertificate **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofRecipientInfoInternal(
    PKIRecipientInfo *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceRecipientInfo(
    PKICONTEXT *ctx,
    PKIRecipientInfo *f);
size_t PKIPackRecipientInfoInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIRecipientInfo *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceRecipientInfo (
    PKICONTEXT *ctx,
    PKIRecipientInfo *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackRecipientInfoInternal(
    PKICONTEXT *ctx,
    PKIRecipientInfo **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofSignerInfoInternal(
    PKISignerInfo *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceSignerInfo(
    PKICONTEXT *ctx,
    PKISignerInfo *f);
size_t PKIPackSignerInfoInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKISignerInfo *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceSignerInfo (
    PKICONTEXT *ctx,
    PKISignerInfo *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackSignerInfoInternal(
    PKICONTEXT *ctx,
    PKISignerInfo **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofEncryptedDataInternal(
    PKIEncryptedData *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceEncryptedData(
    PKICONTEXT *ctx,
    PKIEncryptedData *f);
size_t PKIPackEncryptedDataInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIEncryptedData *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceEncryptedData (
    PKICONTEXT *ctx,
    PKIEncryptedData *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackEncryptedDataInternal(
    PKICONTEXT *ctx,
    PKIEncryptedData **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofExtendedCertificateOrCertificateInternal(
    PKIExtendedCertificateOrCertificate *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceExtendedCertificateOrCertificate(
    PKICONTEXT *ctx,
    PKIExtendedCertificateOrCertificate *f);
size_t PKIPackExtendedCertificateOrCertificateInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIExtendedCertificateOrCertificate *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceExtendedCertificateOrCertificate (
    PKICONTEXT *ctx,
    PKIExtendedCertificateOrCertificate *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackExtendedCertificateOrCertificateInternal(
    PKICONTEXT *ctx,
    PKIExtendedCertificateOrCertificate **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofRecipientInfosInternal(
    PKIRecipientInfos *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceRecipientInfos(
    PKICONTEXT *ctx,
    PKIRecipientInfos *f);
size_t PKIPackRecipientInfosInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIRecipientInfos *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceRecipientInfos (
    PKICONTEXT *ctx,
    PKIRecipientInfos *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackRecipientInfosInternal(
    PKICONTEXT *ctx,
    PKIRecipientInfos **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofSignerInfosInternal(
    PKISignerInfos *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceSignerInfos(
    PKICONTEXT *ctx,
    PKISignerInfos *f);
size_t PKIPackSignerInfosInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKISignerInfos *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceSignerInfos (
    PKICONTEXT *ctx,
    PKISignerInfos *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackSignerInfosInternal(
    PKICONTEXT *ctx,
    PKISignerInfos **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofEnvelopedDataInternal(
    PKIEnvelopedData *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceEnvelopedData(
    PKICONTEXT *ctx,
    PKIEnvelopedData *f);
size_t PKIPackEnvelopedDataInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIEnvelopedData *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceEnvelopedData (
    PKICONTEXT *ctx,
    PKIEnvelopedData *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackEnvelopedDataInternal(
    PKICONTEXT *ctx,
    PKIEnvelopedData **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofExtendedCertificatesAndCertificatesInternal(
    PKIExtendedCertificatesAndCertificates *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceExtendedCertificatesAndCertificates(
    PKICONTEXT *ctx,
    PKIExtendedCertificatesAndCertificates *f);
size_t PKIPackExtendedCertificatesAndCertificatesInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIExtendedCertificatesAndCertificates *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceExtendedCertificatesAndCertificates (
    PKICONTEXT *ctx,
    PKIExtendedCertificatesAndCertificates *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackExtendedCertificatesAndCertificatesInternal(
    PKICONTEXT *ctx,
    PKIExtendedCertificatesAndCertificates **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);

size_t PKISizeofSignedDataInternal(
    PKISignedData *asnstruct,
    int outerSizeFlag,
    int expTaggedFlag);
void PKIDropInPlaceSignedData(
    PKICONTEXT *ctx,
    PKISignedData *f);
size_t PKIPackSignedDataInternal(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKISignedData *asnstruct,
    unsigned char tag,
    int *erret);
size_t PKIUnpkInPlaceSignedData (
    PKICONTEXT *ctx,
    PKISignedData *asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);
size_t PKIUnpackSignedDataInternal(
    PKICONTEXT *ctx,
    PKISignedData **asnstruct,
    unsigned char *buf,
    size_t buflen,
    unsigned char tag,
    int *erret);


#endif /* pkcs7_H_ */
