155 #include <irrxml/irrXML.hpp>
176 if (0 != nReturnVal)
return nReturnVal;
179 const OTString strNodeName(xml->getNodeName());
181 if (strNodeName.Compare(
"masterCredential")) {
186 otWarn <<
"Loading masterCredential...\n";
199 "<masterCredential nymID=\"%s\" >\n\n",
264 otOut << __FUNCTION__ <<
": Failure: Expected *this object to be the "
265 "same as m_pOwner->GetMasterkey(), "
282 otOut << __FUNCTION__ <<
": Failed verifying master credential: it's "
283 "not signed by itself (its own signing "
323 bool bVerified =
false;
326 std::string str_source;
329 if (str_raw_source.compare(0, 5,
"http:") == 0) {
330 str_source.insert(str_source.begin(), str_raw_source.begin() + 5,
331 str_raw_source.end());
334 else if (str_raw_source.compare(0, 6,
"https:") == 0) {
335 str_source.insert(str_source.begin(), str_raw_source.begin() + 6,
336 str_raw_source.end());
340 else if (str_raw_source.compare(0, 8,
"bitcoin:") == 0) {
341 str_source.insert(str_source.begin(), str_raw_source.begin() + 8,
342 str_raw_source.end());
346 else if (str_raw_source.compare(0, 9,
"namecoin:") == 0) {
347 str_source.insert(str_source.begin(), str_raw_source.begin() + 9,
348 str_raw_source.end());
352 else if (str_raw_source.compare(0, 8,
"freenet:") == 0) {
353 str_source.insert(str_source.begin(), str_raw_source.begin() + 8,
354 str_raw_source.end());
358 else if (str_raw_source.compare(0, 4,
"tor:") == 0) {
359 str_source.insert(str_source.begin(), str_raw_source.begin() + 4,
360 str_raw_source.end());
364 else if (str_raw_source.compare(0, 4,
"i2p:") == 0) {
365 str_source.insert(str_source.begin(), str_raw_source.begin() + 4,
366 str_raw_source.end());
371 else if (str_raw_source.compare(0, 5,
"cert:") == 0) {
372 str_source.insert(str_source.begin(), str_raw_source.begin() + 5,
373 str_raw_source.end());
378 str_source = str_raw_source;
393 otErr << __FUNCTION__ <<
": Failure: this function has not yet been "
394 "written, so this HTTP source cannot be "
399 otErr <<
"\nNOTE: Returning TRUE for TESTING PURPOSES, as if HTTP source "
401 "\n\n\n ----------------------- \n\n";
414 otErr << __FUNCTION__ <<
": Failure: this function has not yet been "
415 "written, so this HTTPS source cannot be "
420 otErr <<
"\nNOTE: Returning TRUE for TESTING PURPOSES, as if HTTPS source "
422 "\n\n\n ----------------------- \n\n";
441 otErr << __FUNCTION__ <<
": Failure: this function has not yet been "
442 "written, so this Bitcoin source cannot be "
447 otErr <<
"\nNOTE: Returning TRUE for TESTING PURPOSES, as if Bitcoin had "
449 "\n\n\n ----------------------- \n\n";
462 otErr << __FUNCTION__ <<
": Failure: this function has not yet been "
463 "written, so this Namecoin source cannot be "
468 otErr <<
"\nNOTE: Returning TRUE for TESTING PURPOSES, as if Namecoin had "
470 "\n\n\n ----------------------- \n\n";
477 otErr << __FUNCTION__ <<
": Failure: this function has not yet been "
478 "written, so this Freenet source cannot be "
485 otErr << __FUNCTION__ <<
": Failure: this function has not yet been "
486 "written, so this Tor source cannot be "
493 otErr << __FUNCTION__ <<
": Failure: this function has not yet been "
494 "written, so this I2P source cannot be "
509 otErr << __FUNCTION__ <<
": Failure: this function has not yet been "
510 "written, so this CA source cannot be verified.\n";
bool VerifySource_Pubkey(const OTString strSource) const
void UpdatePublicCredentialToString(OTString &strAppendTo)
OTString m_strSourceForNymID
bool VerifySource_Freenet(const OTString strSource) const
bool VerifySource_I2P(const OTString strSource) const
bool VerifyAgainstSource() const
OTLOG_IMPORT OTLogStream otOut
void UpdatePublicContentsToString(OTString &strAppendTo)
EXPORT void Concatenate(const char *arg,...)
EXPORT bool SetString(const OTString &theData, bool bLineBreaks=true)
bool VerifySource_Namecoin(const OTString strSource) const
virtual bool VerifyInternally()
bool VerifySource_TOR(const OTString strSource) const
virtual void UpdateContents()
bool VerifySource_Bitcoin(const OTString strSource) const
OTString m_strContractType
const OTString & GetNymID() const
OTStringXML m_xmlUnsigned
OTLOG_IMPORT OTLogStream otWarn
bool VerifySource_CA(const OTString strSource) const
const OTString & GetNymIDSource() const
EXPORT const char * Get() const
OTLOG_IMPORT OTLogStream otErr
bool VerifySignedBySelf()
void UpdatePrivateContentsToString(OTString &strAppendTo)
EXPORT const OTMasterkey & GetMasterkey() const
EXPORT bool Exists(std::string strFolder, std::string oneStr="", std::string twoStr="", std::string threeStr="")
OTString m_strMasterCredID
bool VerifySource_HTTP(const OTString strSource) const
bool VerifySource_HTTPS(const OTString strSource) const
virtual int32_t ProcessXMLNode(irr::io::IrrXMLReader *&xml)
virtual EXPORT void Release()
virtual int32_t ProcessXMLNode(irr::io::IrrXMLReader *&xml)