|
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 00029 #ifndef __CAXMLBI__ 00030 #define __CAXMLBI__ 00031 00032 #if !defined (ONLY_LOCAL_PROXY) && defined(PAYMENT) 00033 #include "CAAbstractXMLEncodable.hpp" 00034 #include "CACertificate.hpp" 00035 #include "CASignature.hpp" 00036 #include "CAUtil.hpp" 00037 00044 class CAXMLBI : public CAAbstractXMLEncodable 00045 { 00046 public: 00047 static CAXMLBI* getInstance(const UINT8 * biID, const UINT8 * hostName, const int portNumber, CACertificate * pCert); 00048 static CAXMLBI* getInstance(DOMElement* elemRoot); 00049 ~CAXMLBI(); 00050 00052 UINT8 * getID() 00053 { 00054 return m_pBiID; 00055 } 00056 00060 /*CASignature * getVerifier() 00061 { 00062 if (!m_pVeryfire) 00063 { 00064 m_pVeryfire = new CASignature; 00065 m_pVeryfire->setVerifyKey(m_pCert); 00066 } 00067 return m_pVeryfire; 00068 }*/ 00069 00071 UINT8* getHostName() 00072 { 00073 return m_pHostName; 00074 } 00075 00077 UINT32 getPortNumber() 00078 { 00079 return m_iPortNumber; 00080 } 00081 00082 SINT32 toXmlElement( XERCES_CPP_NAMESPACE::DOMDocument* a_doc, DOMElement* & elemRoot); 00083 00084 CACertificate* getCertificate() 00085 { 00086 return m_pCert; 00087 } 00088 00089 static const char* const getXMLElementName() 00090 { 00091 return CAXMLBI::ms_pXmlElemName; 00092 } 00093 00094 00095 private: 00096 SINT32 setValues(DOMElement* elemRoot); 00097 UINT8 * m_pBiID; 00098 UINT8 * m_pHostName; 00099 CACertificate * m_pCert; 00100 CASignature * m_pVeryfire; 00101 UINT32 m_iPortNumber; 00102 CAXMLBI(); 00103 static const char* const ms_pXmlElemName; 00104 }; 00105 00106 #endif //ONLY_LOCAL_PROXY 00107 #endif
1.7.6.1