Mixe for Privacy and Anonymity in the Internet
|
#include "StdAfx.h"
#include "CAUtil.hpp"
#include "CABase64.hpp"
#include "CAMsg.hpp"
#include "xml/DOM_Output.hpp"
#include "CASymCipher.hpp"
Go to the source code of this file.
Macros | |
#define | XML_ENCODE_KEY_TEMPLATE "<EncryptedKey><EncryptionMethod Algorithm=\"RSA\"/><CipherData><CipherValue>%s</CipherValue></CipherData></EncryptedKey>" |
Functions | |
UINT32 | strtrim (UINT8 *s) |
Removes leading and ending whitespaces (chars<=32) from a zero terminated string. More... | |
UINT32 | toLower (UINT8 *a_string) |
UINT8 * | bytes2hex (const void *bytes, UINT32 len) |
Converts the byte array to a hex string. More... | |
SINT32 | memtrim (UINT8 *dest, const UINT8 *src, UINT32 size) |
Removes leading and ending whitespaces (chars<=32) from a byte array. More... | |
char * | strins (const char *src, UINT32 pos, const char *ins) |
Inserts a String ins in a String src starting after pos chars. More... | |
char * | strins (const char *src, const char *pos, const char *ins) |
Inserts a String ins in a String src starting at the char pos points to. More... | |
void | logMemoryUsage () |
Log information about the current memory (heap) usage. More... | |
SINT32 | getcurrentTime (timespec &t) |
Gets the current Systemtime in milli seconds. More... | |
SINT32 | getcurrentTimeMillis (UINT64 &u64Time) |
Gets the current Systemtime in milli seconds. More... | |
SINT32 | getcurrentTimeMicros (UINT64 &u64Time) |
Gets the current Systemtime in micros seconds. More... | |
SINT32 | initRandom () |
SINT32 | compDate (struct tm *date1, struct tm *date2) |
SINT32 | getRandom (UINT32 *val) |
Gets 32 random bits. More... | |
SINT32 | getRandom (UINT16 *val) |
Gets 16 random bits. More... | |
SINT32 | getRandom (UINT64 *val) |
SINT32 | getRandom (UINT8 *buff, UINT32 len) |
Gets some random bytes. More... | |
SINT32 | msSleep (UINT32 ms) |
Sleeps ms milliseconds. More... | |
SINT32 | sSleep (UINT32 sec) |
Sleeps sec Seconds. More... | |
UINT32 | getMemoryUsage () |
SINT32 | getDOMChildByName (const DOMNode *pNode, const char *const name, DOMElement *&child, bool deep) |
SINT32 | getDOMChildByName (const DOMNode *pNode, const XMLCh *const name, DOMNode *&a_child, bool deep) |
SINT32 | getDOMChildByName (const DOMNode *pNode, const char *const name, DOMNode *&a_child, bool deep) |
SINT32 | getSignatureElements (DOMNode *parent, DOMNode **signatureNodes, UINT32 *length) |
SINT32 | integrateDOMNode (const DOMNode *srcNode, DOMNode *dstNode, bool recursive, bool replace) |
integrates the source node in the destination Node. More... | |
bool | equals (const XMLCh *const e1, const char *const e2) |
void | initDOMParser () |
XERCES_CPP_NAMESPACE::DOMDocument * | parseDOMDocument (const UINT8 *const buff, UINT32 len) |
Parses a buffer containing an XML document and returns this document. More... | |
XERCES_CPP_NAMESPACE::DOMDocument * | parseDOMDocument (const UINT8 *const pathOrURL) |
parses a file via path or URL More... | |
void | releaseDOMParser () |
SINT32 | getNodeName (const DOMNode *const pElem, UINT8 *value, UINT32 *valuelen) |
SINT32 | getDOMElementValue (const DOMNode *const pElem, UINT8 *value, UINT32 *valuelen) |
Returns the content of the text node(s) under elem as null-terminated C String. More... | |
SINT32 | getDOMElementAttribute (const DOMNode *const elem, const char *attrName, UINT8 *value, UINT32 *len) |
SINT32 | getDOMElementAttribute (const DOMNode *const elem, const char *attrName, SINT32 *value) |
DOMElement * | createDOMElement (XERCES_CPP_NAMESPACE::DOMDocument *pOwnerDoc, const char *const name) |
Creates a new DOMElement with the given name which belongs to the DOMDocument owernDoc. More... | |
DOMText * | createDOMText (XERCES_CPP_NAMESPACE::DOMDocument *pOwnerDoc, const char *const text) |
Creates a new DOMText with the given value which belongs to the DOMDocument owernDoc. More... | |
SINT32 | setDOMElementAttribute (DOMNode *pElem, const char *attrName, const char *value) |
SINT32 | setDOMElementAttribute (DOMNode *pElem, const char *attrName, const UINT8 *value) |
SINT32 | setCurrentTimeMilliesAsDOMAttribute (DOMNode *pElem) |
UINT8 * | getTermsAndConditionsTemplateRefId (DOMNode *tcTemplateRoot) |
SINT32 | getDOMElementValue (const DOMElement *pElem, UINT32 &value, UINT32 defaultValue) |
Gets the value from an DOM-Element as UINT32. More... | |
SINT32 | getDOMElementValue (const DOMElement *const pElem, UINT32 *value) |
SINT32 | setDOMElementValue (DOMElement *pElem, SINT32 value) |
SINT32 | setDOMElementValue (DOMElement *pElem, double floatValue) |
SINT32 | setDOMElementValue (DOMElement *pElem, const UINT64 text) |
Sets the decimal text representation of a 64bit integer as node value TODO: implement this for non-64bit platforms. More... | |
SINT32 | setDOMElementAttribute (DOMNode *pElem, const char *attrName, UINT64 value) |
SINT32 | setDOMElementAttribute (DOMNode *pElem, const char *attrName, SINT64 value) |
SINT32 | setDOMElementAttribute (DOMNode *pElem, const char *attrName, SINT32 value) |
SINT32 | setDOMElementAttribute (DOMNode *pElem, const char *attrName, bool value) |
SINT32 | setDOMElementValue (DOMElement *pElem, bool value) |
SINT32 | getDOMElementValue (const DOMElement *const pElem, SINT32 *value) |
SINT32 | getDOMElementValue (const DOMElement *const pElem, double *value) |
SINT32 | getDOMElementValue (const DOMNode *const pElem, UINT64 &value) |
SINT32 | getDOMElementValue (const DOMElement *const pElem, SINT64 &value) |
SINT32 | encryptXMLElement (DOMNode *node, CAASymCipher *pRSA) |
The resulting encrypted xml struct is as follows: More... | |
UINT8 * | encryptXMLElement (UINT8 *inbuff, UINT32 inlen, UINT32 &outlen, CAASymCipher *pRSA) |
Encrypts an XML-Element by wrapping it with: More... | |
SINT32 | decryptXMLElement (DOMNode *node, CAASymCipher *pRSA) |
Replaces a DOM element with a deencrypted version of this element. More... | |
UINT8 * | readFile (const UINT8 *const name, UINT32 *size) |
ONLY_LOCAL_PROXY or first. More... | |
SINT32 | saveFile (const UINT8 *const name, const UINT8 *const buff, UINT32 buffSize) |
SINT32 | parseUINT16 (const UINT8 *str, UINT16 &value) |
Parses a timestamp in JDBC timestamp escape format (as it comes from the BI) and outputs the value in milliseconds since the epoch. More... | |
SINT32 | parseU64 (const UINT8 *str, UINT64 &value) |
Parses a 64bit unsigned integer. More... | |
SINT32 | parseS64 (const UINT8 *str, SINT64 &value) |
Parses a 64bit signed integer. More... | |
SINT32 | readPasswd (UINT8 *buff, UINT32 len) |
Read a passwd (i.e. More... | |
XERCES_CPP_NAMESPACE::DOMDocument * | createDOMDocument () |
Parses a timestamp in JDBC timestamp escape format (as it comes from the BI) and outputs the value in seconds since the epoch. More... | |
SINT32 | setDOMElementValue (DOMElement *pElem, UINT32 value) |
SINT32 | setDOMElementValue (DOMElement *pElem, const UINT8 *value) |
SINT32 | setDOMElementAttribute (DOMNode *pElem, const char *attrName, UINT32 value) |
SINT32 | getDOMElementAttribute (const DOMNode *const elem, const char *attrName, UINT32 &value) |
SINT32 | decodeXMLEncryptedKey (UINT8 *key, UINT32 *keylen, const UINT8 *const xml, UINT32 xmllen, CAASymCipher *pRSA) |
SINT32 | decodeXMLEncryptedKey (UINT8 *key, UINT32 *keylen, const DOMNode *root, CAASymCipher *pRSA) |
void | __encryptKey (UINT8 *key, UINT32 keylen, UINT8 *outBuff, UINT32 *outLen, CAASymCipher *pRSA) |
SINT32 | encodeXMLEncryptedKey (UINT8 *key, UINT32 keylen, UINT8 *xml, UINT32 *xmllen, CAASymCipher *pRSA) |
SINT32 | encodeXMLEncryptedKey (UINT8 *key, UINT32 keylen, DOMElement *&elemRootEncodedKey, XERCES_CPP_NAMESPACE::DOMDocument *docOwner, CAASymCipher *pRSA) |
DOMNodeList * | getElementsByTagName (DOMElement *pElem, const char *const name) |
SINT32 | getLastDOMChildByName (const DOMNode *pNode, const char *const name, DOMElement *&a_child) |
SINT32 | getLastDOMChildByName (const DOMNode *pNode, const char *const name, DOMNode *&a_child) |
SINT32 | getLastDOMChildByName (const DOMNode *pNode, const XMLCh *const name, DOMNode *&a_child) |
SINT32 | getDOMElementAttribute (const DOMNode *const elem, const char *attrName, bool &value) |
SINT32 | getDOMElementAttribute (const DOMNode *const elem, const char *attrName, SINT64 &value) |
SINT32 | getDOMElementAttribute (const DOMNode *const elem, const char *attrName, UINT64 &value) |
SINT32 | getDOMElementValue (const DOMElement *const pElem, UINT16 *value) |
void | formatBytesPerSecond (UINT8 *buff, UINT32 buffsize, UINT64 bytespersecond) |
Variables | |
XercesDOMParser * | theDOMParser =NULL |
CAMutex * | theParseDOMDocumentLock = NULL |
#define XML_ENCODE_KEY_TEMPLATE "<EncryptedKey><EncryptionMethod Algorithm=\"RSA\"/><CipherData><CipherValue>%s</CipherValue></CipherData></EncryptedKey>" |
void __encryptKey | ( | UINT8 * | key, |
UINT32 | keylen, | ||
UINT8 * | outBuff, | ||
UINT32 * | outLen, | ||
CAASymCipher * | pRSA | ||
) |
Definition at line 1673 of file CAUtil.cpp.
References CABase64::encode(), and CAASymCipher::encrypt().
Referenced by encodeXMLEncryptedKey().
Converts the byte array to a hex string.
the caller is responsible for deleting the string
Definition at line 90 of file CAUtil.cpp.
References len.
Referenced by CAChain::getPrintableChainId(), and CAThread::start().
SINT32 compDate | ( | struct tm * | date1, |
struct tm * | date2 | ||
) |
Definition at line 323 of file CAUtil.cpp.
XERCES_CPP_NAMESPACE::DOMDocument* createDOMDocument | ( | ) |
Parses a timestamp in JDBC timestamp escape format (as it comes from the BI) and outputs the value in seconds since the epoch.
Creates an empty DOM DOcument.
strTimestamp | the string containing the timestamp |
seconds | an integer variable that gets the seconds value. |
Converts a timestamp (in seconds) to the String JDBC timestamp escape format (YYYY-MM-DD HH:MM:SS)
seconds | integer value containing the timestamp in seconds since the epoch |
strTimestamp | a string buffer that gets the result |
len | the buffer length |
Definition at line 1568 of file CAUtil.cpp.
Referenced by CACmdLnOptions::CACmdLnOptions(), CACmdLnOptions::createMixOnCDConfiguration(), CAFirstMix::doUserLogin_internal(), CAASymCipher::getPublicKeyAsXML(), CAAccountingInstance::handleAccountCertificate_internal(), CAFirstMix::handleTermsAndConditionsLogin(), CAFirstMix::init(), CAMix::initMixCascadeInfo(), CAReplayCtrlChannelMsgProc::initTimestampsMessageTemplate(), CAAccountingInstance::makeCCRequest(), CAAccountingInstance::makeInitialCCRequest(), CAAccountingInstance::prepareCCRequest(), CAReplayCtrlChannelMsgProc::proccessGetTimestamp(), CAReplayCtrlChannelMsgProc::proccessGotTimestamp(), CALastMix::processKeyExchange(), CAMiddleMix::processKeyExchange(), CAAccountingInstance::sendAILoginConfirmation(), CAReplayCtrlChannelMsgProc::sendGetTimestamp(), CAAbstractXMLSignable::setSignature(), CACmdLnOptions::setTermsAndConditionsList(), CAAccountingBIInterface::settleAll(), TermsAndConditions::TermsAndConditions(), and CAAbstractXMLEncodable::toXmlDocument().
DOMElement* createDOMElement | ( | XERCES_CPP_NAMESPACE::DOMDocument * | pOwnerDoc, |
const char *const | name | ||
) |
Creates a new DOMElement with the given name which belongs to the DOMDocument owernDoc.
Definition at line 814 of file CAUtil.cpp.
Referenced by CAASymCipher::addKeyPart(), CAMix::appendCompatibilityInfo(), CACmdLnOptions::buildDefaultConfig(), CAFirstMix::doUserLogin_internal(), CACertStore::encode(), CACertificate::encode(), encodeXMLEncryptedKey(), encryptXMLElement(), CAInfoService::getCascadeHeloXMLAsString(), CACmdLnOptions::getMixXml(), CAASymCipher::getPublicKeyAsDOMElement(), CASignature::getSignKey(), CAAccountingInstance::handleAccountCertificate_internal(), CAFirstMix::handleTermsAndConditionsLogin(), CAMix::initMixCascadeInfo(), CAReplayCtrlChannelMsgProc::initTimestampsMessageTemplate(), CAAccountingInstance::makeCCRequest(), CAAccountingInstance::makeInitialCCRequest(), CAAccountingInstance::prepareCCRequest(), CAReplayCtrlChannelMsgProc::proccessGetTimestamp(), CAReplayCtrlChannelMsgProc::proccessGotTimestamp(), CALastMix::processKeyExchange(), CAMiddleMix::processKeyExchange(), CACmdLnOptions::processXmlConfiguration(), CAAccountingInstance::sendAILoginConfirmation(), CAReplayCtrlChannelMsgProc::sendGetTimestamp(), CACmdLnOptions::setMixName(), CACmdLnOptions::setNextMix(), CACmdLnOptions::setPrepaidInterval(), CACmdLnOptions::setPrevMix(), CACmdLnOptions::setSymChannelCipherAlgorithm(), CACmdLnOptions::setTargetInterfaces(), CAAccountingBIInterface::settleAll(), CAMultiSignature::signXML(), CAListenerInterface::toDOMElement(), and CAXMLErrorMessage::toXmlElement().
DOMText * createDOMText | ( | XERCES_CPP_NAMESPACE::DOMDocument * | pOwnerDoc, |
const char *const | text | ||
) |
Creates a new DOMText with the given value which belongs to the DOMDocument owernDoc.
Definition at line 822 of file CAUtil.cpp.
Referenced by CAASymCipher::addKeyPart().
SINT32 decodeXMLEncryptedKey | ( | UINT8 * | key, |
UINT32 * | keylen, | ||
const DOMNode * | root, | ||
CAASymCipher * | pRSA | ||
) |
Definition at line 1646 of file CAUtil.cpp.
References CABase64::decode(), CAASymCipher::decrypt(), E_SUCCESS, E_UNKNOWN, getDOMChildByName(), and getDOMElementValue().
SINT32 decodeXMLEncryptedKey | ( | UINT8 * | key, |
UINT32 * | keylen, | ||
const UINT8 *const | xml, | ||
UINT32 | xmllen, | ||
CAASymCipher * | pRSA | ||
) |
Definition at line 1625 of file CAUtil.cpp.
References E_UNKNOWN, and parseDOMDocument().
Referenced by CALastMix::processKeyExchange(), and CAMiddleMix::processKeyExchange().
SINT32 decryptXMLElement | ( | DOMNode * | node, |
CAASymCipher * | pRSA | ||
) |
Replaces a DOM element with a deencrypted version of this element.
Definition at line 1224 of file CAUtil.cpp.
References CABase64::decode(), CASymCipher::decryptCBCwithPKCS7(), CAASymCipher::decryptOAEP(), E_SUCCESS, E_UNKNOWN, equals(), getDOMChildByName(), getDOMElementValue(), len, parseDOMDocument(), CASymCipher::setIV(), and CASymCipher::setKey().
Referenced by CAFirstMix::doUserLogin_internal().
SINT32 encodeXMLEncryptedKey | ( | UINT8 * | key, |
UINT32 | keylen, | ||
DOMElement *& | elemRootEncodedKey, | ||
XERCES_CPP_NAMESPACE::DOMDocument * | docOwner, | ||
CAASymCipher * | pRSA | ||
) |
Definition at line 1694 of file CAUtil.cpp.
References __encryptKey(), createDOMElement(), E_SUCCESS, setDOMElementAttribute(), and setDOMElementValue().
SINT32 encodeXMLEncryptedKey | ( | UINT8 * | key, |
UINT32 | keylen, | ||
UINT8 * | xml, | ||
UINT32 * | xmllen, | ||
CAASymCipher * | pRSA | ||
) |
Definition at line 1683 of file CAUtil.cpp.
References __encryptKey(), E_SUCCESS, len, and XML_ENCODE_KEY_TEMPLATE.
Referenced by CAMiddleMix::processKeyExchange().
SINT32 encryptXMLElement | ( | DOMNode * | node, |
CAASymCipher * | pRSA | ||
) |
The resulting encrypted xml struct is as follows:
Replaces a DOM element with an encrypted version of this element.
* <EncryptedData Type='http://www.w3.org/2001/04/xmlenc#Element'> * <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/> * <ds:KeyInfo xmlns:ds='http://www.w3.org/2000/09/xmldsig#'> * <EncryptedKey> * <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/> * <CipherData> * <CipherValue>...</CipherValue> * </CipherData> * </EncryptedKey> * </ds:KeyInfo> * <CipherData> * <CipherValue>...</CipherValue> * </CipherData> * </EncryptedData> *
Definition at line 1086 of file CAUtil.cpp.
References createDOMElement(), DOM_Output::dumpToMem(), E_SUCCESS, CABase64::encode(), CASymCipher::encryptCBCwithPKCS7(), CAASymCipher::encryptOAEP(), getRandom(), setDOMElementValue(), CASymCipher::setIV(), and CASymCipher::setKey().
Referenced by CALocalProxy::processKeyExchange().
UINT8* encryptXMLElement | ( | UINT8 * | inbuff, |
UINT32 | inlen, | ||
UINT32 & | outlen, | ||
CAASymCipher * | pRSA | ||
) |
Encrypts an XML-Element by wrapping it with:
ONLY_LOCAL_PROXY or first.
* \<EncryptedData Type='http://www.w3.org/2001/04/xmlenc#Element'> * \<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/> * \<ds:KeyInfo xmlns:ds='http://www.w3.org/2000/09/xmldsig#'> * \<EncryptedKey> * \<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/> * \<CipherData\> * \<CipherValue>...\</CipherValue> * \</CipherData> * \</EncryptedKey> * \</ds:KeyInfo> * \<CipherData> * \<CipherValue>...\</CipherValue> * \</CipherData> * \</EncryptedData> *
Definition at line 1188 of file CAUtil.cpp.
References CABase64::encode(), CASymCipher::encryptCBCwithPKCS7(), CAASymCipher::encryptOAEP(), getRandom(), CASymCipher::setIV(), and CASymCipher::setKey().
bool equals | ( | const XMLCh *const | e1, |
const char *const | e2 | ||
) |
Definition at line 645 of file CAUtil.cpp.
Referenced by CACmdLnOptions::addVisibleAddresses(), CACertificate::decode(), decryptXMLElement(), CAFirstMix::doUserLogin_internal(), getDOMChildByName(), getLastDOMChildByName(), getSignatureElements(), CAFirstMix::handleTermsAndConditionsLogin(), CAMix::initMixCascadeInfo(), integrateDOMNode(), CASignature::parseSignKeyXML(), CAMiddleMix::processKeyExchange(), CALocalProxy::processKeyExchange(), CAReplayControlChannel::processXMLMessage(), CAASymCipher::setPublicKeyAsDOMNode(), CASignature::setSignKey(), and CASignature::setVerifyKey().
Definition at line 1821 of file CAUtil.cpp.
Referenced by CACryptoBenchmark::benchmarkThread(), and CACryptoBenchmark::doBenchmark().
SINT32 getcurrentTime | ( | timespec & | t | ) |
Gets the current Systemtime in milli seconds.
bnTime | - Big Number, in which the current time is placed |
E_UNSPECIFIED,if | bnTime was NULL |
E_UNKNOWN,if | an error occurs |
E_SUCCESS,otherwise |
Definition at line 227 of file CAUtil.cpp.
References E_SUCCESS.
Referenced by CAChain::addChannel(), CAChain::forceImmediateResponsesInternal(), CAAccountingInstance::handleAccountCertificate_internal(), initRandom(), CAChain::processDownstream(), and CAConditionVariable::wait().
Gets the current Systemtime in micros seconds.
Depending on the operating system, the time may not be so accurat.
u64Time | - 64 bit Integer, in which the current time is placed |
E_UNKNOWN,if | an error occurs |
E_SUCCESS,otherwise |
Definition at line 280 of file CAUtil.cpp.
References E_SUCCESS, and E_UNKNOWN.
Referenced by CAChain::CAChain(), CAFirstMixA::loop(), CALastMixA::loop(), CAFirstMixB::loop(), CALastMixB::loop(), CADatabase::measurePerformance(), CAReplayDatabase::measurePerformance(), CAFirstMixA::sendToUsers(), and CAChain::~CAChain().
Gets the current Systemtime in milli seconds.
u64Time | - 64 bit Integer, in which the current time is placed |
E_UNKNOWN,if | an error occurs |
E_SUCCESS,otherwise |
Definition at line 252 of file CAUtil.cpp.
References E_SUCCESS, and E_UNKNOWN.
Referenced by CAFirstMixChannelList::add(), CACryptoBenchmark::benchmarkThread(), CATempIPBlockList::checkIP(), CATempIPBlockList::cleanupThreadMainLoop(), CAFirstMixA::closeConnection(), CACryptoBenchmark::doBenchmark(), CAInfoService::getCascadeHeloXMLAsString(), CACmdLnOptions::getMixXml(), CAInfoService::getStatusXMLAsString(), CAAccountingInstance::handleCostConfirmation_internal(), CATempIPBlockList::insertIP(), CALastMixA::loop(), CAFirstMixB::loop(), CAHttpClient::parseHTTPHeader(), CAFirstMixChannelToQueueList::performanceTest(), CAMuxSocket::receive(), CASocket::receiveFullyT(), CASocket::receiveLine(), CAInfoService::sendCascadeHelo(), CASocket::sendFullyTimeOut(), CAInfoService::sendMixHelo(), CAInfoService::sendStatus(), setCurrentTimeMilliesAsDOMAttribute(), CAMix::start(), and CAASymCipher::testSpeed().
SINT32 getDOMChildByName | ( | const DOMNode * | pNode, |
const char *const | name, | ||
DOMElement *& | child, | ||
bool | deep | ||
) |
Definition at line 458 of file CAUtil.cpp.
Referenced by CACmdLnOptions::addVisibleAddresses(), CAMix::checkCompatibility(), decodeXMLEncryptedKey(), decryptXMLElement(), CAFirstMix::doUserLogin_internal(), CAInfoService::getCascadeHeloXMLAsString(), getDOMChildByName(), CAListenerInterface::getInstance(), CACmdLnOptions::getMixXml(), CAAccountingInstance::handleAccountCertificate_internal(), CAAccountingInstance::handleChallengeResponse_internal(), CAFirstMix::handleKeyInfoExtensions(), CAFirstMix::handleTermsAndConditionsExtension(), CAFirstMix::handleTermsAndConditionsLogin(), CAMix::initMixCascadeInfo(), CAAccountingInstance::makeCCRequest(), CAAccountingInstance::makeInitialCCRequest(), CACmdLnOptions::parseInfoServices(), CASignature::parseSignKeyXML(), CAAccountingInstance::prepareCCRequest(), CAReplayCtrlChannelMsgProc::proccessGetTimestamp(), CALastMix::processKeyExchange(), CAMiddleMix::processKeyExchange(), CALocalProxy::processKeyExchange(), CACmdLnOptions::processXmlConfiguration(), CAReplayControlChannel::processXMLMessage(), CAReplayCtrlChannelMsgProc::propagateCurrentReplayTimestamp(), CACmdLnOptions::setAccessControlCredential(), CACmdLnOptions::setAccountingDatabase(), CACmdLnOptions::setAccountingHardLimit(), CACmdLnOptions::setAccountingOptions(), CACmdLnOptions::setAccountingSoftLimit(), CACmdLnOptions::setCascadeNameFromOptions(), CACmdLnOptions::setCertificateOptions(), CACmdLnOptions::setDaemonMode(), CACmdLnOptions::setDynamicMix(), CACmdLnOptions::setGeneralOptions(), CACmdLnOptions::setInfoServices(), CACmdLnOptions::setKeepAliveTraffic(), CACmdLnOptions::setListenerInterfaces(), CACmdLnOptions::setLoggingOptions(), CACmdLnOptions::setMaxUsers(), CACmdLnOptions::setMinCascadeLength(), CACmdLnOptions::setMixCertificateVerification(), CACmdLnOptions::setMixDescription(), CACmdLnOptions::setMixID(), CACmdLnOptions::setMixName(), CACmdLnOptions::setMixType(), CACmdLnOptions::setNetworkOptions(), CACmdLnOptions::setNextMix(), CACmdLnOptions::setNextMixCertificate(), CACmdLnOptions::setNrOfFileDescriptors(), CACmdLnOptions::setOwnCertificate(), CACmdLnOptions::setOwnOperatorCertificate(), CACmdLnOptions::setPaymentInstance(), CACmdLnOptions::setPaymentReminder(), CACmdLnOptions::setPrepaidInterval(), CACmdLnOptions::setPrevMix(), CACmdLnOptions::setPrevMixCertificate(), CACmdLnOptions::setPriceCertificate(), CACmdLnOptions::setRessourceOptions(), CACmdLnOptions::setServerMonitoring(), CACmdLnOptions::setSettleInterval(), CACmdLnOptions::setSymChannelCipherAlgorithm(), CACmdLnOptions::setTargetInterfaces(), CACmdLnOptions::setTermsAndConditions(), CACmdLnOptions::setTermsAndConditionsList(), CACmdLnOptions::setTermsAndConditionsTemplates(), CACmdLnOptions::setTrustedRootCertificates(), CACmdLnOptions::setUserID(), CAXMLErrorMessage::setValues(), CASignature::setVerifyKey(), CAMultiSignature::signXML(), CACertStore::verifyMixCert(), CAMultiSignature::verifyXML(), and CASignature::verifyXML().
SINT32 getDOMChildByName | ( | const DOMNode * | pNode, |
const char *const | name, | ||
DOMNode *& | a_child, | ||
bool | deep | ||
) |
Definition at line 485 of file CAUtil.cpp.
References E_UNKNOWN, and getDOMChildByName().
SINT32 getDOMChildByName | ( | const DOMNode * | pNode, |
const XMLCh *const | name, | ||
DOMNode *& | a_child, | ||
bool | deep | ||
) |
Definition at line 462 of file CAUtil.cpp.
References E_SUCCESS, E_UNKNOWN, equals(), and getDOMChildByName().
SINT32 getDOMElementAttribute | ( | const DOMNode *const | elem, |
const char * | attrName, | ||
bool & | value | ||
) |
Definition at line 1756 of file CAUtil.cpp.
References E_SUCCESS, E_UNKNOWN, E_UNSPECIFIED, getDOMElementAttribute(), len, STR_VALUE_FALSE, and STR_VALUE_TRUE.
Definition at line 804 of file CAUtil.cpp.
References E_SUCCESS, E_UNKNOWN, getDOMElementAttribute(), and len.
Definition at line 1778 of file CAUtil.cpp.
References E_SUCCESS, E_UNKNOWN, getDOMElementAttribute(), len, and parseS64().
Definition at line 1613 of file CAUtil.cpp.
References E_SUCCESS, E_UNKNOWN, getDOMElementAttribute(), and len.
Definition at line 1793 of file CAUtil.cpp.
References E_SUCCESS, E_UNKNOWN, getDOMElementAttribute(), len, and parseU64().
SINT32 getDOMElementAttribute | ( | const DOMNode *const | elem, |
const char * | attrName, | ||
UINT8 * | value, | ||
UINT32 * | len | ||
) |
Definition at line 780 of file CAUtil.cpp.
References E_SPACE, E_SUCCESS, E_UNKNOWN, and len.
Referenced by CAMix::checkCompatibility(), getDOMElementAttribute(), CAListenerInterface::getInstance(), CAInfoService::getOperatorTnCsAsStrings(), getTermsAndConditionsTemplateRefId(), CAFirstMix::handleTermsAndConditionsExtension(), CAFirstMix::handleTermsAndConditionsLogin(), CAFirstMix::initMixParameters(), CAMiddleMix::processKeyExchange(), CALocalProxy::processKeyExchange(), CACmdLnOptions::processXmlConfiguration(), CAReplayControlChannel::processXMLMessage(), CACmdLnOptions::setLoggingOptions(), CACmdLnOptions::setMixName(), CACmdLnOptions::setPaymentReminder(), CACmdLnOptions::setTermsAndConditionsList(), CAAccountingBIInterface::settleAll(), CAXMLErrorMessage::setValues(), CASignature::setVerifyKey(), and CAMultiSignature::verifyXML().
SINT32 getDOMElementValue | ( | const DOMElement *const | pElem, |
double * | value | ||
) |
Definition at line 1021 of file CAUtil.cpp.
References ASSERT, E_SUCCESS, E_UNKNOWN, and getDOMElementValue().
Definition at line 1008 of file CAUtil.cpp.
References ASSERT, E_SUCCESS, E_UNKNOWN, and getDOMElementValue().
Definition at line 1051 of file CAUtil.cpp.
References ASSERT, E_SUCCESS, E_UNKNOWN, getDOMElementValue(), and parseS64().
Definition at line 1808 of file CAUtil.cpp.
References E_SUCCESS, E_UNKNOWN, and getDOMElementValue().
Definition at line 920 of file CAUtil.cpp.
References ASSERT, E_SUCCESS, E_UNKNOWN, and getDOMElementValue().
Gets the value from an DOM-Element as UINT32.
If an error occurs, the default value is returned.
Definition at line 908 of file CAUtil.cpp.
References E_SUCCESS, and getDOMElementValue().
Definition at line 1034 of file CAUtil.cpp.
References ASSERT, E_SUCCESS, E_UNKNOWN, getDOMElementValue(), and parseU64().
Returns the content of the text node(s) under elem as null-terminated C String.
If there is no text node len is set to 0.
TODO: Why is elem a DOM_Node and not a DOM_Element here?
elem | the element which has a text node under it |
value | a buffer that gets the text value |
valuelen | on call contains the buffer size, on return contains the number of bytes copied |
E_SPACE | if the buffer is too small |
E_UNKNOWN | if the element is NULL |
E_SUCCESS | otherwise |
Definition at line 746 of file CAUtil.cpp.
References ASSERT, E_SPACE, E_SUCCESS, and E_UNKNOWN.
Referenced by CACmdLnOptions::addVisibleAddresses(), CACertificate::decode(), decodeXMLEncryptedKey(), decryptXMLElement(), CAFirstMix::doUserLogin_internal(), getDOMElementValue(), CAListenerInterface::getInstance(), CAASymCipher::getKeyPart(), CAAccountingInstance::handleAccountCertificate_internal(), CAAccountingInstance::handleChallengeResponse_internal(), CACmdLnOptions::parseInfoServices(), CALastMix::processKeyExchange(), CAMiddleMix::processKeyExchange(), CALocalProxy::processKeyExchange(), CACmdLnOptions::processXmlConfiguration(), CAReplayControlChannel::processXMLMessage(), CACmdLnOptions::setAccessControlCredential(), CACmdLnOptions::setAccountingDatabase(), CACmdLnOptions::setAccountingHardLimit(), CACmdLnOptions::setAccountingSoftLimit(), CACmdLnOptions::setCascadeNameFromOptions(), CACmdLnOptions::setDaemonMode(), CACmdLnOptions::setDynamicMix(), CACmdLnOptions::setInfoServices(), CACmdLnOptions::setKeepAliveTraffic(), CACmdLnOptions::setLoggingOptions(), CACmdLnOptions::setMaxUsers(), CACmdLnOptions::setMixCertificateVerification(), CACmdLnOptions::setMixID(), CACmdLnOptions::setMixName(), CACmdLnOptions::setMixType(), CACmdLnOptions::setNrOfFileDescriptors(), CACmdLnOptions::setPaymentReminder(), CACmdLnOptions::setPrepaidInterval(), CACmdLnOptions::setRessourceOptions(), CACmdLnOptions::setServerMonitoring(), CACmdLnOptions::setSettleInterval(), CASignature::setSignKey(), CACmdLnOptions::setTargetInterfaces(), CACmdLnOptions::setTermsAndConditionsTemplates(), CACmdLnOptions::setUserID(), CAXMLErrorMessage::setValues(), CASignature::setVerifyKey(), CAMultiSignature::verifyXML(), and CASignature::verifyXML().
DOMNodeList* getElementsByTagName | ( | DOMElement * | pElem, |
const char *const | name | ||
) |
Definition at line 1711 of file CAUtil.cpp.
Referenced by CACmdLnOptions::appendMixInfo_internal(), CACertStore::decode(), CAListenerInterface::getInstance(), CAInfoService::getOperatorTnCsAsStrings(), CAFirstMix::handleTermsAndConditionsExtension(), CAFirstMix::handleTermsAndConditionsLogin(), CAFirstMix::initMixParameters(), CACmdLnOptions::parseInfoServices(), CAAccountingInstance::prepareCCRequest(), CACmdLnOptions::processXmlConfiguration(), CACmdLnOptions::setOwnCertificate(), CACmdLnOptions::setOwnOperatorCertificate(), CACmdLnOptions::setTargetInterfaces(), CACmdLnOptions::setTermsAndConditionsList(), CACmdLnOptions::setTermsAndConditionsTemplates(), CAAccountingBIInterface::settleAll(), and CACmdLnOptions::setTrustedRootCertificates().
SINT32 getLastDOMChildByName | ( | const DOMNode * | pNode, |
const char *const | name, | ||
DOMElement *& | a_child | ||
) |
Definition at line 1719 of file CAUtil.cpp.
Referenced by getLastDOMChildByName(), and CAMix::initMixCascadeInfo().
SINT32 getLastDOMChildByName | ( | const DOMNode * | pNode, |
const char *const | name, | ||
DOMNode *& | a_child | ||
) |
Definition at line 1724 of file CAUtil.cpp.
References E_UNKNOWN, and getLastDOMChildByName().
SINT32 getLastDOMChildByName | ( | const DOMNode * | pNode, |
const XMLCh *const | name, | ||
DOMNode *& | a_child | ||
) |
Definition at line 1735 of file CAUtil.cpp.
References E_SUCCESS, E_UNKNOWN, and equals().
UINT32 getMemoryUsage | ( | ) |
Definition at line 443 of file CAUtil.cpp.
Referenced by CAFirstMix::clean(), and CAFirstMixB::loop().
Definition at line 707 of file CAUtil.cpp.
References ASSERT, E_SPACE, E_SUCCESS, and E_UNKNOWN.
Referenced by CAMix::checkCompatibility().
Gets 16 random bits.
val | - on return the bits are random |
E_UNKNOWN,if | an error occured |
E_SUCCESS,if | successful |
Definition at line 363 of file CAUtil.cpp.
Gets 32 random bits.
val | - on return the bits are random |
E_UNKNOWN,if | an error occured |
E_SUCCESS,if | successful |
Definition at line 346 of file CAUtil.cpp.
References ASSERT, E_SUCCESS, and E_UNKNOWN.
Referenced by CAFirstMixChannelList::add(), CASocketList::add(), CAMiddleMixChannelList::add(), CAFirstMixChannelList::addChannel(), CAIPList::CAIPList(), CAPool::CAPool(), CAFirstMixA::closeConnection(), CAChainTable::createEntry(), encryptXMLElement(), CADatabase::fill(), CAReplayDatabase::fill(), CAAccountingInstance::handleAccountCertificate_internal(), CALocalProxy::loop(), CAFirstMixA::loop(), CALastMixA::loop(), CAFirstMixB::loop(), CALastMixB::loop(), CADatabase::measurePerformance(), CAReplayDatabase::measurePerformance(), CAFirstMixA::notifyAllUserChannels(), CAMsg::openEncryptedLog(), CAFirstMixChannelToQueueList::performanceTest(), CAPool::pool(), CAChain::processDownstream(), CALastMix::processKeyExchange(), CAMiddleMix::processKeyExchange(), CALocalProxy::processKeyExchange(), CALastMixChannelList::test(), CAMiddleMixChannelList::test(), CAQueue::test(), CAReplayDatabase::test(), and CAASymCipher::testSpeed().
Definition at line 375 of file CAUtil.cpp.
Gets some random bytes.
buff | - buff which is filled with randomness |
len | - number of bytes requested |
E_UNKNOWN,if | an error occured |
E_SUCCESS,if | successful |
Definition at line 393 of file CAUtil.cpp.
Definition at line 496 of file CAUtil.cpp.
References E_SUCCESS, E_UNKNOWN, and equals().
Referenced by CACertStore::verifyMixCert(), and CAMultiSignature::verifyXML().
UINT8* getTermsAndConditionsTemplateRefId | ( | DOMNode * | tcTemplateRoot | ) |
Definition at line 865 of file CAUtil.cpp.
References E_SUCCESS, getDOMElementAttribute(), TMP_BUFF_SIZE, TMP_DATE_SIZE, and TMP_LOCALE_SIZE.
Referenced by CAFirstMix::getTermsAndConditionsTemplate(), and CACmdLnOptions::setTermsAndConditionsTemplates().
void initDOMParser | ( | ) |
Definition at line 656 of file CAUtil.cpp.
References theDOMParser, and theParseDOMDocumentLock.
Referenced by CALibProxytest::init().
SINT32 initRandom | ( | ) |
Definition at line 302 of file CAUtil.cpp.
References E_SUCCESS, and getcurrentTime().
Referenced by CALibProxytest::init(), CADatabase::measurePerformance(), and CAReplayDatabase::measurePerformance().
SINT32 integrateDOMNode | ( | const DOMNode * | srcNode, |
DOMNode * | dstNode, | ||
bool | recursive, | ||
bool | replace | ||
) |
integrates the source node in the destination Node.
TODO 1. test for XERCES >= 3.0.1
Definition at line 533 of file CAUtil.cpp.
References E_SUCCESS, E_UNKNOWN, equals(), INTEGRATE_NOT_ALLOWED_POSITIONS, and CAMsg::printMsg().
Referenced by CACmdLnOptions::setTermsAndConditionsList().
void logMemoryUsage | ( | ) |
Log information about the current memory (heap) usage.
Definition at line 177 of file CAUtil.cpp.
References CAMsg::printMsg().
Removes leading and ending whitespaces (chars<=32) from a byte array.
src | input byte array |
dest | output byte array |
size | size of the input byte array |
E_UNSPECIFIED,if | dest was NULL |
Definition at line 126 of file CAUtil.cpp.
References E_UNSPECIFIED.
Sleeps ms milliseconds.
Definition at line 406 of file CAUtil.cpp.
References E_SUCCESS.
Referenced by consumer(), CAFirstMixA::loop(), CALastMixA::loop(), CAFirstMixB::loop(), CALastMixB::loop(), my_terminate(), CAHttpClient::parseHTTPHeader(), producer(), CAClientSocket::receiveFully(), CASocket::sendTimeOut(), and CACryptoBenchmark::timerThread().
Parses a buffer containing an XML document and returns this document.
Definition at line 663 of file CAUtil.cpp.
References len, CAMutex::lock(), theDOMParser, theParseDOMDocumentLock, and CAMutex::unlock().
Referenced by CAXMLErrorMessage::CAXMLErrorMessage(), CACertificate::decode(), decodeXMLEncryptedKey(), decryptXMLElement(), CAFirstMix::doUserLogin_internal(), CAInfoService::getPaymentInstance(), CASignature::parseSignKeyXML(), CASyncControlChannel::proccessMessageComplete(), CALastMix::processKeyExchange(), CAMiddleMix::processKeyExchange(), CALocalProxy::processKeyExchange(), CACmdLnOptions::readXmlConfiguration(), CAASymCipher::setPublicKeyAsXML(), CACmdLnOptions::setTermsAndConditionsTemplates(), CAAccountingBIInterface::settleAll(), CAMultiSignature::signXML(), and CAMultiSignature::verifyXML().
XERCES_CPP_NAMESPACE::DOMDocument* parseDOMDocument | ( | const UINT8 *const | pathOrURL | ) |
parses a file via path or URL
Definition at line 679 of file CAUtil.cpp.
References CAMutex::lock(), theDOMParser, theParseDOMDocumentLock, and CAMutex::unlock().
Parses a 64bit signed integer.
Note: If the value is out of range or not parseable an erro is returned.
Definition at line 1430 of file CAUtil.cpp.
References E_SUCCESS, E_UNKNOWN, and len.
Referenced by getDOMElementAttribute(), and getDOMElementValue().
Parses a 64bit unsigned integer.
Note: If the value is out of range or not parseable an error is returned.
Definition at line 1378 of file CAUtil.cpp.
References E_SUCCESS, E_UNKNOWN, and len.
Referenced by getDOMElementAttribute(), and getDOMElementValue().
Parses a timestamp in JDBC timestamp escape format (as it comes from the BI) and outputs the value in milliseconds since the epoch.
strTimestamp | the string containing the timestamp |
value | an integer variable that gets the milliseconds value. Converts a timestamp (in seconds) to the String JDBC timestamp escape format (YYYY-MM-DD HH:MM:SS) |
seconds | integer value containing the timestamp in seconds since the epoch |
strTimestamp | a string buffer that gets the result |
len | the buffer length |
Parses a 16bit unsigned integer
Definition at line 1367 of file CAUtil.cpp.
References E_SUCCESS.
ONLY_LOCAL_PROXY or first.
Definition at line 1330 of file CAUtil.cpp.
References filesize32(), and O_BINARY.
Referenced by CALastMix::init(), and CAMiddleMix::init().
Read a passwd (i.e.
without echoing the chars typed in)
Definition at line 1473 of file CAUtil.cpp.
References E_SUCCESS, flags, and len.
Referenced by CACmdLnOptions::setOwnCertificate().
void releaseDOMParser | ( | ) |
Definition at line 694 of file CAUtil.cpp.
References CAMutex::lock(), theDOMParser, theParseDOMDocumentLock, and CAMutex::unlock().
Referenced by CALibProxytest::cleanup().
Definition at line 1352 of file CAUtil.cpp.
References E_SUCCESS, E_UNKNOWN, myfilewrite, O_BINARY, S_IREAD, and S_IWRITE.
Referenced by CALastMix::init(), and CAMiddleMix::init().
SINT32 setCurrentTimeMilliesAsDOMAttribute | ( | DOMNode * | pElem | ) |
Definition at line 848 of file CAUtil.cpp.
References E_SUCCESS, E_UNKNOWN, getcurrentTimeMillis(), print64(), setDOMElementAttribute(), and UNIVERSAL_ATTRIBUTE_LAST_UPDATE.
Referenced by CAInfoService::getOperatorTnCsAsStrings().
SINT32 setDOMElementAttribute | ( | DOMNode * | pElem, |
const char * | attrName, | ||
bool | value | ||
) |
Definition at line 996 of file CAUtil.cpp.
References setDOMElementAttribute(), STR_VALUE_FALSE, and STR_VALUE_TRUE.
SINT32 setDOMElementAttribute | ( | DOMNode * | pElem, |
const char * | attrName, | ||
const char * | value | ||
) |
Definition at line 831 of file CAUtil.cpp.
Referenced by CACmdLnOptions::addMixIdToMixInfo(), CAMix::appendCompatibilityInfo(), CACmdLnOptions::buildDefaultConfig(), CAFirstMix::doUserLogin_internal(), encodeXMLEncryptedKey(), CAInfoService::getCascadeHeloXMLAsString(), CAInfoService::getMixHeloXMLAsString(), CAInfoService::getOperatorTnCsAsStrings(), CACmdLnOptions::getTermsAndConditions(), CAAccountingInstance::handleAccountCertificate_internal(), CALastMix::initMixCascadeInfo(), CAMix::initMixCascadeInfo(), CAReplayCtrlChannelMsgProc::initTimestampsMessageTemplate(), CAAccountingInstance::makeInitialCCRequest(), CAAccountingInstance::prepareCCRequest(), CAReplayCtrlChannelMsgProc::proccessGetTimestamp(), CAReplayCtrlChannelMsgProc::proccessGotTimestamp(), CALastMix::processKeyExchange(), CAMiddleMix::processKeyExchange(), CAAccountingInstance::sendAILoginConfirmation(), CAReplayCtrlChannelMsgProc::sendGetTimestamp(), CACmdLnOptions::setAccessControlCredential(), setCurrentTimeMilliesAsDOMAttribute(), setDOMElementAttribute(), CACmdLnOptions::setMixName(), CACmdLnOptions::setTargetInterfaces(), CAMultiSignature::signXML(), and CAXMLErrorMessage::toXmlElement().
Definition at line 836 of file CAUtil.cpp.
Definition at line 988 of file CAUtil.cpp.
References setDOMElementAttribute().
Definition at line 980 of file CAUtil.cpp.
References setDOMElementAttribute().
Definition at line 1606 of file CAUtil.cpp.
References setDOMElementAttribute().
Definition at line 973 of file CAUtil.cpp.
References print64(), and setDOMElementAttribute().
SINT32 setDOMElementValue | ( | DOMElement * | pElem, |
bool | value | ||
) |
Definition at line 1002 of file CAUtil.cpp.
References setDOMElementValue(), STR_VALUE_FALSE, and STR_VALUE_TRUE.
Sets the decimal text representation of a 64bit integer as node value TODO: implement this for non-64bit platforms.
Returns the content of the text node under elem as 64bit unsigned integer.
Definition at line 962 of file CAUtil.cpp.
References E_SUCCESS, print64(), and setDOMElementValue().
SINT32 setDOMElementValue | ( | DOMElement * | pElem, |
double | floatValue | ||
) |
Definition at line 949 of file CAUtil.cpp.
References E_SUCCESS, and setDOMElementValue().
Definition at line 939 of file CAUtil.cpp.
References E_SUCCESS.
Referenced by CACmdLnOptions::buildDefaultConfig(), CAFirstMix::doUserLogin_internal(), CACertificate::encode(), encodeXMLEncryptedKey(), encryptXMLElement(), CAInfoService::getCascadeHeloXMLAsString(), CACmdLnOptions::getMixXml(), CASignature::getSignKey(), CAAccountingInstance::handleAccountCertificate_internal(), CAMix::initMixCascadeInfo(), CAReplayCtrlChannelMsgProc::initTimestampsMessageTemplate(), CAAccountingInstance::makeCCRequest(), CAAccountingInstance::makeInitialCCRequest(), CAAccountingInstance::prepareCCRequest(), CAReplayCtrlChannelMsgProc::proccessGetTimestamp(), CAReplayCtrlChannelMsgProc::proccessGotTimestamp(), CALastMix::processKeyExchange(), CAMiddleMix::processKeyExchange(), CACmdLnOptions::processXmlConfiguration(), CAReplayCtrlChannelMsgProc::propagateCurrentReplayTimestamp(), CAAccountingInstance::sendAILoginConfirmation(), setDOMElementValue(), CACmdLnOptions::setMixName(), CACmdLnOptions::setPrepaidInterval(), CACmdLnOptions::setSymChannelCipherAlgorithm(), CACmdLnOptions::setTargetInterfaces(), CAMultiSignature::signXML(), CAListenerInterface::toDOMElement(), and CAXMLErrorMessage::toXmlElement().
Definition at line 1574 of file CAUtil.cpp.
References E_SUCCESS, and setDOMElementValue().
Sleeps sec Seconds.
Definition at line 425 of file CAUtil.cpp.
References E_SUCCESS.
Referenced by CATempIPBlockList::cleanupThreadMainLoop(), CASocket::connect(), CAFirstMix::connectToNextMix(), CAMiddleMix::connectToNextMix(), CAInfoService::InfoLoop(), CALocalProxy::loop(), signal_segv(), CALocalProxy::start(), and CAMix::start().
char* strins | ( | const char * | src, |
const char * | pos, | ||
const char * | ins | ||
) |
Inserts a String ins in a String src starting at the char pos points to.
Returns a newly allocated String which must be freed using delete.
Definition at line 168 of file CAUtil.cpp.
References strins().
char* strins | ( | const char * | src, |
UINT32 | pos, | ||
const char * | ins | ||
) |
Inserts a String ins in a String src starting after pos chars.
Returns a newly allocated String which must be freed using delete.
Definition at line 148 of file CAUtil.cpp.
Referenced by strins().
Removes leading and ending whitespaces (chars<=32) from a zero terminated string.
s | input string (null terminated) |
0 | means, that either s was NULL or that the new string has a zero length (that means, that the old string only contains whitespaces) |
Definition at line 49 of file CAUtil.cpp.
Referenced by CAListenerInterface::getInstance(), CAChain::getPrintableChainId(), CAMultiSignature::getSKI(), CAAccountingInstance::prepareCCRequest(), CACmdLnOptions::setAccountingDatabase(), CACmdLnOptions::setLoggingOptions(), CACmdLnOptions::setMixID(), and CACmdLnOptions::setTargetInterfaces().
Definition at line 74 of file CAUtil.cpp.
References E_SUCCESS.
Referenced by CACmdLnOptions::setLoggingOptions().
XercesDOMParser* theDOMParser =NULL |
Definition at line 653 of file CAUtil.cpp.
Referenced by initDOMParser(), parseDOMDocument(), and releaseDOMParser().
CAMutex* theParseDOMDocumentLock = NULL |
Definition at line 654 of file CAUtil.cpp.
Referenced by initDOMParser(), parseDOMDocument(), and releaseDOMParser().