Mixe for Privacy and Anonymity in the Internet
CACmdLnOptions.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 #ifndef __CACMDLNOPTIONS__
30 #define __CACMDLNOPTIONS__
31 #include "CASocketAddrINet.hpp"
32 #ifdef HAVE_UNIX_DOMAIN_PROTOCOL
33  #include "CASocketAddrUnix.hpp"
34 #endif
35 #include "CASignature.hpp"
36 #include "CASocket.hpp"
37 #include "CAMultiSignature.hpp"
38 #include "CAIPAddrWithNetmask.hpp"
39 #include "CACertificate.hpp"
40 #include "CAThread.hpp"
41 #include "CAMix.hpp"
42 #include "CAListenerInterface.hpp"
43 #include "CATargetInterface.hpp"
44 #include "CAXMLBI.hpp"
45 #include "CAXMLPriceCert.hpp"
46 //#ifdef LOG_CRIME
47  #include "tre/tre.h"
48 //#endif
49 #include "CASymChannelCipher.hpp"
50 #define REGEXP_BUFF_SIZE 4096
51 
52 
53 // LERNGRUPPE moved this define from CACmdLnOptions.cpp
54 #define DEFAULT_TARGET_PORT 6544
55 #define DEFAULT_CONFIG_FILE "default.xml"
56 #define MIN_INFOSERVICES 1
57 // END LERNGRUPPE
58 
59 #define WITH_SUBTREE true
60 #define WITHOUT_SUBTREE (!(WITHSUBTREE))
61 
62 
63 /* General Option definitions */
64 #define OPTIONS_NODE_GENERAL "General"
65 
66 #define OPTIONS_NODE_MIX_TYPE "MixType"
67 #define OPTIONS_NODE_MIX_NAME "MixName"
68 #define OPTIONS_NODE_MIX_ID "MixID"
69 #define OPTIONS_NODE_DYNAMIC_MIX "Dynamic"
70 #define OPTIONS_NODE_MIN_CASCADE_LENGTH "MinCascadeLength"
71 #define OPTIONS_NODE_CASCADE_NAME "CascadeName"
72 #define OPTIONS_NODE_USER_ID "UserID"
73 #define OPTIONS_NODE_FD_NR "NrOfFileDescriptors"
74 #define OPTIONS_NODE_DAEMON "Daemon"
75 #define OPTIONS_NODE_CREDENTIAL "AccessControlCredential"
76 #define OPTIONS_NODE_MAX_USERS "MaxUsers"
77 #define OPTIONS_NODE_PAYMENT_REMINDER "PaymentReminderProbability"
78 #define OPTIONS_NODE_LOGGING "Logging"
79 #define OPTIONS_NODE_LOGGING_CONSOLE "Console"
80 #define OPTIONS_NODE_LOGGING_FILE "File"
81 #define OPTIONS_ATTRIBUTE_LOGGING_MAXFILESIZE "MaxFileSize"
82 #define OPTIONS_ATTRIBUTE_LOGGING_MAXFILES "MaxFiles"
83 #define LOGGING_MAXFILES_DEFAULT 10
84 #define OPTIONS_NODE_SYSLOG "Syslog"
85 #define OPTIONS_NODE_ENCRYPTED_LOG "EncryptedLog"
86 #define OPTIONS_NODE_LOGGING_KEYINFO "KeyInfo"
87 #define OPTIONS_NODE_DESCRIPTION "Description"
88 #define OPTIONS_ATTRIBUTE_NAME_FOR_CASCADE "forCascade"
89 
90 /* values for the operator OPTIONS_NODE_MIX_NAME */
91 #define OPTIONS_VALUE_OPERATOR_NAME "Operator"
92 #define OPTIONS_VALUE_MIX_NAME "Mix"
93 #define OPTIONS_VALUE_NAMETYPE_DEFAULT OPTIONS_VALUE_MIX_NAME
94 
95 /* Certificate Option definitions */
96 #define OPTIONS_NODE_CERTIFICATE_LIST "Certificates"
97 
98 #define OPTIONS_NODE_OWN_CERTIFICATE "OwnCertificate"
99 #define OPTIONS_NODE_OWN_OPERATOR_CERTIFICATE "OperatorOwnCertificate"
100 #define OPTIONS_NODE_NEXT_MIX_CERTIFICATE "NextMixCertificate"
101 #define OPTIONS_NODE_NEXT_OPERATOR_CERTIFICATE "NextOperatorCertificate"
102 #define OPTIONS_NODE_PREV_MIX_CERTIFICATE "PrevMixCertificate"
103 #define OPTIONS_NODE_PREV_OPERATOR_CERTIFICATE "PrevOperatorCertificate"
104 #define OPTIONS_NODE_TRUSTED_ROOT_CERTIFICATES "TrustedRootCertificates"
105 #define OPTIONS_NODE_MIX_CERTIFICATE_VERIFICATION "MixCertificateVerification"
106 #define OPTIONS_NODE_X509DATA "X509Data"
107 #define OPTIONS_NODE_X509_CERTIFICATE "X509Certificate"
108 #define OPTIONS_NODE_X509_PKCS12 "X509PKCS12"
109 #define OPTIONS_NODE_SIGNATURE "Signature"
110 
111 
112 /* Accounting Option definitions */
113 #define OPTIONS_NODE_ACCOUNTING "Accounting"
114 
115 #define OPTIONS_NODE_PRICE_CERTIFICATE "PriceCertificate"
116 #define OPTIONS_NODE_PAYMENT_INSTANCE CAXMLBI::getXMLElementName()
117 #define OPTIONS_NODE_AI_SOFT_LIMIT "SoftLimit"
118 #define OPTIONS_NODE_AI_HARD_LIMIT "HardLimit"
119 #define OPTIONS_NODE_SETTLE_IVAL "SettleInterval"
120 #define OPTIONS_NODE_PREPAID_IVAL "PrepaidInterval"
121 #define OPTIONS_NODE_PREPAID_IVAL_KB "PrepaidIntervalKbytes"
122 #define OPTIONS_NODE_AI_DB "Database"
123 #define OPTIONS_NODE_AI_DB_HOST "Host"
124 #define OPTIONS_NODE_AI_DB_PORT "Port"
125 #define OPTIONS_NODE_AI_DB_NAME "DBName"
126 #define OPTIONS_NODE_AI_DB_USER "Username"
127 #define OPTIONS_NODE_AI_DB_PASSW "Password"
128 
129 #define OPTIONS_DEFAULT_PREPAID_IVAL 3000000 //3 MB as safe default if not explicitly set in config file
130 
131 #define OPTIONS_NODE_NETWORK "Network"
132 
133 #define OPTIONS_NODE_INFOSERVICE_LIST "InfoServices"
134 #define OPTIONS_NODE_INFOSERVICE "InfoService"
135 #define OPTIONS_NODE_ALLOW_AUTO_CONF "AllowAutoConfiguration"
136 #define OPTIONS_NODE_LISTENER_INTERFACES CAListenerInterface::XML_ELEMENT_CONTAINER_NAME
137 #define OPTIONS_NODE_NEXT_MIX "NextMix"
138 #define OPTIONS_NODE_NETWORK_PROTOCOL "NetworkProtocol"
139 #define OPTIONS_NODE_IP "IP"
140 #define OPTIONS_NODE_PROXY_LIST "Proxies"
141 #define OPTIONS_NODE_PROXY "Proxy"
142 #define OPTIONS_NODE_PROXY_TYPE "ProxyType"
143 #define OPTIONS_NODE_SERVER_MONITORING "ServerMonitoring"
144 #define OPTIONS_NODE_VISIBLE_ADDRESS_LIST "VisibleAddresses"
145 #define OPTIONS_NODE_VISIBLE_ADDRESS "VisibleAddress"
146 #define OPTIONS_NODE_LISTENER_INTERFACE_LIST CAListenerInterface::XML_ELEMENT_CONTAINER_NAME
147 #define OPTIONS_NODE_LISTENER_INTERFACE CAListenerInterface::XML_ELEMENT_NAME
148 #define OPTIONS_NODE_KEEP_ALIVE "KeepAlive"
149 #define OPTIONS_NODE_KEEP_ALIVE_SEND_IVAL "SendInterval"
150 #define OPTIONS_NODE_KEEP_ALIVE_RECV_IVAL "ReceiveInterval"
151 #define OPTIONS_NODE_IP "IP"
152 #define OPTIONS_NODE_HOST "Host"
153 #define OPTIONS_NODE_PORT "Port"
154 #define OPTIONS_NODE_FILE "File"
155 
156 #define OPTIONS_NODE_RESSOURCES "Ressources"
157 
158 #define OPTIONS_NODE_UNLIMIT_TRAFFIC "UnlimitTraffic"
159 #define OPTIONS_NODE_BYTES_PER_IVAL "BytesPerIntervall"
160 #define OPTIONS_NODE_DELAY_IVAL "Intervall"
161 #define OPTIONS_NODE_LATENCY "Latency"
162 
163 #define OPTIONS_NODE_TNCS_OPTS "TermsAndConditionsOptions"
164 #define OPTIONS_NODE_TNCS_TEMPLATES "Templates"
165 #define OPTIONS_NODE_TNCS_TEMPLATE "Template"
166 #define OPTIONS_NODE_TNCS "TermsAndConditions"
167 #define OPTIONS_NODE_TNCS_TRANSLATION "TCTranslation"
168 #define OPTIONS_NODE_TNCS_TRANSLATION_IMPORTS "TCTranslationImports"
169 #define OPTIONS_NODE_TNCS_OPERATOR "Operator"
170 #define OPTIONS_ATTRIBUTE_TNC_DATE "date"
171 #define OPTIONS_ATTRIBUTE_TNC_SERIAL "serial"
172 #define OPTIONS_ATTRIBUTE_TNC_VERSION "version"
173 #define OPTIONS_ATTRIBUTE_TNC_LOCALE "locale"
174 #define OPTIONS_ATTRIBUTE_TNC_TEMPLATE_TYPE "type"
175 #define OPTIONS_ATTRIBUTE_TNC_ID "id"
176 #define OPTIONS_ATTRIBUTE_TNC_TEMPLATE_REFID "referenceId"
177 #define OPTIONS_ATTRIBUTE_TNC_DEFAULT_LANG_DEFINED "default"
178 #define OPTIONS_ATTRIBUTE_TNC_DEFAULT_LANG "defaultLang"
179 
180 #define OPTIONS_NODE_CRIME_DETECTION "CrimeDetection"
181 
182 #define OPTIONS_NODE_CRIME_REGEXP_URL "RegExpURL"
183 #define OPTIONS_NODE_CRIME_REGEXP_PAYLOAD "RegExpPayload"
184 #define OPTIONS_NODE_CRIME_SURVEILLANCE_IP "SurveillanceIP"
185 #define OPTIONS_NODE_CRIME_SURVEILLANCE_IP_NETMASK "netmask"
186 #define OPTIONS_NODE_CRIME_SURVEILLANCE_ACCOUNT "PayAccountNumber"
187 #define OPTIONS_ATTRIBUTE_LOG_PAYLOAD "logPayload"
188 
189 #define MIXINFO_NODE_PARENT "Mix"
190 #define MIXINFO_NODE_MIX_NAME "Name"
191 #define MIXINFO_NODE_SOFTWARE "Software"
192 #define MIXINFO_NODE_VERSION "Version"
193 
194 #define MIXINFO_NODE_PAYMENTREMINDER "PaymentReminderProbability"
195 
196 #define MIXINFO_ATTRIBUTE_MIX_ID "id"
197 
198 #define LOG_NODE_NOT_FOUND(Nodename) \
199  CAMsg::printMsg(LOG_CRIT,"No \"%s\" node found in configuration file!\n", (Nodename))
200 
201 #define LOG_NODE_EMPTY_OR_INVALID(Nodename) \
202  CAMsg::printMsg(LOG_CRIT,"Node \"%s\" is empty or has invalid content!\n", (Nodename))
203 
204 #define LOG_NODE_WRONG_PARENT(Parentname, Childname) \
205  CAMsg::printMsg(LOG_CRIT,"\"%s\" is the wrong parent for Node \"%s\"\n", (Parentname), (Childname))
206 
207 
208 #define ASSERT_PARENT_NODE_NAME(Parentname, NameToMatch, Childname) \
209  if(!equals((Parentname), (NameToMatch) )) \
210  { \
211  char *parentName = XMLString::transcode(Parentname); \
212  LOG_NODE_WRONG_PARENT(parentName, Childname); \
213  XMLString::release(&parentName); \
214  return E_UNKNOWN; \
215  }
216 
217 #define ASSERT_GENERAL_OPTIONS_PARENT(Parentname, Childname) \
218  ASSERT_PARENT_NODE_NAME(Parentname, OPTIONS_NODE_GENERAL, Childname)
219 
220 #define ASSERT_CERTIFICATES_OPTIONS_PARENT(Parentname, Childname) \
221  ASSERT_PARENT_NODE_NAME(Parentname, OPTIONS_NODE_CERTIFICATE_LIST, Childname)
222 
223 #define ASSERT_ACCOUNTING_OPTIONS_PARENT(Parentname, Childname) \
224  ASSERT_PARENT_NODE_NAME(Parentname, OPTIONS_NODE_ACCOUNTING, Childname)
225 
226 #define ASSERT_NETWORK_OPTIONS_PARENT(Parentname, Childname) \
227  ASSERT_PARENT_NODE_NAME(Parentname, OPTIONS_NODE_NETWORK, Childname)
228 
229 #define ASSERT_CRIME_DETECTION_OPTIONS_PARENT(Parentname, Childname) \
230  ASSERT_PARENT_NODE_NAME(Parentname, OPTIONS_NODE_CRIME_DETECTION, Childname)
231 
232 THREAD_RETURN threadReConfigure(void *param);
233 
234 class CACmdLnOptions;
235 typedef SINT32 (CACmdLnOptions::*optionSetter_pt)(DOMElement *);
236 
238 {
239  public:
240  CACmdLnOptions();
241  ~CACmdLnOptions();
242  SINT32 cleanup();
243  void clean();
244  SINT32 parse(int argc,const char** arg);
246  bool getDaemon();
247  //bool getProxySupport();
248 
250 
251 
252 // UINT16 getServerPort();
253  /*For IP (Host) AND Unix Domain Sockets*/
254 // SINT32 getServerHost(UINT8* path,UINT32 len);
255 
256 // SINT32 getServerRTTPort();
258 
259 
260  SINT32 createSockets(bool a_bPrintMessages, CASocket** a_sockets, UINT32 a_socketsLen);
263  {
264  if(nr>0&&nr<=m_cnListenerInterfaces&&m_arListenerInterfaces[nr-1]!=NULL)
265  return new CAListenerInterface(*m_arListenerInterfaces[nr-1]);
266  return NULL;
267  };
268 
269  //this is only for the local proxy
270  UINT16 getMixPort();
272 
273  //if we have more than one Target (currently only Caches are possible...)
275 
289  {
290  if(nr>0&&nr<=m_cnTargets)
291  {
292  return m_arTargetInterfaces[nr-1].cloneInto(oTargetInterface);
293  }
294  else
295  return E_UNKNOWN;
296  };
297 
298 #ifndef ONLY_LOCAL_PROXY
299 
302 
303 #endif //ONLY_LOCAL_PROXY
304 
306  {
307  return m_nrOfOpenFiles;
308  }
309 
310 
311 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_MIDDLE_MIX
312  //for last Mixes: number of outside visible addresses
314 
323  SINT32 getVisibleAddress(UINT8* strAddressBuff, UINT32 len,UINT32 nr);
324 
325  //TODO maybe clone MultiSignature object!
329  {
331  }
333  {
334  if(m_pNextMixCertificate!=NULL)
335  return m_pNextMixCertificate->clone();
336  return NULL;
337  }
338 
340  {
341  if(cert != NULL)
342  {
343  m_pNextMixCertificate = cert->clone();
344  return E_SUCCESS;
345  }
346  return E_UNKNOWN;
347  }
349  {
350  if(m_pPrevMixCertificate!=NULL)
351  return m_pPrevMixCertificate->clone();
352  return NULL;
353  }
354 
356  {
357  if(cert != NULL)
358  {
359  m_pPrevMixCertificate = cert->clone();
360  return E_SUCCESS;
361  }
362  return E_UNKNOWN;
363  }
364 
366  {
367  return m_pPrevMixCertificate!=NULL;
368  }
369 
371  {
372  return m_pNextMixCertificate!=NULL;
373  }
374 
376  {
378  }
379 
381  {
383  }
384 
385  SINT32 getMixXml(XERCES_CPP_NAMESPACE::DOMDocument* & docMixInfo);
386 
389  {
390  return (m_addrInfoServicesSize>0);
391  }
393  {
394  return m_maxNrOfUsers;
395  }
396 
397  SINT32 getCascadeName(UINT8* name,UINT32 len) const;
399 
400  // added by ronin <ronin2@web.de>
402  {
403  delete[] m_strCascadeName;
404  m_strCascadeName = new UINT8[strlen((const char*)name)+1];
405  strcpy((char*)m_strCascadeName,(const char*)name);
406  return E_SUCCESS;
407  }
408 #endif
409 #ifndef ONLY_LOCAL_PROXY
410 
411  /*CASignature* getSignKey()
412  {
413  if(m_pSignKey!=NULL)
414  return m_pSignKey->clone();
415  return NULL;
416  }*/
420  /*CACertificate* getOwnCertificate() const
421  {
422  if(m_pOwnCertificate!=NULL)
423  {
424  return m_pOwnCertificate->clone();
425  }
426  return NULL;
427  }*/
431  /*CACertificate* getOpCertificate() const
432  {
433  if( m_OpCert != NULL )
434  {
435  return m_OpCert->clone();
436  }
437  return NULL;
438  }*/
440 #ifdef PAYMENT
441  CAXMLPriceCert* getPriceCertificate() const
442  {
443  if(m_pPriceCertificate != NULL)
444  {
445  return m_pPriceCertificate;
446  }
447  return NULL;
448  }
449 #endif
450 
451 #ifdef COUNTRY_STATS
452  SINT32 getCountryStatsDBConnectionLoginData(char** db_host,char**db_user,char**db_passwd);
453 #endif
454 
455 
458  {
460  }
462  {
463  return m_bSyslog;
464  }
465 
468  {
470  return E_SUCCESS;
471  }
472 
475  {
478  return NULL;
479  }
480 
481  DOMElement* getCascadeXML()
482  {
483  return m_pCascadeXML;
484  }
485 
486 
487 
488 
489 
491 
492 
494 
496  //SINT32 getMixXml(UINT8* strxml,UINT32* len);
497 
499  XERCES_CPP_NAMESPACE::DOMDocument **getAllTermsAndConditionsTemplates();
500  DOMElement *getTermsAndConditions();
501 
502 #endif //ONLY_LOCAL_PROXY
503 
504 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_FIRST_MIX
505 
506  SINT32 getAccessControlCredential(UINT8* outbuff, UINT32* outbuffsize);
507 
509  {
510  return m_strAccessControlCredential != NULL;
511  }
512 
514 
515 #endif
517  {
518  return m_bCompressedLogs;
519  }
521  SINT32 setLogDir(const UINT8* name,UINT32 len);
523 
525  {
526  return m_maxLogFileSize;
527  }
528 
530  {
531  return m_maxLogFiles;
532  }
533 
534  SINT32 getUser(UINT8* user,UINT32 len);
535  SINT32 getPidFile(UINT8* pidfile,UINT32 len);
536 
537 #ifdef SERVER_MONITORING
538  char *getMonitoringListenerHost();
539  UINT16 getMonitoringListenerPort();
540 #endif /* SERVER_MONITORING */
541 
542  bool isLocalProxy();
543  bool isFirstMix();
544  bool isMiddleMix();
545  bool isLastMix();
546 
547 
549  {
550  return m_bSocksSupport;
551  }
552 
553 
555  {
556  return m_bAutoReconnect;
557  }
558 
560  {
561  return m_bCryptoBenchmark;
562  }
563 
564 
565 #ifdef LOG_CRIME
566  tre_regex_t* getCrimeRegExpsURL(UINT32* len)
567  {
568  *len=m_nCrimeRegExpsURL;
569  return m_arCrimeRegExpsURL;
570  }
571 
572  tre_regex_t* getCrimeRegExpsPayload(UINT32* len)
573  {
574  *len=m_nCrimeRegExpsPayload;
575  return m_arCrimeRegExpsPayload;
576  }
577 
578  UINT64* getCrimeSurveillanceAccounts()
579  {
580  return m_surveillanceAccounts;
581  }
582 
583  UINT32 getNrOfCrimeSurveillanceAccounts()
584  {
585  return m_nrOfSurveillanceAccounts;
586  }
587 
588 
589  CAIPAddrWithNetmask* getCrimeSurveillanceIPs()
590  {
591  return m_surveillanceIPs;
592  }
593 
594  UINT32 getNrOfCrimeSurveillanceIPs()
595  {
596  return m_nrOfSurveillanceIPs;
597  }
598 
599  bool isPayloadLogged()
600  {
601  return m_logPayload;
602  }
603 #endif
604 
605 #if defined(DELAY_CHANNELS)||defined(DELAY_USERS)
607  {
609  }
611  {
613  }
615  {
617  }
618 #endif
619 
620 #if defined(DELAY_CHANNELS_LATENCY)
622  UINT32 getDelayChannelLatency()
623  {
624  return m_u32DelayChannelLatency;
625  }
626 #endif
627 
628 
629 #ifdef PAYMENT
630  // accounting database
636  SINT32 getAiID(UINT8 * id, UINT32 len);
637  CAXMLBI* getBI();
642 #endif
643 
644 #ifdef DATA_RETENTION_LOG
645  SINT32 getDataRetentionLogDir(UINT8* strLogDir,UINT32 len);
646  SINT32 getDataRetentionPublicEncryptionKey(CAASymCipher** pKey)
647  {
648  *pKey=m_pDataRetentionPublicEncryptionKey;
649  return E_SUCCESS;
650  }
651 #endif
652 
653 #ifdef EXPORT_ASYM_PRIVATE_KEY
654  SINT32 getEncryptionKeyImportFile(const UINT8* strFile,UINT32 len)
655  {
656  if(m_strImportKeyFile==NULL)
657  return E_UNKNOWN;
658  if(len<=(UINT32)strlen((char*)m_strImportKeyFile))
659  {
660  return E_SPACE;
661  }
662  strcpy((char*)strFile,(char*)m_strImportKeyFile);
663  return E_SUCCESS;
664  }
665  SINT32 getEncryptionKeyExportFile(const UINT8* strFile,UINT32 len)
666  {
667  if(m_strExportKeyFile==NULL)
668  return E_UNKNOWN;
669  if(len<=(UINT32)strlen((char*)m_strExportKeyFile))
670  {
671  return E_SPACE;
672  }
673  strcpy((char*)strFile,(char*)m_strExportKeyFile);
674  return E_SUCCESS;
675  }
676  bool isImportKey()
677  {
678  return m_strImportKeyFile!=NULL;
679  }
680  bool isExportKey()
681  {
682  return m_strExportKeyFile!=NULL;
683  }
684 #endif
685 
686 
687 #ifndef ONLY_LOCAL_PROXY
688  // added by ronin <ronin2@web.de>
689  // needed for autoconfiguration
690  SINT32 setNextMix(XERCES_CPP_NAMESPACE::DOMDocument* pDoc);
691  SINT32 setPrevMix(XERCES_CPP_NAMESPACE::DOMDocument* pDoc);
692 
693  friend THREAD_RETURN threadReConfigure(void *param);
694 
696  static SINT32 createMixOnCDConfiguration(const UINT8* strFileName);
697  static SINT32 saveToFile(XERCES_CPP_NAMESPACE::DOMDocument* a_doc, const UINT8* a_strFileName);
698 
699 
700 #ifdef DYNAMIC_MIX
701  /* LERNGRUPPE (refactoring + new) */
702  //SINT32 createMixOnCDConfiguration(const UINT8* strFileName);
703  SINT32 createDefaultConfiguration();
704  SINT32 addListenerInterface(DOM_Element a_elem);
705  SINT32 resetNetworkConfiguration();
706  SINT32 getRandomInfoService(CASocketAddrINet *&r_address);
707  bool isDynamic() { return m_bDynamic; }
708  SINT32 changeMixType(CAMix::tMixType a_newMixType);
709  SINT32 resetNextMix();
710  SINT32 resetPrevMix();
711  SINT32 setCascadeProposal(UINT8* a_strCascadeProposal, UINT32 a_len)
712  {
713  if(m_strLastCascadeProposal != NULL)
714  {
715  delete m_strLastCascadeProposal;
716  m_strLastCascadeProposal = NULL;
717  }
718  if(a_strCascadeProposal == NULL)
719  return E_SUCCESS;
720  m_strLastCascadeProposal = new UINT8[ a_len + 1 ];
721  memcpy(m_strLastCascadeProposal, a_strCascadeProposal, a_len+1);
722  return E_SUCCESS;
723  }
724  SINT32 getLastCascadeProposal(UINT8* r_strCascadeProposal, UINT32 r_len)
725  {
726  if(m_strLastCascadeProposal == NULL)
727  {
728  return E_UNKNOWN;
729  }
730  if(r_len >= strlen((char*)m_strLastCascadeProposal))
731  {
732  r_len = strlen((char*)m_strLastCascadeProposal);
733  memcpy(r_strCascadeProposal, m_strLastCascadeProposal, r_len + 1);
734  return E_SUCCESS;
735  }
736  return E_UNKNOWN;
737  }
738 #endif // DYNAMIC_MIX
739  XERCES_CPP_NAMESPACE::DOMDocument **m_termsAndConditionsTemplates;
741  private:
742 #ifdef DYNAMIC_MIX
743  UINT8* m_strLastCascadeProposal;
744  UINT32 getRandom(UINT32 a_max);
745  SINT32 checkInfoServices(UINT32 *r_runningInfoServices);
746  SINT32 checkMixId();
747  SINT32 checkListenerInterfaces();
748  SINT32 checkCertificates();
749 #endif //DYNAMIC_MIX
750  /* END LERNGRUPPE */
751  static SINT32 buildDefaultConfig(XERCES_CPP_NAMESPACE::DOMDocument* a_doc,bool bForLastMix);
752 #endif //only_LOCAL_PROXY
753  UINT8* m_strConfigFile; //the filename of the config file
754  bool m_bDaemon;
756  UINT16 m_iTargetPort; //only for the local proxy...
757  char* m_strTargetHost; //only for the local proxy...
760  char* m_strCredential; //credential for connection to cascade
761 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_MIDDLE_MIX
763  /* for mix certificate verification */
773  XERCES_CPP_NAMESPACE::DOMDocument* m_docMixInfo;
775  DOMNodeList* m_opCertList;
779 
780 #endif
781 #ifndef ONLY_LOCAL_PROXY
782  bool m_bIsRunReConfigure; //true, if an async reconfigure is under way
783  CAMutex* m_pcsReConfigure; //Ensures that reconfigure is running only once at the same time;
784  CAThread m_threadReConfigure; //Thread, that does the actual reconfigure work
785 
786 
787  //CASignature* m_pSignKey;
788  //CACertificate* m_pOwnCertificate;
789  //CACertificate** m_ownCerts;
790  //UINT32 m_ownCertsLength;
791 #ifdef PAYMENT
792  CAXMLPriceCert* m_pPriceCertificate;
793 #endif
794 
795  //CACertificate** m_opCerts;
796  //UINT32 m_opCertsLength;
797 
798 
799 
800 
802 
803  // added by ronin <ronin2@web.de>
804  DOMElement* m_pCascadeXML;
805  XERCES_CPP_NAMESPACE::DOMDocument* m_docOpTnCs;
806 
807 
809 #endif //ONLY_LOCAL_PROXY
810 
811 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_FIRST_MIX
812 
815 #endif
816 
818  bool m_bAutoReconnect; //auto reconnect if connection to first mix lost ??
820  char* m_strLogDir;
823  UINT32 m_maxLogFiles; //how many log files can be created before starting again with the first one
829  bool m_bSyslog;
831  char* m_strUser;
833  SINT32 m_nrOfOpenFiles; //How many open files (sockets) should we use
834  bool m_bSkipProxyCheck; //Skip the proxy check (e.g. if proxies are intentionally started after last mix)
835 
836  //char* m_strMixXml;
837  char* m_strMixID;
839 
841 
848 
849 
850 #ifdef LOG_CRIME
851  bool m_logPayload;
852  tre_regex_t* m_arCrimeRegExpsURL;
853  UINT32 m_nCrimeRegExpsURL;
854  tre_regex_t* m_arCrimeRegExpsPayload;
855  UINT32 m_nCrimeRegExpsPayload;
856  UINT32 m_nrOfSurveillanceIPs;
857  CAIPAddrWithNetmask* m_surveillanceIPs;
858  UINT64* m_surveillanceAccounts;
859  UINT32 m_nrOfSurveillanceAccounts;
860  /* Crime Logging Options */
861  #define CRIME_DETECTION_OPTIONS_NR 4
862  optionSetter_pt *crimeDetectionOptionSetters;
863  SINT32 setCrimeURLRegExp(DOMElement *elemCrimeDetection);
864  SINT32 setCrimePayloadRegExp(DOMElement *elemCrimeDetection);
865  SINT32 setCrimeSurveillanceIP(DOMElement *elemCrimeDetection);
866  SINT32 setCrimeSurveillanceAccounts(DOMElement *elemCrimeDetection);
867  void initCrimeDetectionOptionSetters();
868  SINT32 setCrimeDetectionOptions(DOMElement *elemRoot);
869 #endif
870 
871 #ifdef DATA_RETENTION_LOG
872  UINT8* m_strDataRetentionLogDir;
873  CAASymCipher* m_pDataRetentionPublicEncryptionKey;
874 #endif
875 
876 #ifdef EXPORT_ASYM_PRIVATE_KEY
877  UINT8* m_strImportKeyFile;
878  UINT8* m_strExportKeyFile;
879 #endif
880 
881 
882 #if defined (DELAY_CHANNELS) ||defined(DELAY_USERS)
886 #endif
887 
888 #if defined (DELAY_CHANNELS_LATENCY)
889  UINT32 m_u32DelayChannelLatency;
890 #endif
891 
892 #ifdef PAYMENT
893  // added by Bastian Voigt:
894  // getter functions for the payment config options
895  private:
896  CAXMLBI * m_pBI;
908 #endif
913 #ifdef PAYMENT
915 #endif
916 #ifdef SERVER_MONITORING
917  private:
918  char *m_strMonitoringListenerHost;
919  UINT16 m_iMonitoringListenerPort;
920 #endif
921 
922  private:
923  SINT32 setNewValues(CACmdLnOptions& newOptions);
924 #ifndef ONLY_LOCAL_PROXY
925 #ifdef COUNTRY_STATS
929 #endif //COUNTRY_STATS
930 #endif //ONLY_LOCAL_PROXY
933 
934 
935 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_MIDDLE_MIX
936  SINT32 parseInfoServices(DOMElement* a_infoServiceNode);
937 
939  SINT32 addVisibleAddresses(DOMNode* nodeProxy);
940  XERCES_CPP_NAMESPACE::DOMDocument* m_docMixXml;
941 
942  SINT32 readXmlConfiguration(XERCES_CPP_NAMESPACE::DOMDocument* & docConfig,const UINT8* const configFileName);
943  SINT32 readXmlConfiguration(XERCES_CPP_NAMESPACE::DOMDocument* & docConfig,const UINT8* const buf, UINT32 len);
944  SINT32 processXmlConfiguration(XERCES_CPP_NAMESPACE::DOMDocument* docConfig);
945 
946  /* NR of all Option types, i.e. General, Certificates, Networking, etc. (excluding *mainOptionSetters)
947  * these options are all direct children of <MixConfiguration>*/
948 #define MAIN_OPTION_SETTERS_NR 8
949  SINT32 setGeneralOptions(DOMElement* elemRoot);
950  SINT32 setMixDescription(DOMElement* elemRoot); /* mix decription for the mix info */
951  SINT32 setCertificateOptions(DOMElement* elemRoot);
952  SINT32 setNetworkOptions(DOMElement *elemRoot);
953  SINT32 setRessourceOptions(DOMElement *elemRoot);
954  SINT32 setTermsAndConditions(DOMElement *elemRoot);
955 
956  /* General Options */
957 #if !defined ONLY_LOCAL_PROXY || defined INLUCDE_MIDDLE_MIX
958  #define GENERAL_OPTIONS_NR 13
959 #else
960  #define GENERAL_OPTIONS_NR 10
961 #endif
962  SINT32 setMixType(DOMElement* elemGeneral);
963  SINT32 setMixName(DOMElement* elemGeneral);
964  SINT32 setMixID(DOMElement* elemGeneral);
965  SINT32 setDynamicMix(DOMElement* elemGeneral);
966  SINT32 setMinCascadeLength(DOMElement* elemGeneral);
967  SINT32 setCascadeNameFromOptions(DOMElement* elemGeneral);
968  SINT32 setUserID(DOMElement* elemGeneral);
969  SINT32 setNrOfFileDescriptors(DOMElement* elemGeneral);
970  SINT32 setDaemonMode(DOMElement* elemGeneral);
971  SINT32 setLoggingOptions(DOMElement* elemGeneral);
973 
974 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_FIRST_MIX
975  SINT32 setAccessControlCredential(DOMElement* elemGeneral);
976 #endif
977 #if !defined ONLY_LOCAL_PROXY
978  SINT32 setPaymentReminder(DOMElement* elemGeneral);
979  SINT32 setMaxUsers(DOMElement* elemGeneral);
980 #endif
981  /* Certificate Options */
982 #define MAX_CERTIFICATE_OPTIONS_NR 6
984  SINT32 setOwnCertificate(DOMElement *elemCertificates);
985  SINT32 setOwnOperatorCertificate(DOMElement *elemCertificates);
986  SINT32 setMixCertificateVerification(DOMElement *elemCertificates);
987  SINT32 setNextMixCertificate(DOMElement *elemCertificates);
988  SINT32 setPrevMixCertificate(DOMElement *elemCertificates);
989  SINT32 setTrustedRootCertificates(DOMElement *elemCertificates);
990 
991 #ifdef PAYMENT
992  /* Payment Options */
993 #define ACCOUNTING_OPTIONS_NR 7
994  SINT32 setPriceCertificate(DOMElement *elemAccounting);
995  SINT32 setPaymentInstance(DOMElement *elemAccounting);
996  SINT32 setAccountingSoftLimit(DOMElement *elemAccounting);
997  SINT32 setAccountingHardLimit(DOMElement *elemAccounting);
998  SINT32 setPrepaidInterval(DOMElement *elemAccounting);
999  SINT32 setSettleInterval(DOMElement *elemAccounting);
1000  SINT32 setAccountingDatabase(DOMElement *elemAccounting);
1002  SINT32 setAccountingOptions(DOMElement *elemRoot);
1003 #endif
1004  /* Network Options */
1005 #define NETWORK_OPTIONS_NR 5
1006  SINT32 setInfoServices(DOMElement *elemNetwork);
1007  SINT32 setListenerInterfaces(DOMElement *elemNetwork);
1008  SINT32 setTargetInterfaces(DOMElement *elemNetwork);
1009  SINT32 setServerMonitoring(DOMElement *elemNetwork);
1010  SINT32 setKeepAliveTraffic(DOMElement *elemNetwork);
1011 
1012  /* Terms & Conditions options */
1013 #ifdef PAYMENT
1014 #define TERMS_AND_CONDITIONS_OPTIONS_NR 2
1015  SINT32 setTermsAndConditionsTemplates(DOMElement *elemTnCs);
1016  SINT32 setTermsAndConditionsList(DOMElement *elemTnCs);
1017 #endif
1018 
1019  SINT32 appendMixInfo_internal(DOMNode* a_node, bool with_subtree);
1020  inline SINT32 addMixIdToMixInfo();
1021 
1022  SINT32 invokeOptionSetters(const optionSetter_pt *optionsSetters, DOMElement* target, SINT32 optionsSettersLength);
1023 
1024  void initMainOptionSetters();
1025  void initGeneralOptionSetters();
1028  void initNetworkOptionSetters();
1030 #endif //ONLY_LOCAL_PROXY
1031 
1032 };
1033 
1034 SINT32 setRegExpressions(DOMElement *rootElement, const char* const childElementName,
1035  tre_regex_t **regExContainer, UINT32* regExNr);
1036 
1037 #endif
1038 
THREAD_RETURN threadReConfigure(void *param)
Thread that does the actual reconfigure work.
SINT32(CACmdLnOptions::* optionSetter_pt)(DOMElement *)
SINT32 setRegExpressions(DOMElement *rootElement, const char *const childElementName, tre_regex_t **regExContainer, UINT32 *regExNr)
SYMCHANNELCIPHER_ALGORITHM
SINT32 getRandom(UINT32 *val)
Gets 32 random bits.
Definition: CAUtil.cpp:346
#define THREAD_RETURN
Definition: StdAfx.h:540
unsigned short UINT16
Definition: basetypedefs.h:133
signed int SINT32
Definition: basetypedefs.h:132
unsigned char UINT8
Definition: basetypedefs.h:135
unsigned int UINT32
Definition: basetypedefs.h:131
CACertificate * clone() const
UINT8 * m_strAccessControlCredential
SINT32 getAiID(UINT8 *id, UINT32 len)
SINT32 setPrevMixCertificate(DOMElement *elemCertificates)
SINT32 setMixName(DOMElement *elemGeneral)
SINT32 getDatabaseName(UINT8 *name, UINT32 len)
UINT32 getListenerInterfaceCount()
UINT8 * m_strDatabaseName
friend THREAD_RETURN threadReConfigure(void *param)
Thread that does the actual reconfigure work.
SINT32 getCredential(UINT8 *name, UINT32 len)
SINT32 processXmlConfiguration(XERCES_CPP_NAMESPACE::DOMDocument *docConfig)
XERCES_CPP_NAMESPACE::DOMDocument * m_docMixXml
CACertificate * m_pLogEncryptionCertificate
UINT32 m_nCertificateOptionsSetters
UINT32 m_addrInfoServicesSize
SINT32 createSockets(bool a_bPrintMessages, CASocket **a_sockets, UINT32 a_socketsLen)
SINT32 setNextMix(XERCES_CPP_NAMESPACE::DOMDocument *pDoc)
Modifies the next mix settings (target interface and certificate) according to the specified options ...
UINT32 getDelayChannelBucketGrow()
SINT32 getDatabasePassword(UINT8 *pass, UINT32 len)
SINT32 setGeneralOptions(DOMElement *elemRoot)
SINT32 setAccountingOptions(DOMElement *elemRoot)
optionSetter_pt * mainOptionSetters
SINT32 setMaxUsers(DOMElement *elemGeneral)
UINT8 * m_strDatabasePassword
SINT32 parse(int argc, const char **arg)
SINT32 setKeepAliveTraffic(DOMElement *elemNetwork)
SINT32 getMixHost(UINT8 *host, UINT32 len)
SINT32 getMixId(UINT8 *id, UINT32 len)
bool isInfoServiceEnabled()
DOMElement * getCascadeXML()
SINT32 setAccessControlCredential(DOMElement *elemGeneral)
DOMElement * getTermsAndConditions()
SINT32 setMixDescription(DOMElement *elemRoot)
XERCES_CPP_NAMESPACE::DOMDocument ** m_termsAndConditionsTemplates
void clean()
Deletes all resssource allocated by objects of this class EXPECT the locks necessary to controll acce...
DOMNodeList * m_opCertList
SYMCHANNELCIPHER_ALGORITHM m_algSymChannelCipher
SINT32 setMixType(DOMElement *elemGeneral)
determines whether this mix is a first a middle or a last mix appears in <General></General> and must...
SINT32 reread(CAMix *pMix)
Rereads the configuration file (if one was given on startup) and reconfigures the mix according to th...
CACertificate * m_pPrevMixCertificate
optionSetter_pt * generalOptionSetters
void initAccountingOptionSetters()
XERCES_CPP_NAMESPACE::DOMDocument * m_docOpTnCs
CACertificate * m_OpCert
bool hasPrevMixTestCertificate()
optionSetter_pt * certificateOptionSetters
CACertificate * getLogEncryptionKey()
Returns a certificate which contains a key which could be used for log encryption.
UINT32 getDelayChannelBucketGrowIntervall()
SINT32 setTrustedRootCertificates(DOMElement *elemCertificates)
SINT32 setCertificateOptions(DOMElement *elemRoot)
UINT8 * m_strDatabaseUser
SINT32 getCascadeName(UINT8 *name, UINT32 len) const
CAThread m_threadReConfigure
SINT32 parseInfoServices(DOMElement *a_infoServiceNode)
**
bool isEncryptedLogEnabled()
Returns if the encrpyted Log could/should be used.
void initNetworkOptionSetters()
SINT32 setTermsAndConditionsList(DOMElement *elemTnCs)
char * m_strEncryptedLogDir
SINT32 setPrevMixTestCertificate(CACertificate *cert)
SINT32 setTermsAndConditionsTemplates(DOMElement *elemTnCs)
static SINT32 buildDefaultConfig(XERCES_CPP_NAMESPACE::DOMDocument *a_doc, bool bForLastMix)
Creates a default mix configuration.
SINT32 setLogDir(const UINT8 *name, UINT32 len)
char * m_dbCountryStatsHost
SINT32 setDaemonMode(DOMElement *elemGeneral)
void initTermsAndConditionsOptionSetters()
SINT32 setDynamicMix(DOMElement *elemGeneral)
determines whether this mix is a dynamic mix or not appears in <General></General> and is optional.
UINT32 getNumberOfTermsAndConditionsTemplates()
Get the XML describing the Mix.
CAListenerInterface ** m_arListenerInterfaces
SINT32 setPrevMix(XERCES_CPP_NAMESPACE::DOMDocument *pDoc)
Modifies the next mix settings (target interface and certificate) according to the specified options ...
UINT32 getKeepAliveRecvInterval()
SINT32 clearVisibleAddresses()
CAXMLPriceCert * m_pPriceCertificate
SINT32 setNetworkOptions(DOMElement *elemRoot)
SINT32 setSettleInterval(DOMElement *elemAccounting)
SINT32 setNewValues(CACmdLnOptions &newOptions)
Copies options from newOptions.
SINT32 setTermsAndConditions(DOMElement *elemRoot)
static SINT32 createMixOnCDConfiguration(const UINT8 *strFileName)
Writes a default configuration file into the file named by filename.
SINT32 getPidFile(UINT8 *pidfile, UINT32 len)
SINT64 getMaxLogFileSize()
SINT32 readXmlConfiguration(XERCES_CPP_NAMESPACE::DOMDocument *&docConfig, const UINT8 *const configFileName)
Tries to read the XML configuration file configFile and parses (but not process) it.
UINT32 m_cnListenerInterfaces
SINT32 setServerMonitoring(DOMElement *elemNetwork)
SINT32 getSOCKSHost(UINT8 *host, UINT32 len)
CAMultiSignature * getMultiSigner()
SINT32 setNrOfFileDescriptors(DOMElement *elemGeneral)
UINT8 * m_strDatabaseHost
char * m_dbCountryStatsPasswd
SINT32 getUser(UINT8 *user, UINT32 len)
UINT32 getMaxNrOfUsers()
CACertStore * m_pTrustedRootCertificates
bool acceptReconfiguration()
void initGeneralOptionSetters()
SINT32 setAccountingSoftLimit(DOMElement *elemAccounting)
optionSetter_pt * m_arpTermsAndConditionsOptionSetters
SINT32 setOwnCertificate(DOMElement *elemCertificates)
UINT32 getDelayChannelUnlimitTraffic()
void initCertificateOptionSetters()
UINT32 m_iPaymentSettleInterval
UINT8 * m_strCascadeName
UINT32 m_u32KeepAliveRecvInterval
UINT16 getDatabasePort()
UINT32 getPaymentSettleInterval()
UINT32 m_u32DelayChannelBucketGrow
SINT32 setMixCertificateVerification(DOMElement *elemCertificates)
UINT32 m_iPaymentSoftLimit
UINT32 m_u32DelayChannelBucketGrowIntervall
SINT32 setAccountingDatabase(DOMElement *elemAccounting)
SINT32 getCountryStatsDBConnectionLoginData(char **db_host, char **db_user, char **db_passwd)
SINT32 getDatabaseHost(UINT8 *host, UINT32 len)
void initMainOptionSetters()
UINT32 getPrepaidInterval()
SINT32 setCascadeNameFromOptions(DOMElement *elemGeneral)
SINT32 getEncryptedLogDir(UINT8 *name, UINT32 len)
SINT32 addVisibleAddresses(DOMNode *nodeProxy)
** Add all the visible addresses to the list of visible addresses found in the XML description of the...
UINT32 getMaxLogFiles()
SINT32 getOperatorSubjectKeyIdentifier(UINT8 *buffer, UINT32 *length)
Returns a COPY of the public test certifcate for that mix.
SINT32 getLogDir(UINT8 *name, UINT32 len)
CAListenerInterface * getListenerInterface(UINT32 nr)
UINT32 m_iPaymentHardLimit
SINT32 m_PaymentReminderProbability
SINT32 setInfoServices(DOMElement *elemNetwork)
CAMutex * m_pcsReConfigure
SINT32 setMixID(DOMElement *elemGeneral)
SINT32 clearListenerInterfaces()
SINT32 appendMixInfo_internal(DOMNode *a_node, bool with_subtree)
SINT32 setLoggingOptions(DOMElement *elemGeneral)
CATargetInterface * m_arTargetInterfaces
CACertificate * getNextMixTestCertificate()
SINT32 setNextMixTestCertificate(CACertificate *cert)
SINT32 setAccountingHardLimit(DOMElement *elemAccounting)
CAListenerInterface ** m_addrInfoServices
XERCES_CPP_NAMESPACE::DOMDocument ** getAllTermsAndConditionsTemplates()
SINT32 setTargetInterfaces(DOMElement *elemNetwork)
This method sets the proxy or next mix settings.
SINT32 getDatabaseUsername(UINT8 *user, UINT32 len)
UINT8 ** m_arStrVisibleAddresses
SINT32 setPriceCertificate(DOMElement *elemAccounting)
SINT32 setPaymentReminder(DOMElement *elemGeneral)
SINT32 setNextMixCertificate(DOMElement *elemCertificates)
UINT32 getPaymentHardLimit()
UINT32 m_nrOfTermsAndConditionsTemplates
UINT16 getSOCKSServerPort()
SYMCHANNELCIPHER_ALGORITHM getSymChannelCipherAlgorithm() const
SINT32 setRessourceOptions(DOMElement *elemRoot)
UINT32 getPaymentSoftLimit()
CAMultiSignature * m_pMultiSignature
DOMElement * m_pCascadeXML
optionSetter_pt * accountingOptionSetters
UINT32 m_u32KeepAliveSendInterval
SINT32 setSymChannelCipherAlgorithm(SYMCHANNELCIPHER_ALGORITHM cipherAlgorithm)
XERCES_CPP_NAMESPACE::DOMDocument * m_docMixInfo
optionSetter_pt * networkOptionSetters
SINT32 addMixIdToMixInfo()
Just add the id of the Mix to the MixInfo Document.
SINT32 setCascadeName(const UINT8 *name)
SINT32 enableEncryptedLog(bool b)
Set to true if the encrpyted log could/should be used.
static SINT32 saveToFile(XERCES_CPP_NAMESPACE::DOMDocument *a_doc, const UINT8 *a_strFileName)
Saves the given XML Document to a file.
UINT32 getKeepAliveSendInterval()
UINT32 m_u32DelayChannelUnlimitTraffic
bool getCompressLogs()
ONLY_LOCAL_PROXY or first mix.
SINT32 invokeOptionSetters(const optionSetter_pt *optionsSetters, DOMElement *target, SINT32 optionsSettersLength)
framework-function for calling predefined option setter functions.
CACertStore * getTrustedCertificateStore()
CAXMLBI * getBI()
Returns an CAXMLBI object, which describes the BI this AI uses.
UINT32 getTargetInterfaceCount()
bool isAccessControlEnabled()
SINT32 setPrepaidInterval(DOMElement *elemAccounting)
SINT32 getAccessControlCredential(UINT8 *outbuff, UINT32 *outbuffsize)
SINT32 setPaymentInstance(DOMElement *elemAccounting)
bool verifyMixCertificates()
UINT32 m_cnVisibleAddresses
SINT32 setUserID(DOMElement *elemGeneral)
SINT32 setListenerInterfaces(DOMElement *elemNetwork)
SINT32 getMixXml(XERCES_CPP_NAMESPACE::DOMDocument *&docMixInfo)
Returns the XML tree describing the Mix .
SINT32 setMinCascadeLength(DOMElement *elemGeneral)
CACertificate * getPrevMixTestCertificate()
void initMixDescriptionSetters()
SINT32 getMaxOpenFiles()
SINT32 getVisibleAddress(UINT8 *strAddressBuff, UINT32 len, UINT32 nr)
Fills strAddressBuff with a outside visible adress.
SINT32 setOwnOperatorCertificate(DOMElement *elemCertificates)
SINT32 clearTargetInterfaces()
UINT32 getVisibleAddressesCount()
bool m_bLocalProxy
ONLY_LOCAL_PROXY or first.
bool hasNextMixTestCertificate()
CAListenerInterface ** getInfoServices(UINT32 &r_size)
SINT32 getTargetInterface(CATargetInterface &oTargetInterface, UINT32 nr)
Fills a TargetInterface struct with the values which belongs to the target interface nr.
char * m_dbCountryStatsUser
CACertificate * m_pNextMixCertificate
CAXMLPriceCert * getPriceCertificate() const
Definition: CAMix.hpp:49
tMixType
Definition: CAMix.hpp:52
This class represents a socket address for Internet (IP) connections.
SINT32 cloneInto(CATargetInterface &oTargetInterface) const
const SINT32 E_SUCCESS
Definition: errorcodes.hpp:2
#define E_SPACE
Definition: errorcodes.hpp:7
#define E_UNKNOWN
Definition: errorcodes.hpp:3
CAMix * pMix
Definition: proxytest.cpp:75
UINT16 len
Definition: typedefs.hpp:0