|
Mixe for Privacy and Anonymity in the Internet
|
00001 /* 00002 Copyright (c) 2000, The JAP-Team 00003 All rights reserved. 00004 Redistribution and use in source and binary forms, with or without modification, 00005 are permitted provided that the following conditions are met: 00006 00007 - Redistributions of source code must retain the above copyright notice, 00008 this list of conditions and the following disclaimer. 00009 00010 - Redistributions in binary form must reproduce the above copyright notice, 00011 this list of conditions and the following disclaimer in the documentation and/or 00012 other materials provided with the distribution. 00013 00014 - Neither the name of the University of Technology Dresden, Germany nor the names of its contributors 00015 may be used to endorse or promote products derived from this software without specific 00016 prior written permission. 00017 00018 00019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS 00020 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 00021 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS 00022 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00023 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 00024 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 00025 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00026 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 00027 */ 00028 #ifndef __CA_CERTSTORE__ 00029 #define __CA_CERTSTORE__ 00030 #ifndef ONLY_LOCAL_PROXY 00031 #include "CACertificate.hpp" 00032 #define XML_X509DATA 2 00033 struct __t_certstore_list 00034 { 00035 CACertificate* pCert; 00036 struct __t_certstore_list* next; 00037 }; 00038 typedef struct __t_certstore_list CERTSTORE_ENTRY; 00039 typedef CERTSTORE_ENTRY* LP_CERTSTORE_ENTRY; 00040 00041 class CACertStore 00042 { 00043 public: 00044 CACertStore(); 00045 ~CACertStore(); 00046 SINT32 add(CACertificate* cert); 00047 CACertificate* getFirst(); 00048 CACertificate* getNext(); 00049 UINT32 getNumber(){return m_cCerts;} 00050 CACertificate* verifyMixCert(DOMNode* mixNode); 00051 SINT32 encode(UINT8* buff,UINT32* bufflen,UINT32 type); 00052 SINT32 encode(DOMElement* & elemnRoot,XERCES_CPP_NAMESPACE::DOMDocument* doc); 00053 static CACertStore* decode(UINT8* buff,UINT32 bufflen,UINT32 type); 00054 static CACertStore* decode(const DOMNode* node, UINT32 type); 00055 private: 00056 LP_CERTSTORE_ENTRY m_pCertList; 00057 UINT32 m_cCerts; 00058 LP_CERTSTORE_ENTRY m_pCurrent; 00059 }; 00060 #endif 00061 #endif //ONLY_LOCAL_PROXY
1.7.6.1