154 #include "irrxml/irrXML.hpp"
189 if (retval != 0)
return retval;
191 OTString nodeName(xml->getNodeName());
192 if (nodeName.Compare(
"keyCredential")) {
199 else if (nodeName.Compare(
"masterSigned")) {
201 OTLog::vError(
"Error in %s line %d: failed loading expected "
202 "master-signed version while loading "
217 "<keyCredential nymID=\"%s\"\n"
218 " masterCredentialID=\"%s\" >\n\n",
246 "<masterSigned>\n%s</masterSigned>\n\n",
249 ascMasterSigned.
Get());
277 "doesn't match NymID of master-signed version of "
278 "this key credential.\n",
284 OTLog::vOutput(0,
"%s: Failure, NymIDSource of this key credential "
285 "doesn't match NymIDSource of master-signed "
286 "version of this key credential.\n",
293 "credential doesn't match MasterCredID of "
294 "master-signed version of this key credential.\n",
301 OTLog::vOutput(0,
"%s: Failure, public info of this key credential "
302 "doesn't match public info of master-signed "
303 "version of this key credential.\n",
343 return verifiedWithKey;
static EXPORT void vError(const char *szError,...)
void UpdatePublicCredentialToString(OTString &strAppendTo)
static EXPORT void Output(int32_t nVerbosity, const char *szOutput)
EXPORT const OTAsymmetricKey & GetPublicKey() const
const OTString & GetMasterCredID() const
void UpdatePublicContentsToString(OTString &strAppendTo)
void UpdateMasterPublicToString(OTString &strAppendTo)
virtual void UpdateContents()
EXPORT bool VerifyWithKey(const OTAsymmetricKey &theKey, const OTPasswordData *pPWData=nullptr) const
EXPORT void Concatenate(const char *arg,...)
EXPORT bool Exists() const
EXPORT bool SetString(const OTString &theData, bool bLineBreaks=true)
EXPORT bool Compare(const char *compare) const
static EXPORT bool LoadEncodedTextField(irr::io::IrrXMLReader *&xml, OTASCIIArmor &ascOutput)
OTString m_strMasterSigned
OTString m_strContractType
const OTString & GetNymID() const
virtual int32_t ProcessXMLNode(irr::io::IrrXMLReader *&xml)
virtual bool SetPublicContents(const OTString::Map &mapPublic)
OTStringXML m_xmlUnsigned
const OTString & GetNymIDSource() const
EXPORT const char * Get() const
const OTString::Map & GetPublicMap() const
virtual bool VerifySignedByMaster()
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
EXPORT bool LoadContractFromString(const OTString &theStr)
const OTString & GetMasterSigned() const
static EXPORT void vOutput(int32_t nVerbosity, const char *szOutput,...)
virtual EXPORT void Release()
virtual int32_t ProcessXMLNode(irr::io::IrrXMLReader *&xml)