/**
 * This file was generated by the Objective Systems ASN1C Compiler
 * (http://www.obj-sys.com).  Version: 5.63.
 */
#ifndef AUTHENTICATIONFRAMEWORK_H
#define AUTHENTICATIONFRAMEWORK_H

#include <stdio.h>
#include <stdlib.h>
#include "asn1BerCppTypes.h"
#include "asn1XerCppTypes.h"
#include "rtTable.h"
#include "ASN1CBitStr.h"
#include "ASN1CSeqOfList.h"
#include "PKIX1Explicit88.h"
#include "CertificateExtensions.h"
#include "PKIX1Explicit88BaseTypes.h"
namespace asn1data {

/**************************************************************/
/*                                                            */
/*  AttributeType                                             */
/*                                                            */
/**************************************************************/

typedef ASN1TObjId ASN1T_AttributeType;

class EXTERN ASN1C_AttributeType :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_AttributeType& msgData;
public:
   ASN1C_AttributeType (ASN1T_AttributeType& data);
   ASN1C_AttributeType (
      ASN1MessageBufferIF& msgBuf, ASN1T_AttributeType& data);
   ASN1C_AttributeType (ASN1C_AttributeType& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_AttributeType& getCopy (ASN1T_AttributeType* pDstData = 0);
   ASN1T_AttributeType* newCopy ();

   inline ASN1C_AttributeType& operator= (ASN1C_AttributeType& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }
} ;

EXTERN int asn1E_AttributeType (ASN1CTXT* pctxt,
   ASN1T_AttributeType *pvalue, ASN1TagType tagging);

EXTERN int asn1D_AttributeType (ASN1CTXT* pctxt,
   ASN1T_AttributeType *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_AttributeType
  (ASN1CTXT* pctxt, ASN1T_AttributeType* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_AttributeType (ASN1CTXT *pctxt, ASN1T_AttributeType* pSrcValue, ASN1T_AttributeType* pDstValue);

/**************************************************************/
/*                                                            */
/*  ENCRYPTED_HASH                                            */
/*                                                            */
/**************************************************************/

typedef ASN1TDynBitStr ASN1T_ENCRYPTED_HASH;

class EXTERN ASN1C_ENCRYPTED_HASH :
   public ASN1CBitStr, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_ENCRYPTED_HASH& msgData;
public:
   ASN1C_ENCRYPTED_HASH (ASN1T_ENCRYPTED_HASH& data);
   ASN1C_ENCRYPTED_HASH (
      ASN1MessageBufferIF& msgBuf, ASN1T_ENCRYPTED_HASH& data);
   ASN1C_ENCRYPTED_HASH (ASN1C_ENCRYPTED_HASH& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_ENCRYPTED_HASH& getCopy (ASN1T_ENCRYPTED_HASH* pDstData = 0);
   ASN1T_ENCRYPTED_HASH* newCopy ();

   ASN1C_ENCRYPTED_HASH& operator= (ASN1C_ENCRYPTED_HASH& srcData);
} ;

EXTERN int asn1E_ENCRYPTED_HASH (ASN1CTXT* pctxt,
   ASN1T_ENCRYPTED_HASH *pvalue, ASN1TagType tagging);

EXTERN int asn1D_ENCRYPTED_HASH (ASN1CTXT* pctxt,
   ASN1T_ENCRYPTED_HASH *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_ENCRYPTED_HASH
  (ASN1CTXT* pctxt, ASN1T_ENCRYPTED_HASH* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_ENCRYPTED_HASH (ASN1CTXT *pctxt, ASN1T_ENCRYPTED_HASH* pSrcValue, ASN1T_ENCRYPTED_HASH* pDstValue);

EXTERN void asn1Free_ENCRYPTED_HASH (ASN1CTXT *pctxt, ASN1T_ENCRYPTED_HASH* pvalue);

/**************************************************************/
/*                                                            */
/*  ENCRYPTED                                                 */
/*                                                            */
/**************************************************************/

typedef ASN1TDynBitStr ASN1T_ENCRYPTED;

class EXTERN ASN1C_ENCRYPTED :
   public ASN1CBitStr, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_ENCRYPTED& msgData;
public:
   ASN1C_ENCRYPTED (ASN1T_ENCRYPTED& data);
   ASN1C_ENCRYPTED (
      ASN1MessageBufferIF& msgBuf, ASN1T_ENCRYPTED& data);
   ASN1C_ENCRYPTED (ASN1C_ENCRYPTED& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_ENCRYPTED& getCopy (ASN1T_ENCRYPTED* pDstData = 0);
   ASN1T_ENCRYPTED* newCopy ();

   ASN1C_ENCRYPTED& operator= (ASN1C_ENCRYPTED& srcData);
} ;

EXTERN int asn1E_ENCRYPTED (ASN1CTXT* pctxt,
   ASN1T_ENCRYPTED *pvalue, ASN1TagType tagging);

EXTERN int asn1D_ENCRYPTED (ASN1CTXT* pctxt,
   ASN1T_ENCRYPTED *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_ENCRYPTED
  (ASN1CTXT* pctxt, ASN1T_ENCRYPTED* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_ENCRYPTED (ASN1CTXT *pctxt, ASN1T_ENCRYPTED* pSrcValue, ASN1T_ENCRYPTED* pDstValue);

EXTERN void asn1Free_ENCRYPTED (ASN1CTXT *pctxt, ASN1T_ENCRYPTED* pvalue);

/**************************************************************/
/*                                                            */
/*  AttributeCertificateInfo_subject                          */
/*                                                            */
/**************************************************************/

/* Choice tag constants */

#define T_AttributeCertificateInfo_subject_baseCertificateID 1
#define T_AttributeCertificateInfo_subject_subjectName 2

class EXTERN ASN1C_AttributeCertificateInfo_subject;

typedef struct EXTERN ASN1T_AttributeCertificateInfo_subject : public ASN1TPDU {
   int t;
   union {
      /* t = 1 */
      ASN1T_IssuerSerial *baseCertificateID;
      /* t = 2 */
      ASN1T_GeneralNames *subjectName;
   } u;
   ASN1T_AttributeCertificateInfo_subject () {}
   ASN1T_AttributeCertificateInfo_subject (ASN1C_AttributeCertificateInfo_subject& srcData);
   ~ASN1T_AttributeCertificateInfo_subject ();
} ASN1T_AttributeCertificateInfo_subject;

class EXTERN ASN1C_AttributeCertificateInfo_subject :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_AttributeCertificateInfo_subject& msgData;
   struct ElementID {
      enum {
         _unknown, baseCertificateID, subjectName
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_IssuerSerial* mpBaseCertificateIDC;
   class ASN1C_GeneralNames* mpSubjectNameC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
public:
   ASN1C_AttributeCertificateInfo_subject (ASN1T_AttributeCertificateInfo_subject& data);
   ASN1C_AttributeCertificateInfo_subject (
      ASN1MessageBufferIF& msgBuf, ASN1T_AttributeCertificateInfo_subject& data);
   ASN1C_AttributeCertificateInfo_subject (ASN1C_AttributeCertificateInfo_subject& original);

   ~ASN1C_AttributeCertificateInfo_subject();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_AttributeCertificateInfo_subject& getCopy (ASN1T_AttributeCertificateInfo_subject* pDstData = 0);
   ASN1T_AttributeCertificateInfo_subject* newCopy ();

   inline ASN1C_AttributeCertificateInfo_subject& operator= (ASN1C_AttributeCertificateInfo_subject& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_AttributeCertificateInfo_subject (ASN1CTXT* pctxt,
   ASN1T_AttributeCertificateInfo_subject *pvalue, ASN1TagType tagging);

EXTERN int asn1D_AttributeCertificateInfo_subject (ASN1CTXT* pctxt,
   ASN1T_AttributeCertificateInfo_subject *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_AttributeCertificateInfo_subject
  (ASN1CTXT* pctxt, ASN1T_AttributeCertificateInfo_subject* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_AttributeCertificateInfo_subject (ASN1CTXT *pctxt, ASN1T_AttributeCertificateInfo_subject* pSrcValue, ASN1T_AttributeCertificateInfo_subject* pDstValue);

EXTERN void asn1Free_AttributeCertificateInfo_subject (ASN1CTXT *pctxt, ASN1T_AttributeCertificateInfo_subject* pvalue);

/**************************************************************/
/*                                                            */
/*  AttCertValidityPeriod                                     */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_AttCertValidityPeriod;

typedef struct EXTERN ASN1T_AttCertValidityPeriod : public ASN1TPDU {
   ASN1GeneralizedTime notBeforeTime;
   ASN1GeneralizedTime notAfterTime;
   ASN1T_AttCertValidityPeriod ();
   ASN1T_AttCertValidityPeriod (ASN1C_AttCertValidityPeriod& srcData);
   ~ASN1T_AttCertValidityPeriod ();
} ASN1T_AttCertValidityPeriod;

class EXTERN ASN1C_AttCertValidityPeriod :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_AttCertValidityPeriod& msgData;
   struct ElementID {
      enum {
         _unknown, notBeforeTime, notAfterTime
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_AttCertValidityPeriod (ASN1T_AttCertValidityPeriod& data);
   ASN1C_AttCertValidityPeriod (
      ASN1MessageBufferIF& msgBuf, ASN1T_AttCertValidityPeriod& data);
   ASN1C_AttCertValidityPeriod (ASN1C_AttCertValidityPeriod& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_AttCertValidityPeriod& getCopy (ASN1T_AttCertValidityPeriod* pDstData = 0);
   ASN1T_AttCertValidityPeriod* newCopy ();

   inline ASN1C_AttCertValidityPeriod& operator= (ASN1C_AttCertValidityPeriod& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_AttCertValidityPeriod (ASN1CTXT* pctxt,
   ASN1T_AttCertValidityPeriod *pvalue, ASN1TagType tagging);

EXTERN int asn1D_AttCertValidityPeriod (ASN1CTXT* pctxt,
   ASN1T_AttCertValidityPeriod *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_AttCertValidityPeriod
  (ASN1CTXT* pctxt, ASN1T_AttCertValidityPeriod* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_AttCertValidityPeriod (ASN1CTXT *pctxt, ASN1T_AttCertValidityPeriod* pSrcValue, ASN1T_AttCertValidityPeriod* pDstValue);

EXTERN void asn1Free_AttCertValidityPeriod (ASN1CTXT *pctxt, ASN1T_AttCertValidityPeriod* pvalue);

/**************************************************************/
/*                                                            */
/*  _SeqOfAttribute                                           */
/*                                                            */
/**************************************************************/

/* List of ASN1T_Attribute */
typedef struct EXTERN ASN1T__SeqOfAttribute : public ASN1TPDUSeqOfList {
   ~ASN1T__SeqOfAttribute();
} ASN1T__SeqOfAttribute;

class EXTERN ASN1C__SeqOfAttribute :
   public ASN1CSeqOfList, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T__SeqOfAttribute& msgData;
   ASN1T_Attribute *mpElement;
   class ASN1C_Attribute* mpElementC;
   ASN1XERSAXDecodeHandler* mpCurrElem;

public:
   ASN1C__SeqOfAttribute (ASN1T__SeqOfAttribute& data);
   ASN1C__SeqOfAttribute (
      ASN1MessageBufferIF& msgBuf, ASN1T__SeqOfAttribute& data);
   ASN1C__SeqOfAttribute (ASN1C__SeqOfAttribute& original);

   ~ASN1C__SeqOfAttribute();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T__SeqOfAttribute& getCopy (ASN1T__SeqOfAttribute* pDstData = 0);
   ASN1T__SeqOfAttribute* newCopy ();

   ASN1C__SeqOfAttribute& operator= (ASN1C__SeqOfAttribute& srcData);
   void Append (ASN1T_Attribute * elem) {
      append ((void*)elem);
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E__SeqOfAttribute (ASN1CTXT* pctxt,
   ASN1T__SeqOfAttribute *pvalue, ASN1TagType tagging);

EXTERN int asn1D__SeqOfAttribute (ASN1CTXT* pctxt,
   ASN1T__SeqOfAttribute *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE__SeqOfAttribute
  (ASN1CTXT* pctxt, ASN1T__SeqOfAttribute* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy__SeqOfAttribute (ASN1CTXT *pctxt, ASN1T__SeqOfAttribute* pSrcValue, ASN1T__SeqOfAttribute* pDstValue);

EXTERN void asn1Free__SeqOfAttribute (ASN1CTXT *pctxt, ASN1T__SeqOfAttribute* pvalue);

/**************************************************************/
/*                                                            */
/*  AttributeCertificateInfo                                  */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_AttributeCertificateInfo;

typedef struct EXTERN ASN1T_AttributeCertificateInfo : public ASN1TPDU {
   struct {
      unsigned versionPresent : 1;
      unsigned issuerUniqueIDPresent : 1;
      unsigned extensionsPresent : 1;
   } m;
   ASN1T_Version version;
   ASN1T_AttributeCertificateInfo_subject subject;
   ASN1T_GeneralNames issuer;
   ASN1T_AlgorithmIdentifier signature;
   ASN1T_CertificateSerialNumber serialNumber;
   ASN1T_AttCertValidityPeriod attCertValidityPeriod;
   ASN1T__SeqOfAttribute attributes;
   ASN1T_UniqueIdentifier issuerUniqueID;
   ASN1T_Extensions extensions;
   ASN1T_AttributeCertificateInfo ();
   ASN1T_AttributeCertificateInfo (ASN1C_AttributeCertificateInfo& srcData);
   ~ASN1T_AttributeCertificateInfo ();
} ASN1T_AttributeCertificateInfo;

class EXTERN ASN1C_AttributeCertificateInfo :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_AttributeCertificateInfo& msgData;
   struct ElementID {
      enum {
         _unknown, version, subject, issuer, signature, serialNumber,
         attCertValidityPeriod, attributes, issuerUniqueID, extensions
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_AttributeCertificateInfo_subject* mpSubjectC;
   class ASN1C_GeneralNames* mpIssuerC;
   class ASN1C_AlgorithmIdentifier* mpSignatureC;
   class ASN1C_AttCertValidityPeriod* mpAttCertValidityPeriodC;
   class ASN1C__SeqOfAttribute* mpAttributesC;
   class ASN1C_Extensions* mpExtensionsC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_AttributeCertificateInfo (ASN1T_AttributeCertificateInfo& data);
   ASN1C_AttributeCertificateInfo (
      ASN1MessageBufferIF& msgBuf, ASN1T_AttributeCertificateInfo& data);
   ASN1C_AttributeCertificateInfo (ASN1C_AttributeCertificateInfo& original);

   ~ASN1C_AttributeCertificateInfo();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_AttributeCertificateInfo& getCopy (ASN1T_AttributeCertificateInfo* pDstData = 0);
   ASN1T_AttributeCertificateInfo* newCopy ();

   inline ASN1C_AttributeCertificateInfo& operator= (ASN1C_AttributeCertificateInfo& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_AttributeCertificateInfo (ASN1CTXT* pctxt,
   ASN1T_AttributeCertificateInfo *pvalue, ASN1TagType tagging);

EXTERN int asn1D_AttributeCertificateInfo (ASN1CTXT* pctxt,
   ASN1T_AttributeCertificateInfo *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_AttributeCertificateInfo
  (ASN1CTXT* pctxt, ASN1T_AttributeCertificateInfo* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_AttributeCertificateInfo (ASN1CTXT *pctxt, ASN1T_AttributeCertificateInfo* pSrcValue, ASN1T_AttributeCertificateInfo* pDstValue);

EXTERN void asn1Free_AttributeCertificateInfo (ASN1CTXT *pctxt, ASN1T_AttributeCertificateInfo* pvalue);

/**************************************************************/
/*                                                            */
/*  AttributeCertificate                                      */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_AttributeCertificate;

typedef struct EXTERN ASN1T_AttributeCertificate : public ASN1TPDU {
   ASN1T_AttributeCertificateInfo toBeSigned;
   ASN1T_AlgorithmIdentifier algorithmIdentifier;
   ASN1T_ENCRYPTED_HASH encrypted;
   ASN1T_AttributeCertificate ();
   ASN1T_AttributeCertificate (ASN1C_AttributeCertificate& srcData);
   ~ASN1T_AttributeCertificate ();
} ASN1T_AttributeCertificate;

class EXTERN ASN1C_AttributeCertificate :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_AttributeCertificate& msgData;
   struct ElementID {
      enum {
         _unknown, toBeSigned, algorithmIdentifier, encrypted
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_AttributeCertificateInfo* mpToBeSignedC;
   class ASN1C_AlgorithmIdentifier* mpAlgorithmIdentifierC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_AttributeCertificate (ASN1T_AttributeCertificate& data);
   ASN1C_AttributeCertificate (
      ASN1MessageBufferIF& msgBuf, ASN1T_AttributeCertificate& data);
   ASN1C_AttributeCertificate (ASN1C_AttributeCertificate& original);

   ~ASN1C_AttributeCertificate();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_AttributeCertificate& getCopy (ASN1T_AttributeCertificate* pDstData = 0);
   ASN1T_AttributeCertificate* newCopy ();

   inline ASN1C_AttributeCertificate& operator= (ASN1C_AttributeCertificate& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_AttributeCertificate (ASN1CTXT* pctxt,
   ASN1T_AttributeCertificate *pvalue, ASN1TagType tagging);

EXTERN int asn1D_AttributeCertificate (ASN1CTXT* pctxt,
   ASN1T_AttributeCertificate *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_AttributeCertificate
  (ASN1CTXT* pctxt, ASN1T_AttributeCertificate* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_AttributeCertificate (ASN1CTXT *pctxt, ASN1T_AttributeCertificate* pSrcValue, ASN1T_AttributeCertificate* pDstValue);

EXTERN void asn1Free_AttributeCertificate (ASN1CTXT *pctxt, ASN1T_AttributeCertificate* pvalue);

/**************************************************************/
/*                                                            */
/*  CrossCertificates                                         */
/*                                                            */
/**************************************************************/

/* List of ASN1T_Certificate */
typedef struct EXTERN ASN1T_CrossCertificates : public ASN1TPDUSeqOfList {
   ~ASN1T_CrossCertificates();
} ASN1T_CrossCertificates;

class EXTERN ASN1C_CrossCertificates :
   public ASN1CSeqOfList, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_CrossCertificates& msgData;
   ASN1T_Certificate *mpElement;
   class ASN1C_Certificate* mpElementC;
   ASN1XERSAXDecodeHandler* mpCurrElem;

public:
   ASN1C_CrossCertificates (ASN1T_CrossCertificates& data);
   ASN1C_CrossCertificates (
      ASN1MessageBufferIF& msgBuf, ASN1T_CrossCertificates& data);
   ASN1C_CrossCertificates (ASN1C_CrossCertificates& original);

   ~ASN1C_CrossCertificates();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_CrossCertificates& getCopy (ASN1T_CrossCertificates* pDstData = 0);
   ASN1T_CrossCertificates* newCopy ();

   ASN1C_CrossCertificates& operator= (ASN1C_CrossCertificates& srcData);
   void Append (ASN1T_Certificate * elem) {
      append ((void*)elem);
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_CrossCertificates (ASN1CTXT* pctxt,
   ASN1T_CrossCertificates *pvalue, ASN1TagType tagging);

EXTERN int asn1D_CrossCertificates (ASN1CTXT* pctxt,
   ASN1T_CrossCertificates *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_CrossCertificates
  (ASN1CTXT* pctxt, ASN1T_CrossCertificates* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_CrossCertificates (ASN1CTXT *pctxt, ASN1T_CrossCertificates* pSrcValue, ASN1T_CrossCertificates* pDstValue);

EXTERN void asn1Free_CrossCertificates (ASN1CTXT *pctxt, ASN1T_CrossCertificates* pvalue);

/**************************************************************/
/*                                                            */
/*  ForwardCertificationPath                                  */
/*                                                            */
/**************************************************************/

/* List of ASN1T_CrossCertificates */
typedef struct EXTERN ASN1T_ForwardCertificationPath : public ASN1TPDUSeqOfList {
   ~ASN1T_ForwardCertificationPath();
} ASN1T_ForwardCertificationPath;

class EXTERN ASN1C_ForwardCertificationPath :
   public ASN1CSeqOfList, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_ForwardCertificationPath& msgData;
   ASN1T_CrossCertificates *mpElement;
   class ASN1C_CrossCertificates* mpElementC;
   ASN1XERSAXDecodeHandler* mpCurrElem;

public:
   ASN1C_ForwardCertificationPath (ASN1T_ForwardCertificationPath& data);
   ASN1C_ForwardCertificationPath (
      ASN1MessageBufferIF& msgBuf, ASN1T_ForwardCertificationPath& data);
   ASN1C_ForwardCertificationPath (ASN1C_ForwardCertificationPath& original);

   ~ASN1C_ForwardCertificationPath();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_ForwardCertificationPath& getCopy (ASN1T_ForwardCertificationPath* pDstData = 0);
   ASN1T_ForwardCertificationPath* newCopy ();

   ASN1C_ForwardCertificationPath& operator= (ASN1C_ForwardCertificationPath& srcData);
   void Append (ASN1T_CrossCertificates * elem) {
      append ((void*)elem);
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_ForwardCertificationPath (ASN1CTXT* pctxt,
   ASN1T_ForwardCertificationPath *pvalue, ASN1TagType tagging);

EXTERN int asn1D_ForwardCertificationPath (ASN1CTXT* pctxt,
   ASN1T_ForwardCertificationPath *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_ForwardCertificationPath
  (ASN1CTXT* pctxt, ASN1T_ForwardCertificationPath* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_ForwardCertificationPath (ASN1CTXT *pctxt, ASN1T_ForwardCertificationPath* pSrcValue, ASN1T_ForwardCertificationPath* pDstValue);

EXTERN void asn1Free_ForwardCertificationPath (ASN1CTXT *pctxt, ASN1T_ForwardCertificationPath* pvalue);

/**************************************************************/
/*                                                            */
/*  CertificatePair                                           */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_CertificatePair;

typedef struct EXTERN ASN1T_CertificatePair : public ASN1TPDU {
   struct {
      unsigned issuedByThisCAPresent : 1;
      unsigned issuedToThisCAPresent : 1;
   } m;
   ASN1T_Certificate issuedByThisCA;
   ASN1T_Certificate issuedToThisCA;
   ASN1T_CertificatePair ();
   ASN1T_CertificatePair (ASN1C_CertificatePair& srcData);
   ~ASN1T_CertificatePair ();
} ASN1T_CertificatePair;

class EXTERN ASN1C_CertificatePair :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_CertificatePair& msgData;
   struct ElementID {
      enum {
         _unknown, issuedByThisCA, issuedToThisCA
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_Certificate* mpIssuedByThisCAC;
   class ASN1C_Certificate* mpIssuedToThisCAC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   int mReqElemCnt;
public:
   ASN1C_CertificatePair (ASN1T_CertificatePair& data);
   ASN1C_CertificatePair (
      ASN1MessageBufferIF& msgBuf, ASN1T_CertificatePair& data);
   ASN1C_CertificatePair (ASN1C_CertificatePair& original);

   ~ASN1C_CertificatePair();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_CertificatePair& getCopy (ASN1T_CertificatePair* pDstData = 0);
   ASN1T_CertificatePair* newCopy ();

   inline ASN1C_CertificatePair& operator= (ASN1C_CertificatePair& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_CertificatePair (ASN1CTXT* pctxt,
   ASN1T_CertificatePair *pvalue, ASN1TagType tagging);

EXTERN int asn1D_CertificatePair (ASN1CTXT* pctxt,
   ASN1T_CertificatePair *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_CertificatePair
  (ASN1CTXT* pctxt, ASN1T_CertificatePair* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_CertificatePair (ASN1CTXT *pctxt, ASN1T_CertificatePair* pSrcValue, ASN1T_CertificatePair* pDstValue);

EXTERN void asn1Free_CertificatePair (ASN1CTXT *pctxt, ASN1T_CertificatePair* pvalue);

/**************************************************************/
/*                                                            */
/*  _SeqOfCertificatePair                                     */
/*                                                            */
/**************************************************************/

/* List of ASN1T_CertificatePair */
typedef struct EXTERN ASN1T__SeqOfCertificatePair : public ASN1TPDUSeqOfList {
   ~ASN1T__SeqOfCertificatePair();
} ASN1T__SeqOfCertificatePair;

class EXTERN ASN1C__SeqOfCertificatePair :
   public ASN1CSeqOfList, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T__SeqOfCertificatePair& msgData;
   ASN1T_CertificatePair *mpElement;
   class ASN1C_CertificatePair* mpElementC;
   ASN1XERSAXDecodeHandler* mpCurrElem;

public:
   ASN1C__SeqOfCertificatePair (ASN1T__SeqOfCertificatePair& data);
   ASN1C__SeqOfCertificatePair (
      ASN1MessageBufferIF& msgBuf, ASN1T__SeqOfCertificatePair& data);
   ASN1C__SeqOfCertificatePair (ASN1C__SeqOfCertificatePair& original);

   ~ASN1C__SeqOfCertificatePair();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T__SeqOfCertificatePair& getCopy (ASN1T__SeqOfCertificatePair* pDstData = 0);
   ASN1T__SeqOfCertificatePair* newCopy ();

   ASN1C__SeqOfCertificatePair& operator= (ASN1C__SeqOfCertificatePair& srcData);
   void Append (ASN1T_CertificatePair * elem) {
      append ((void*)elem);
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E__SeqOfCertificatePair (ASN1CTXT* pctxt,
   ASN1T__SeqOfCertificatePair *pvalue, ASN1TagType tagging);

EXTERN int asn1D__SeqOfCertificatePair (ASN1CTXT* pctxt,
   ASN1T__SeqOfCertificatePair *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE__SeqOfCertificatePair
  (ASN1CTXT* pctxt, ASN1T__SeqOfCertificatePair* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy__SeqOfCertificatePair (ASN1CTXT *pctxt, ASN1T__SeqOfCertificatePair* pSrcValue, ASN1T__SeqOfCertificatePair* pDstValue);

EXTERN void asn1Free__SeqOfCertificatePair (ASN1CTXT *pctxt, ASN1T__SeqOfCertificatePair* pvalue);

/**************************************************************/
/*                                                            */
/*  CertificationPath                                         */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_CertificationPath;

typedef struct EXTERN ASN1T_CertificationPath : public ASN1TPDU {
   struct {
      unsigned theCACertificatesPresent : 1;
   } m;
   ASN1T_Certificate userCertificate;
   ASN1T__SeqOfCertificatePair theCACertificates;
   ASN1T_CertificationPath ();
   ASN1T_CertificationPath (ASN1C_CertificationPath& srcData);
   ~ASN1T_CertificationPath ();
} ASN1T_CertificationPath;

class EXTERN ASN1C_CertificationPath :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_CertificationPath& msgData;
   struct ElementID {
      enum {
         _unknown, userCertificate, theCACertificates
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_Certificate* mpUserCertificateC;
   class ASN1C__SeqOfCertificatePair* mpTheCACertificatesC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   int mReqElemCnt;
public:
   ASN1C_CertificationPath (ASN1T_CertificationPath& data);
   ASN1C_CertificationPath (
      ASN1MessageBufferIF& msgBuf, ASN1T_CertificationPath& data);
   ASN1C_CertificationPath (ASN1C_CertificationPath& original);

   ~ASN1C_CertificationPath();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_CertificationPath& getCopy (ASN1T_CertificationPath* pDstData = 0);
   ASN1T_CertificationPath* newCopy ();

   inline ASN1C_CertificationPath& operator= (ASN1C_CertificationPath& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_CertificationPath (ASN1CTXT* pctxt,
   ASN1T_CertificationPath *pvalue, ASN1TagType tagging);

EXTERN int asn1D_CertificationPath (ASN1CTXT* pctxt,
   ASN1T_CertificationPath *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_CertificationPath
  (ASN1CTXT* pctxt, ASN1T_CertificationPath* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_CertificationPath (ASN1CTXT *pctxt, ASN1T_CertificationPath* pSrcValue, ASN1T_CertificationPath* pDstValue);

EXTERN void asn1Free_CertificationPath (ASN1CTXT *pctxt, ASN1T_CertificationPath* pvalue);

/**************************************************************/
/*                                                            */
/*  ACPathData                                                */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_ACPathData;

typedef struct EXTERN ASN1T_ACPathData : public ASN1TPDU {
   struct {
      unsigned certificatePresent : 1;
      unsigned attributeCertificatePresent : 1;
   } m;
   ASN1T_Certificate certificate;
   ASN1T_AttributeCertificate attributeCertificate;
   ASN1T_ACPathData ();
   ASN1T_ACPathData (ASN1C_ACPathData& srcData);
   ~ASN1T_ACPathData ();
} ASN1T_ACPathData;

class EXTERN ASN1C_ACPathData :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_ACPathData& msgData;
   struct ElementID {
      enum {
         _unknown, certificate, attributeCertificate
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_Certificate* mpCertificateC;
   class ASN1C_AttributeCertificate* mpAttributeCertificateC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   int mReqElemCnt;
public:
   ASN1C_ACPathData (ASN1T_ACPathData& data);
   ASN1C_ACPathData (
      ASN1MessageBufferIF& msgBuf, ASN1T_ACPathData& data);
   ASN1C_ACPathData (ASN1C_ACPathData& original);

   ~ASN1C_ACPathData();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_ACPathData& getCopy (ASN1T_ACPathData* pDstData = 0);
   ASN1T_ACPathData* newCopy ();

   inline ASN1C_ACPathData& operator= (ASN1C_ACPathData& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_ACPathData (ASN1CTXT* pctxt,
   ASN1T_ACPathData *pvalue, ASN1TagType tagging);

EXTERN int asn1D_ACPathData (ASN1CTXT* pctxt,
   ASN1T_ACPathData *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_ACPathData
  (ASN1CTXT* pctxt, ASN1T_ACPathData* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_ACPathData (ASN1CTXT *pctxt, ASN1T_ACPathData* pSrcValue, ASN1T_ACPathData* pDstValue);

EXTERN void asn1Free_ACPathData (ASN1CTXT *pctxt, ASN1T_ACPathData* pvalue);

/**************************************************************/
/*                                                            */
/*  _SeqOfACPathData                                          */
/*                                                            */
/**************************************************************/

/* List of ASN1T_ACPathData */
typedef struct EXTERN ASN1T__SeqOfACPathData : public ASN1TPDUSeqOfList {
   ~ASN1T__SeqOfACPathData();
} ASN1T__SeqOfACPathData;

class EXTERN ASN1C__SeqOfACPathData :
   public ASN1CSeqOfList, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T__SeqOfACPathData& msgData;
   ASN1T_ACPathData *mpElement;
   class ASN1C_ACPathData* mpElementC;
   ASN1XERSAXDecodeHandler* mpCurrElem;

public:
   ASN1C__SeqOfACPathData (ASN1T__SeqOfACPathData& data);
   ASN1C__SeqOfACPathData (
      ASN1MessageBufferIF& msgBuf, ASN1T__SeqOfACPathData& data);
   ASN1C__SeqOfACPathData (ASN1C__SeqOfACPathData& original);

   ~ASN1C__SeqOfACPathData();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T__SeqOfACPathData& getCopy (ASN1T__SeqOfACPathData* pDstData = 0);
   ASN1T__SeqOfACPathData* newCopy ();

   ASN1C__SeqOfACPathData& operator= (ASN1C__SeqOfACPathData& srcData);
   void Append (ASN1T_ACPathData * elem) {
      append ((void*)elem);
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E__SeqOfACPathData (ASN1CTXT* pctxt,
   ASN1T__SeqOfACPathData *pvalue, ASN1TagType tagging);

EXTERN int asn1D__SeqOfACPathData (ASN1CTXT* pctxt,
   ASN1T__SeqOfACPathData *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE__SeqOfACPathData
  (ASN1CTXT* pctxt, ASN1T__SeqOfACPathData* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy__SeqOfACPathData (ASN1CTXT *pctxt, ASN1T__SeqOfACPathData* pSrcValue, ASN1T__SeqOfACPathData* pDstValue);

EXTERN void asn1Free__SeqOfACPathData (ASN1CTXT *pctxt, ASN1T__SeqOfACPathData* pvalue);

/**************************************************************/
/*                                                            */
/*  AttributeCertificationPath                                */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_AttributeCertificationPath;

typedef struct EXTERN ASN1T_AttributeCertificationPath : public ASN1TPDU {
   struct {
      unsigned acPathPresent : 1;
   } m;
   ASN1T_AttributeCertificate attributeCertificate;
   ASN1T__SeqOfACPathData acPath;
   ASN1T_AttributeCertificationPath ();
   ASN1T_AttributeCertificationPath (ASN1C_AttributeCertificationPath& srcData);
   ~ASN1T_AttributeCertificationPath ();
} ASN1T_AttributeCertificationPath;

class EXTERN ASN1C_AttributeCertificationPath :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_AttributeCertificationPath& msgData;
   struct ElementID {
      enum {
         _unknown, attributeCertificate, acPath
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_AttributeCertificate* mpAttributeCertificateC;
   class ASN1C__SeqOfACPathData* mpAcPathC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   int mReqElemCnt;
public:
   ASN1C_AttributeCertificationPath (ASN1T_AttributeCertificationPath& data);
   ASN1C_AttributeCertificationPath (
      ASN1MessageBufferIF& msgBuf, ASN1T_AttributeCertificationPath& data);
   ASN1C_AttributeCertificationPath (ASN1C_AttributeCertificationPath& original);

   ~ASN1C_AttributeCertificationPath();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_AttributeCertificationPath& getCopy (ASN1T_AttributeCertificationPath* pDstData = 0);
   ASN1T_AttributeCertificationPath* newCopy ();

   inline ASN1C_AttributeCertificationPath& operator= (ASN1C_AttributeCertificationPath& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_AttributeCertificationPath (ASN1CTXT* pctxt,
   ASN1T_AttributeCertificationPath *pvalue, ASN1TagType tagging);

EXTERN int asn1D_AttributeCertificationPath (ASN1CTXT* pctxt,
   ASN1T_AttributeCertificationPath *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_AttributeCertificationPath
  (ASN1CTXT* pctxt, ASN1T_AttributeCertificationPath* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_AttributeCertificationPath (ASN1CTXT *pctxt, ASN1T_AttributeCertificationPath* pSrcValue, ASN1T_AttributeCertificationPath* pDstValue);

EXTERN void asn1Free_AttributeCertificationPath (ASN1CTXT *pctxt, ASN1T_AttributeCertificationPath* pvalue);

/**************************************************************/
/*                                                            */
/*  AttributeCertificateAssertion_subject                     */
/*                                                            */
/**************************************************************/

#define TV_AttributeCertificateAssertion_subject	(TM_CTXT|TM_CONS|0)

/* Choice tag constants */

#define T_AttributeCertificateAssertion_subject_baseCertificateID 1
#define T_AttributeCertificateAssertion_subject_subjectName 2

class EXTERN ASN1C_AttributeCertificateAssertion_subject;

typedef struct EXTERN ASN1T_AttributeCertificateAssertion_subject : public ASN1TPDU {
   int t;
   union {
      /* t = 1 */
      ASN1T_IssuerSerial *baseCertificateID;
      /* t = 2 */
      ASN1T_Name *subjectName;
   } u;
   ASN1T_AttributeCertificateAssertion_subject () {}
   ASN1T_AttributeCertificateAssertion_subject (ASN1C_AttributeCertificateAssertion_subject& srcData);
   ~ASN1T_AttributeCertificateAssertion_subject ();
} ASN1T_AttributeCertificateAssertion_subject;

class EXTERN ASN1C_AttributeCertificateAssertion_subject :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_AttributeCertificateAssertion_subject& msgData;
   struct ElementID {
      enum {
         _unknown, baseCertificateID, subjectName
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_IssuerSerial* mpBaseCertificateIDC;
   class ASN1C_Name* mpSubjectNameC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
public:
   ASN1C_AttributeCertificateAssertion_subject (ASN1T_AttributeCertificateAssertion_subject& data);
   ASN1C_AttributeCertificateAssertion_subject (
      ASN1MessageBufferIF& msgBuf, ASN1T_AttributeCertificateAssertion_subject& data);
   ASN1C_AttributeCertificateAssertion_subject (ASN1C_AttributeCertificateAssertion_subject& original);

   ~ASN1C_AttributeCertificateAssertion_subject();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_AttributeCertificateAssertion_subject& getCopy (ASN1T_AttributeCertificateAssertion_subject* pDstData = 0);
   ASN1T_AttributeCertificateAssertion_subject* newCopy ();

   inline ASN1C_AttributeCertificateAssertion_subject& operator= (ASN1C_AttributeCertificateAssertion_subject& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_AttributeCertificateAssertion_subject (ASN1CTXT* pctxt,
   ASN1T_AttributeCertificateAssertion_subject *pvalue, ASN1TagType tagging);

EXTERN int asn1D_AttributeCertificateAssertion_subject (ASN1CTXT* pctxt,
   ASN1T_AttributeCertificateAssertion_subject *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_AttributeCertificateAssertion_subject
  (ASN1CTXT* pctxt, ASN1T_AttributeCertificateAssertion_subject* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_AttributeCertificateAssertion_subject (ASN1CTXT *pctxt, ASN1T_AttributeCertificateAssertion_subject* pSrcValue, ASN1T_AttributeCertificateAssertion_subject* pDstValue);

EXTERN void asn1Free_AttributeCertificateAssertion_subject (ASN1CTXT *pctxt, ASN1T_AttributeCertificateAssertion_subject* pvalue);

/**************************************************************/
/*                                                            */
/*  _SetOfAttributeType                                       */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C__SetOfAttributeType;

typedef struct EXTERN ASN1T__SetOfAttributeType : public ASN1TPDU {
   ASN1UINT n;
   ASN1T_AttributeType *elem;
   ASN1T__SetOfAttributeType () : n (0), elem(NULL) {} // FIXED for PVS
   ASN1T__SetOfAttributeType (ASN1C__SetOfAttributeType& srcData);
   ~ASN1T__SetOfAttributeType ();
} ASN1T__SetOfAttributeType;

class EXTERN ASN1C__SetOfAttributeType :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T__SetOfAttributeType& msgData;
   Asn1RTDList tmpList;
   ASN1MemBuf mCurrElemValue;

public:
   ASN1C__SetOfAttributeType (ASN1T__SetOfAttributeType& data);
   ASN1C__SetOfAttributeType (
      ASN1MessageBufferIF& msgBuf, ASN1T__SetOfAttributeType& data);
   ASN1C__SetOfAttributeType (ASN1C__SetOfAttributeType& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T__SetOfAttributeType& getCopy (ASN1T__SetOfAttributeType* pDstData = 0);
   ASN1T__SetOfAttributeType* newCopy ();

   ASN1C__SetOfAttributeType& operator= (ASN1C__SetOfAttributeType& srcData);
   virtual void finalize ();

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E__SetOfAttributeType (ASN1CTXT* pctxt,
   ASN1T__SetOfAttributeType *pvalue, ASN1TagType tagging);

EXTERN int asn1D__SetOfAttributeType (ASN1CTXT* pctxt,
   ASN1T__SetOfAttributeType *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE__SetOfAttributeType
  (ASN1CTXT* pctxt, ASN1T__SetOfAttributeType* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy__SetOfAttributeType (ASN1CTXT *pctxt, ASN1T__SetOfAttributeType* pSrcValue, ASN1T__SetOfAttributeType* pDstValue);

EXTERN void asn1Free__SetOfAttributeType (ASN1CTXT *pctxt, ASN1T__SetOfAttributeType* pvalue);

/**************************************************************/
/*                                                            */
/*  AttributeCertificateAssertion                             */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_AttributeCertificateAssertion;

typedef struct EXTERN ASN1T_AttributeCertificateAssertion : public ASN1TPDU {
   struct {
      unsigned subjectPresent : 1;
      unsigned issuerPresent : 1;
      unsigned attCertValidityPresent : 1;
      unsigned attTypePresent : 1;
   } m;
   ASN1T_AttributeCertificateAssertion_subject subject;
   ASN1T_Name issuer;
   ASN1GeneralizedTime attCertValidity;
   ASN1T__SetOfAttributeType attType;
   ASN1T_AttributeCertificateAssertion ();
   ASN1T_AttributeCertificateAssertion (ASN1C_AttributeCertificateAssertion& srcData);
   ~ASN1T_AttributeCertificateAssertion ();
} ASN1T_AttributeCertificateAssertion;

class EXTERN ASN1C_AttributeCertificateAssertion :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_AttributeCertificateAssertion& msgData;
   struct ElementID {
      enum {
         _unknown, subject, issuer, attCertValidity, attType
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_AttributeCertificateAssertion_subject* mpSubjectC;
   class ASN1C_Name* mpIssuerC;
   class ASN1C__SetOfAttributeType* mpAttTypeC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_AttributeCertificateAssertion (ASN1T_AttributeCertificateAssertion& data);
   ASN1C_AttributeCertificateAssertion (
      ASN1MessageBufferIF& msgBuf, ASN1T_AttributeCertificateAssertion& data);
   ASN1C_AttributeCertificateAssertion (ASN1C_AttributeCertificateAssertion& original);

   ~ASN1C_AttributeCertificateAssertion();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_AttributeCertificateAssertion& getCopy (ASN1T_AttributeCertificateAssertion* pDstData = 0);
   ASN1T_AttributeCertificateAssertion* newCopy ();

   inline ASN1C_AttributeCertificateAssertion& operator= (ASN1C_AttributeCertificateAssertion& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_AttributeCertificateAssertion (ASN1CTXT* pctxt,
   ASN1T_AttributeCertificateAssertion *pvalue, ASN1TagType tagging);

EXTERN int asn1D_AttributeCertificateAssertion (ASN1CTXT* pctxt,
   ASN1T_AttributeCertificateAssertion *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_AttributeCertificateAssertion
  (ASN1CTXT* pctxt, ASN1T_AttributeCertificateAssertion* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_AttributeCertificateAssertion (ASN1CTXT *pctxt, ASN1T_AttributeCertificateAssertion* pSrcValue, ASN1T_AttributeCertificateAssertion* pDstValue);

EXTERN void asn1Free_AttributeCertificateAssertion (ASN1CTXT *pctxt, ASN1T_AttributeCertificateAssertion* pvalue);

/**************************************************************/
/*                                                            */
/*  HASH                                                      */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_HASH;

typedef struct EXTERN ASN1T_HASH : public ASN1TPDU {
   ASN1T_AlgorithmIdentifier algorithmIdentifier;
   ASN1TDynBitStr hashValue;
   ASN1T_HASH ();
   ASN1T_HASH (ASN1C_HASH& srcData);
   ~ASN1T_HASH ();
} ASN1T_HASH;

class EXTERN ASN1C_HASH :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_HASH& msgData;
   struct ElementID {
      enum {
         _unknown, algorithmIdentifier, hashValue
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_AlgorithmIdentifier* mpAlgorithmIdentifierC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_HASH (ASN1T_HASH& data);
   ASN1C_HASH (
      ASN1MessageBufferIF& msgBuf, ASN1T_HASH& data);
   ASN1C_HASH (ASN1C_HASH& original);

   ~ASN1C_HASH();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_HASH& getCopy (ASN1T_HASH* pDstData = 0);
   ASN1T_HASH* newCopy ();

   inline ASN1C_HASH& operator= (ASN1C_HASH& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_HASH (ASN1CTXT* pctxt,
   ASN1T_HASH *pvalue, ASN1TagType tagging);

EXTERN int asn1D_HASH (ASN1CTXT* pctxt,
   ASN1T_HASH *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_HASH
  (ASN1CTXT* pctxt, ASN1T_HASH* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_HASH (ASN1CTXT *pctxt, ASN1T_HASH* pSrcValue, ASN1T_HASH* pDstValue);

EXTERN void asn1Free_HASH (ASN1CTXT *pctxt, ASN1T_HASH* pvalue);

/**************************************************************/
/*                                                            */
/*  SIGNATURE                                                 */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_SIGNATURE;

typedef struct EXTERN ASN1T_SIGNATURE : public ASN1TPDU {
   ASN1T_AlgorithmIdentifier algorithmIdentifier;
   ASN1T_ENCRYPTED_HASH encrypted;
   ASN1T_SIGNATURE ();
   ASN1T_SIGNATURE (ASN1C_SIGNATURE& srcData);
   ~ASN1T_SIGNATURE ();
} ASN1T_SIGNATURE;

class EXTERN ASN1C_SIGNATURE :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_SIGNATURE& msgData;
   struct ElementID {
      enum {
         _unknown, algorithmIdentifier, encrypted
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_AlgorithmIdentifier* mpAlgorithmIdentifierC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_SIGNATURE (ASN1T_SIGNATURE& data);
   ASN1C_SIGNATURE (
      ASN1MessageBufferIF& msgBuf, ASN1T_SIGNATURE& data);
   ASN1C_SIGNATURE (ASN1C_SIGNATURE& original);

   ~ASN1C_SIGNATURE();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_SIGNATURE& getCopy (ASN1T_SIGNATURE* pDstData = 0);
   ASN1T_SIGNATURE* newCopy ();

   inline ASN1C_SIGNATURE& operator= (ASN1C_SIGNATURE& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_SIGNATURE (ASN1CTXT* pctxt,
   ASN1T_SIGNATURE *pvalue, ASN1TagType tagging);

EXTERN int asn1D_SIGNATURE (ASN1CTXT* pctxt,
   ASN1T_SIGNATURE *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_SIGNATURE
  (ASN1CTXT* pctxt, ASN1T_SIGNATURE* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_SIGNATURE (ASN1CTXT *pctxt, ASN1T_SIGNATURE* pSrcValue, ASN1T_SIGNATURE* pDstValue);

EXTERN void asn1Free_SIGNATURE (ASN1CTXT *pctxt, ASN1T_SIGNATURE* pvalue);

/* Value definitions */

extern EXTERN ASN1OBJID id_at_userPassword;
extern EXTERN ASN1OBJID id_at_userCertificate;
extern EXTERN ASN1OBJID id_at_cAcertificate;
extern EXTERN ASN1OBJID id_at_authorityRevocationList;
extern EXTERN ASN1OBJID id_at_certificateRevocationList;
extern EXTERN ASN1OBJID id_at_crossCertificatePair;
extern EXTERN ASN1OBJID id_at_attributeCertificate;
extern EXTERN ASN1OBJID id_at_attributeCertificateRevocationList;
extern EXTERN ASN1OBJID id_mr_attributeCertificateMatch;

}
#endif
