/*******************************************************************
 *
 * This file was generated by TIS/ASN1COMP Ver. 4.1, an ASN.1 compiler.
 * TIS/ASN1COMP is Copyright (c) 1998, TIS Labs at Network Associates, Inc.
 *
 * This file was AUTOMATICALLY GENERATED on Fri Apr  9 20:37:30 1999
 *
 ******************************************************************/

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

#ifndef pkcs12_ASN_H_
#define pkcs12_ASN_H_

#include <stdio.h>

#include "pkcs12.h"

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

#define PKINewLocalKeyID  (PKILocalKeyID *)PKINewOCTET_STRING
#define PKIFreeLocalKeyID PKIFreeOCTET_STRING
#define PKISizeofLocalKeyID PKISizeofOCTET_STRING
#define PKIPackLocalKeyID PKIPackOCTET_STRING
#define PKIUnpackLocalKeyID PKIUnpackOCTET_STRING

#define PKINewSDSICertificate  (PKISDSICertificate *)PKINewIA5String
#define PKIFreeSDSICertificate PKIFreeIA5String
#define PKISizeofSDSICertificate PKISizeofIA5String
#define PKIPackSDSICertificate PKIPackIA5String
#define PKIUnpackSDSICertificate PKIUnpackIA5String

#define PKINewX509Certificate  (PKIX509Certificate *)PKINewOCTET_STRING
#define PKIFreeX509Certificate PKIFreeOCTET_STRING
#define PKISizeofX509Certificate PKISizeofOCTET_STRING
#define PKIPackX509Certificate PKIPackOCTET_STRING
#define PKIUnpackX509Certificate PKIUnpackOCTET_STRING

#define PKINewX509Crl  (PKIX509Crl *)PKINewOCTET_STRING
#define PKIFreeX509Crl PKIFreeOCTET_STRING
#define PKISizeofX509Crl PKISizeofOCTET_STRING
#define PKIPackX509Crl PKIPackOCTET_STRING
#define PKIUnpackX509Crl PKIUnpackOCTET_STRING

PKIAuthenticatedSafes *PKINewAuthenticatedSafes(
    PKICONTEXT *ctx);
void PKIFreeAuthenticatedSafes(
    PKICONTEXT *ctx,
    PKIAuthenticatedSafes *f);
size_t PKISizeofAuthenticatedSafes (
    PKICONTEXT *ctx,
    PKIAuthenticatedSafes *asnstruct,
    int outerSizeFlag);
size_t PKIPackAuthenticatedSafes(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIAuthenticatedSafes *asnstruct,
    int *erret);
size_t PKIUnpackAuthenticatedSafes(
    PKICONTEXT *ctx,
    PKIAuthenticatedSafes **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKICRLBag *PKINewCRLBag(
    PKICONTEXT *ctx);
void PKIFreeCRLBag(
    PKICONTEXT *ctx,
    PKICRLBag *f);
size_t PKISizeofCRLBag (
    PKICONTEXT *ctx,
    PKICRLBag *asnstruct,
    int outerSizeFlag);
size_t PKIPackCRLBag(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICRLBag *asnstruct,
    int *erret);
size_t PKIUnpackCRLBag(
    PKICONTEXT *ctx,
    PKICRLBag **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKICertBag *PKINewCertBag(
    PKICONTEXT *ctx);
void PKIFreeCertBag(
    PKICONTEXT *ctx,
    PKICertBag *f);
size_t PKISizeofCertBag (
    PKICONTEXT *ctx,
    PKICertBag *asnstruct,
    int outerSizeFlag);
size_t PKIPackCertBag(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKICertBag *asnstruct,
    int *erret);
size_t PKIUnpackCertBag(
    PKICONTEXT *ctx,
    PKICertBag **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

#define PKINewKeyBag  (PKIKeyBag *)PKINewPrivateKeyInfo
#define PKIFreeKeyBag PKIFreePrivateKeyInfo
#define PKISizeofKeyBag PKISizeofPrivateKeyInfo
#define PKIPackKeyBag PKIPackPrivateKeyInfo
#define PKIUnpackKeyBag PKIUnpackPrivateKeyInfo

PKIMacData *PKINewMacData(
    PKICONTEXT *ctx);
void PKIFreeMacData(
    PKICONTEXT *ctx,
    PKIMacData *f);
size_t PKISizeofMacData (
    PKICONTEXT *ctx,
    PKIMacData *asnstruct,
    int outerSizeFlag);
size_t PKIPackMacData(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIMacData *asnstruct,
    int *erret);
size_t PKIUnpackMacData(
    PKICONTEXT *ctx,
    PKIMacData **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

#define PKINewPKCS_8ShroudedKeyBag  (PKIPKCS_8ShroudedKeyBag *)PKINewEncryptedPrivateKeyInfo
#define PKIFreePKCS_8ShroudedKeyBag PKIFreeEncryptedPrivateKeyInfo
#define PKISizeofPKCS_8ShroudedKeyBag PKISizeofEncryptedPrivateKeyInfo
#define PKIPackPKCS_8ShroudedKeyBag PKIPackEncryptedPrivateKeyInfo
#define PKIUnpackPKCS_8ShroudedKeyBag PKIUnpackEncryptedPrivateKeyInfo

PKISafeBag *PKINewSafeBag(
    PKICONTEXT *ctx);
void PKIFreeSafeBag(
    PKICONTEXT *ctx,
    PKISafeBag *f);
size_t PKISizeofSafeBag (
    PKICONTEXT *ctx,
    PKISafeBag *asnstruct,
    int outerSizeFlag);
size_t PKIPackSafeBag(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKISafeBag *asnstruct,
    int *erret);
size_t PKIUnpackSafeBag(
    PKICONTEXT *ctx,
    PKISafeBag **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKISecretBag *PKINewSecretBag(
    PKICONTEXT *ctx);
void PKIFreeSecretBag(
    PKICONTEXT *ctx,
    PKISecretBag *f);
size_t PKISizeofSecretBag (
    PKICONTEXT *ctx,
    PKISecretBag *asnstruct,
    int outerSizeFlag);
size_t PKIPackSecretBag(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKISecretBag *asnstruct,
    int *erret);
size_t PKIUnpackSecretBag(
    PKICONTEXT *ctx,
    PKISecretBag **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIpkcs_12PbeParams *PKINewpkcs_12PbeParams(
    PKICONTEXT *ctx);
void PKIFreepkcs_12PbeParams(
    PKICONTEXT *ctx,
    PKIpkcs_12PbeParams *f);
size_t PKISizeofpkcs_12PbeParams (
    PKICONTEXT *ctx,
    PKIpkcs_12PbeParams *asnstruct,
    int outerSizeFlag);
size_t PKIPackpkcs_12PbeParams(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIpkcs_12PbeParams *asnstruct,
    int *erret);
size_t PKIUnpackpkcs_12PbeParams(
    PKICONTEXT *ctx,
    PKIpkcs_12PbeParams **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIPFX *PKINewPFX(
    PKICONTEXT *ctx);
void PKIFreePFX(
    PKICONTEXT *ctx,
    PKIPFX *f);
size_t PKISizeofPFX (
    PKICONTEXT *ctx,
    PKIPFX *asnstruct,
    int outerSizeFlag);
size_t PKIPackPFX(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIPFX *asnstruct,
    int *erret);
size_t PKIUnpackPFX(
    PKICONTEXT *ctx,
    PKIPFX **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKISafeContents *PKINewSafeContents(
    PKICONTEXT *ctx);
void PKIFreeSafeContents(
    PKICONTEXT *ctx,
    PKISafeContents *f);
size_t PKISizeofSafeContents (
    PKICONTEXT *ctx,
    PKISafeContents *asnstruct,
    int outerSizeFlag);
size_t PKIPackSafeContents(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKISafeContents *asnstruct,
    int *erret);
size_t PKIUnpackSafeContents(
    PKICONTEXT *ctx,
    PKISafeContents **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

#define PKINewSafeContentsBag  (PKISafeContentsBag *)PKINewSafeContents
#define PKIFreeSafeContentsBag PKIFreeSafeContents
#define PKISizeofSafeContentsBag PKISizeofSafeContents
#define PKIPackSafeContentsBag PKIPackSafeContents
#define PKIUnpackSafeContentsBag PKIUnpackSafeContents

#endif /* pkcs12_ASN_H_ */
