Mixe for Privacy and Anonymity in the Internet
CAMultiSignature.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 /*
29  * CAMultiSignature.hpp
30  *
31  * Created on: 17.07.2008
32  * Author: zenoxx
33  */
34 
35 #ifndef CAMULTISIGNATURE_HPP_
36 #define CAMULTISIGNATURE_HPP_
37 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_MIDDLE_MIX
38 #include "CACertStore.hpp"
39 #include "CACertificate.hpp"
40 
42 {
47 };
48 typedef struct __t_signature SIGNATURE;
49 
51 {
52  public:
54  virtual ~CAMultiSignature();
55 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_MIDDLE_MIX
56  static SINT32 verifyXML(const UINT8* const in, UINT32 inlen, CACertificate* a_cert);
57  static SINT32 verifyXML(DOMNode* a_node, CACertificate* a_cert);
58  SINT32 signXML(DOMNode* a_node, bool appendCerts);
59  SINT32 signXML(UINT8* in, UINT32 inlen, UINT8* out, UINT32* outlen, bool appendCerts);
60  SINT32 sign(UINT8* in,UINT32 inlen,UINT8* sig,UINT32* siglen);
61  SINT32 addSignature(CASignature* a_signature, CACertStore* a_certs, UINT8* a_ski, UINT32 a_skiLen);
63  SINT32 getXORofSKIs(UINT8* out, UINT32 outlen);
64 
65 #endif
66 #ifndef ONLY_LOCAL_PROXY
67  SINT32 findSKI(const UINT8* a_strSKI);
68 #endif
69 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_MIDDLE_MIX
70  private:
74  SINT32 getSKI(UINT8* in, UINT32 inlen, const UINT8* a_ski);
75 #endif
76 };
77 #endif //ONLY_LOCAL_PROXY
78 #endif /* CAMULTISIGNATURE_HPP_ */
signed int SINT32
Definition: basetypedefs.h:132
unsigned char UINT8
Definition: basetypedefs.h:135
unsigned int UINT32
Definition: basetypedefs.h:131
SINT32 sign(UINT8 *in, UINT32 inlen, UINT8 *sig, UINT32 *siglen)
Method for producing a single Signature for Key Exchange.
SIGNATURE * m_signatures
virtual ~CAMultiSignature()
SINT32 addSignature(CASignature *a_signature, CACertStore *a_certs, UINT8 *a_ski, UINT32 a_skiLen)
SINT32 getXORofSKIs(UINT8 *out, UINT32 outlen)
SINT32 getSKI(UINT8 *in, UINT32 inlen, const UINT8 *a_ski)
static SINT32 verifyXML(const UINT8 *const in, UINT32 inlen, CACertificate *a_cert)
SINT32 findSKI(const UINT8 *a_strSKI)
SINT32 signXML(DOMNode *a_node, bool appendCerts)
CASignature * pSig
struct __t_signature * next
CACertStore * pCerts