Mixe for Privacy and Anonymity in the Internet
CAAbstractXMLSignable.hpp
Go to the documentation of this file.
1 #ifndef __CAABSTRACTXMLSIGNABLE__
2 #define __CAABSTRACTXMLSIGNABLE__
3 
4 #ifndef ONLY_LOCAL_PROXY
5 
7 #include "CACertStore.hpp"
8 #include "CASignature.hpp"
9 #include "CAMsg.hpp"
10 #include "xml/DOM_Output.hpp"
11 
18 {
19 public:
21  {
22  m_pSignature = NULL;
23  }
24 
26  {
27  if(m_pSignature!=NULL)
28  {
29  m_pSignature->release();
30  m_pSignature = NULL;
31  }
32  }
33 
36  {
37  return E_UNKNOWN;
38  }
39 
43  /*SINT32 verifySignature(CASignature &verifier)
44  {
45  //ASSERT(verifier!=NULL, "sigVerifier is NULL");
46  XERCES_CPP_NAMESPACE::DOMDocument* pDoc=NULL;
47  toXmlDocument(pDoc);
48  DOMElement* pElemRoot = pDoc->getDocumentElement();
49  SINT32 rc = verifier.verifyXML( pElemRoot, (CACertStore *)NULL );
50  if(pDoc != NULL)
51  {
52  pDoc->release();
53  }
54  return rc;
55  }*/
56 
61  SINT32 setSignature(DOMElement* elemSig)
62  {
63  ASSERT(elemSig!=NULL, "Signature element is NULL")
65  m_pSignature->appendChild(m_pSignature->importNode(elemSig, true));
66  return E_SUCCESS;
67  }
68 
71  {
72  if(m_pSignature!=NULL)
73  {
74  return true;
75  }
76  else
77  {
78  return false;
79  }
80  }
81 
82 protected:
83  XERCES_CPP_NAMESPACE::DOMDocument* m_pSignature;
84 };
85 
86 #endif //ONLY_LOCAL_PROXY
87 #endif
XERCES_CPP_NAMESPACE::DOMDocument * createDOMDocument()
Parses a timestamp in JDBC timestamp escape format (as it comes from the BI) and outputs the value in...
Definition: CAUtil.cpp:1568
#define ASSERT(cond, msg)
Definition: StdAfx.h:546
signed int SINT32
Definition: basetypedefs.h:132
Abstract base class for classes which can be converted to an XML structure.
An abstract base class for signable XML structures.
SINT32 setSignature(DOMElement *elemSig)
Verifies the signature.
XERCES_CPP_NAMESPACE::DOMDocument * m_pSignature
SINT32 isSigned()
returns nonzero, if this structure is already signed
SINT32 sign(CASignature &)
TODO: implement.
const SINT32 E_SUCCESS
Definition: errorcodes.hpp:2
#define E_UNKNOWN
Definition: errorcodes.hpp:3