Mixe for Privacy and Anonymity in the Internet
CACertStore.hpp
Go to the documentation of this file.
1 /*
2 Copyright (c) 2000, The JAP-Team
3 All rights reserved.
4 Redistribution and use in source and binary forms, with or without modification,
5 are permitted provided that the following conditions are met:
6 
7  - Redistributions of source code must retain the above copyright notice,
8  this list of conditions and the following disclaimer.
9 
10  - Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation and/or
12  other materials provided with the distribution.
13 
14  - Neither the name of the University of Technology Dresden, Germany nor the names of its contributors
15  may be used to endorse or promote products derived from this software without specific
16  prior written permission.
17 
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
20 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
22 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
27 */
28 #ifndef __CA_CERTSTORE__
29 #define __CA_CERTSTORE__
30 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_MIDDLE_MIX
31 #include "CACertificate.hpp"
32 #define XML_X509DATA 2
34  {
37  };
38 typedef struct __t_certstore_list CERTSTORE_ENTRY;
40 
42  {
43  public:
44  CACertStore();
45  ~CACertStore();
46  SINT32 add(CACertificate* cert);
50  CACertificate* verifyMixCert(DOMNode* mixNode);
51  SINT32 encode(UINT8* buff,UINT32* bufflen,UINT32 type);
52  SINT32 encode(DOMElement* & elemnRoot,XERCES_CPP_NAMESPACE::DOMDocument* doc);
53  static CACertStore* decode(UINT8* buff,UINT32 bufflen,UINT32 type);
54  static CACertStore* decode(const DOMNode* node, UINT32 type);
55  private:
59  };
60 #endif
61 #endif //ONLY_LOCAL_PROXY
CERTSTORE_ENTRY * LP_CERTSTORE_ENTRY
Definition: CACertStore.hpp:39
signed int SINT32
Definition: basetypedefs.h:132
unsigned char UINT8
Definition: basetypedefs.h:135
unsigned int UINT32
Definition: basetypedefs.h:131
UINT32 m_cCerts
Definition: CACertStore.hpp:57
CACertificate * getNext()
Definition: CACertStore.cpp:80
SINT32 encode(UINT8 *buff, UINT32 *bufflen, UINT32 type)
CACertificate * verifyMixCert(DOMNode *mixNode)
This function parses the certificates from a <Mix>-node and tries to build a certPath to the trusted ...
UINT32 getNumber()
Definition: CACertStore.hpp:49
LP_CERTSTORE_ENTRY m_pCurrent
Definition: CACertStore.hpp:58
static CACertStore * decode(UINT8 *buff, UINT32 bufflen, UINT32 type)
CACertificate * getFirst()
Definition: CACertStore.cpp:74
SINT32 add(CACertificate *cert)
Adds a COPY of a given certifcate to this CertStore.
Definition: CACertStore.cpp:60
LP_CERTSTORE_ENTRY m_pCertList
Definition: CACertStore.hpp:56
struct __t_certstore_list * next
Definition: CACertStore.hpp:36
CACertificate * pCert
Definition: CACertStore.hpp:35
UINT8 type
Definition: typedefs.hpp:1