Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
opentxs::OTMasterkey Class Reference

#include <OTMasterkey.hpp>

Inheritance diagram for opentxs::OTMasterkey:
Collaboration diagram for opentxs::OTMasterkey:

Public Member Functions

virtual bool VerifyInternally ()
 
bool VerifyAgainstSource () const
 
bool VerifySource_HTTP (const OTString strSource) const
 
bool VerifySource_HTTPS (const OTString strSource) const
 
bool VerifySource_Bitcoin (const OTString strSource) const
 
bool VerifySource_Namecoin (const OTString strSource) const
 
bool VerifySource_Freenet (const OTString strSource) const
 
bool VerifySource_TOR (const OTString strSource) const
 
bool VerifySource_I2P (const OTString strSource) const
 
bool VerifySource_CA (const OTString strSource) const
 
bool VerifySource_Pubkey (const OTString strSource) const
 
 OTMasterkey ()
 
 OTMasterkey (OTCredential &theOwner)
 
virtual ~OTMasterkey ()
 
virtual void UpdateContents ()
 
virtual int32_t ProcessXMLNode (irr::io::IrrXMLReader *&xml)
 
- Public Member Functions inherited from opentxs::OTKeyCredential
bool GenerateKeys (int32_t nBits=1024)
 
bool ReEncryptKeys (const OTPassword &theExportPassword, bool bImporting)
 
bool VerifySignedBySelf ()
 
virtual void SetMetadata ()
 
 OTKeyCredential ()
 
 OTKeyCredential (OTCredential &theOwner)
 
bool Sign (OTContract &theContract, const OTPasswordData *pPWData=nullptr)
 
EXPORT int32_t GetPublicKeysBySignature (listOfAsymmetricKeys &listOutput, const OTSignature &theSignature, char cKeyType= '0') const
 
virtual ~OTKeyCredential ()
 
virtual void Release ()
 
void Release_Subkey ()
 
- Public Member Functions inherited from opentxs::OTSubcredential
const OTString::MapGetPublicMap () const
 
const OTString::MapGetPrivateMap () const
 
const OTStringGetMasterCredID () const
 
const OTStringGetNymID () const
 
const OTStringGetNymIDSource () const
 
const OTStringGetContents () const
 
EXPORT const OTStringGetPubCredential () const
 
const OTStringGetPriCredential () const
 
const OTStringGetMasterSigned () const
 
virtual EXPORT void CalculateContractID (OTIdentifier &newID) const
 
virtual bool VerifyContract ()
 
bool VerifyNymID () const
 
virtual bool VerifySignedByMaster ()
 
void SetOwner (OTCredential &theOwner)
 
 OTSubcredential ()
 
 OTSubcredential (OTCredential &theOwner)
 
virtual ~OTSubcredential ()
 
void Release_Subcredential ()
 
virtual bool SaveContractWallet (std::ofstream &) const
 
- Public Member Functions inherited from opentxs::OTContract
const char * GetHashType () const
 
void SetIdentifier (const OTIdentifier &theID)
 
EXPORT OTContract ()
 
EXPORT OTContract (const OTString &name, const OTString &foldername, const OTString &filename, const OTString &strID)
 
EXPORT OTContract (const OTString &strID)
 
EXPORT OTContract (const OTIdentifier &theID)
 
void Initialize ()
 
virtual EXPORT ~OTContract ()
 
EXPORT void Release_Contract ()
 
EXPORT void ReleaseSignatures ()
 
virtual EXPORT bool CreateContract (const OTString &strContract, const OTPseudonym &theSigner)
 
EXPORT bool InsertNym (const OTString &strKeyName, const OTString &strKeyValue)
 
EXPORT void GetName (OTString &strName) const
 
EXPORT void SetName (const OTString &strName)
 
virtual EXPORT void GetIdentifier (OTIdentifier &theIdentifier) const
 
virtual EXPORT void GetIdentifier (OTString &theIdentifier) const
 
EXPORT void GetFilename (OTString &strFilename) const
 
EXPORT void GetFoldername (OTString &strFoldername) const
 
virtual EXPORT bool LoadContract ()
 
EXPORT bool LoadContract (const char *szFoldername, const char *szFilename)
 
EXPORT bool LoadContractFromString (const OTString &theStr)
 
bool LoadContractRawFile ()
 
EXPORT bool ParseRawFile ()
 
EXPORT bool SaveToContractFolder ()
 
EXPORT bool SaveContractRaw (OTString &strOutput) const
 
EXPORT bool RewriteContract (OTString &strOutput) const
 
EXPORT bool SaveContract ()
 
EXPORT bool SaveContract (const char *szFoldername, const char *szFilename)
 
virtual EXPORT void CreateContents ()
 
EXPORT void CreateInnerContents ()
 
virtual EXPORT bool SaveContents (std::ofstream &ofs) const
 
virtual EXPORT bool SaveContractWallet (OTString &strContents) const
 
virtual EXPORT bool DisplayStatistics (OTString &strContents) const
 
virtual EXPORT bool SaveContents (OTString &strContents) const
 
virtual EXPORT bool SignContract (const OTPseudonym &theNym, const OTPasswordData *pPWData=nullptr)
 
EXPORT bool SignContractAuthent (const OTPseudonym &theNym, const OTPasswordData *pPWData=nullptr)
 
EXPORT bool SignWithKey (const OTAsymmetricKey &theKey, const OTPasswordData *pPWData=nullptr)
 
EXPORT bool SignContract (const OTPseudonym &theNym, OTSignature &theSignature, const OTPasswordData *pPWData=nullptr)
 
EXPORT bool SignContractAuthent (const OTPseudonym &theNym, OTSignature &theSignature, const OTPasswordData *pPWData=nullptr)
 
EXPORT bool SignContract (const OTAsymmetricKey &theKey, OTSignature &theSignature, const OTString &strHashType, const OTPasswordData *pPWData=nullptr)
 
EXPORT bool SignContract (const char *szFoldername, const char *szFilename, OTSignature &theSignature, const OTPasswordData *pPWData=nullptr)
 
virtual EXPORT bool VerifyContractID () const
 
virtual EXPORT bool VerifySignature (const OTPseudonym &theNym, const OTPasswordData *pPWData=nullptr) const
 
virtual EXPORT bool VerifySigAuthent (const OTPseudonym &theNym, const OTPasswordData *pPWData=nullptr) const
 
EXPORT bool VerifyWithKey (const OTAsymmetricKey &theKey, const OTPasswordData *pPWData=nullptr) const
 
EXPORT bool VerifySignature (const OTPseudonym &theNym, const OTSignature &theSignature, const OTPasswordData *pPWData=nullptr) const
 
EXPORT bool VerifySigAuthent (const OTPseudonym &theNym, const OTSignature &theSignature, const OTPasswordData *pPWData=nullptr) const
 
EXPORT bool VerifySignature (const OTAsymmetricKey &theKey, const OTSignature &theSignature, const OTString &strHashType, const OTPasswordData *pPWData=nullptr) const
 
EXPORT bool VerifySignature (const char *szFoldername, const char *szFilename, const OTSignature &theSignature, const OTPasswordData *pPWData=nullptr) const
 
EXPORT const OTAsymmetricKeyGetContractPublicKey () const
 
EXPORT const OTPseudonymGetContractPublicNym () const
 

Friends

class OTCredential
 

Additional Inherited Members

- Static Public Member Functions inherited from opentxs::OTContract
static EXPORT bool DearmorAndTrim (const OTString &strInput, OTString &strOutput, OTString &strFirstLine)
 
static bool AddBookendsAroundContent (OTString &strOutput, const OTString &strContents, const OTString &strContractType, const OTString &strHashType, const listOfSignatures &listSignatures)
 
static EXPORT bool LoadEncodedTextField (irr::io::IrrXMLReader *&xml, OTASCIIArmor &ascOutput)
 
static EXPORT bool LoadEncodedTextField (irr::io::IrrXMLReader *&xml, OTString &strOutput)
 
static bool LoadEncodedTextFieldByName (irr::io::IrrXMLReader *&xml, OTASCIIArmor &ascOutput, const char *&szName, OTString::Map *pmapExtraVars=nullptr)
 
static bool LoadEncodedTextFieldByName (irr::io::IrrXMLReader *&xml, OTString &strOutput, const char *&szName, OTString::Map *pmapExtraVars=nullptr)
 
static bool SkipToElement (irr::io::IrrXMLReader *&xml)
 
static bool SkipToTextField (irr::io::IrrXMLReader *&xml)
 
static bool SkipAfterLoadingField (irr::io::IrrXMLReader *&xml)
 
static EXPORT bool SignFlatText (OTString &strFlatText, const OTString &strContractType, const OTPseudonym &theSigner, OTString &strOutput)
 
- Public Attributes inherited from opentxs::OTKeyCredential
OTKeypair m_SigningKey
 
OTKeypair m_AuthentKey
 
OTKeypair m_EncryptKey
 
- Protected Types inherited from opentxs::OTSubcredential
enum  CredStoreAs { credPrivateInfo, credPublicInfo = 1, credMasterSigned = 2 }
 
- Protected Member Functions inherited from opentxs::OTKeyCredential
virtual bool SetPublicContents (const OTString::Map &mapPublic)
 
virtual bool SetPrivateContents (const OTString::Map &mapPrivate, const OTPassword *pImportPassword=nullptr)
 
- Protected Member Functions inherited from opentxs::OTSubcredential
void UpdateMasterPublicToString (OTString &strAppendTo)
 
void UpdatePublicContentsToString (OTString &strAppendTo)
 
void UpdatePublicCredentialToString (OTString &strAppendTo)
 
void UpdatePrivateContentsToString (OTString &strAppendTo)
 
void SetMasterSigned (const OTString &strMasterSigned)
 
void SetContents (const OTString &strContents)
 
void SetNymIDandSource (const OTString &strNymID, const OTString &strSourceForNymID)
 
void SetMasterCredID (const OTString &strMasterCredID)
 
void StoreAsMasterSigned ()
 
void StoreAsPublic ()
 
- Protected Member Functions inherited from opentxs::OTContract
bool LoadContractXML ()
 
- Protected Attributes inherited from opentxs::OTSubcredential
CredStoreAs m_StoreAs
 
OTCredentialm_pOwner
 
OTString m_strMasterCredID
 
OTString m_strNymID
 
OTString m_strSourceForNymID
 
OTString::Map m_mapPublicInfo
 
OTString::Map m_mapPrivateInfo
 
OTString m_strMasterSigned
 
OTString m_strContents
 
- Protected Attributes inherited from opentxs::OTContract
OTString m_strName
 
OTString m_strFoldername
 
OTString m_strFilename
 
OTIdentifier m_ID
 
OTStringXML m_xmlUnsigned
 
OTString m_strRawFile
 
OTString m_strSigHashType
 
OTString m_strContractType
 
mapOfNyms m_mapNyms
 
listOfSignatures m_listSignatures
 
OTString m_strVersion
 
OTString m_strEntityShortName
 
OTString m_strEntityLongName
 
OTString m_strEntityEmail
 
OTString::Map m_mapConditions
 

Detailed Description

Definition at line 179 of file OTMasterkey.hpp.

Constructor & Destructor Documentation

opentxs::OTMasterkey::OTMasterkey ( )

Definition at line 529 of file OTMasterkey.cpp.

530  : ot_super()
531 {
532  m_strContractType = "MASTER KEY CREDENTIAL";
533 }
OTString m_strContractType
Definition: OTContract.hpp:178
opentxs::OTMasterkey::OTMasterkey ( OTCredential theOwner)

Definition at line 535 of file OTMasterkey.cpp.

536  : ot_super(theOwner)
537 {
538  m_strContractType = "MASTER KEY CREDENTIAL";
539 }
OTString m_strContractType
Definition: OTContract.hpp:178
opentxs::OTMasterkey::~OTMasterkey ( )
virtual

Definition at line 541 of file OTMasterkey.cpp.

542 {
543 }

Member Function Documentation

int32_t opentxs::OTMasterkey::ProcessXMLNode ( irr::io::IrrXMLReader *&  xml)
virtual

Reimplemented from opentxs::OTSubcredential.

Definition at line 163 of file OTMasterkey.cpp.

164 {
165  int32_t nReturnVal = ot_super::ProcessXMLNode(xml);
166 
167  // Here we call the parent class first.
168  // If the node is found there, or there is some error,
169  // then we just return either way. But if it comes back
170  // as '0', then nothing happened, and we'll continue executing.
171  //
172  // -- Note you can choose not to call the parent if
173  // you don't want to use any of those xml tags.
174  // As I do in the case of OTAccount.
175  //
176  if (0 != nReturnVal) return nReturnVal;
177  // else it was 0 (continue...)
178 
179  const OTString strNodeName(xml->getNodeName());
180 
181  if (strNodeName.Compare("masterCredential")) {
182  m_strNymID = xml->getAttributeValue("nymID");
183 
185 
186  otWarn << "Loading masterCredential...\n";
187 
188  nReturnVal = 1;
189  }
190 
191  return nReturnVal;
192 }
OTLOG_IMPORT OTLogStream otWarn
virtual EXPORT void Release()
Definition: OTString.cpp:765
virtual int32_t ProcessXMLNode(irr::io::IrrXMLReader *&xml)
void opentxs::OTMasterkey::UpdateContents ( )
virtual

Reimplemented from opentxs::OTSubcredential.

Definition at line 194 of file OTMasterkey.cpp.

195 {
197 
199  "<masterCredential nymID=\"%s\" >\n\n", // a hash of the nymIDSource
200  GetNymID().Get());
201 
202  if (GetNymIDSource().Exists()) {
203  OTASCIIArmor ascSource;
204  ascSource.SetString(GetNymIDSource()); // A nym should always
205  // verify through its own
206  // source. (Whatever that
207  // may be.)
208  m_xmlUnsigned.Concatenate("<nymIDSource>\n%s</nymIDSource>\n\n",
209  ascSource.Get());
210  }
211 
212  // PUBLIC INFO
213  //
214  // if (OTSubcredential::credPublicInfo == m_StoreAs) // PUBLIC INFO
215  // (Always save this in every state.)
216  {
218  }
219 
220  // PRIVATE INFO
221  //
222  // If we're saving the private credential info...
223  //
224  if (OTSubcredential::credPrivateInfo == m_StoreAs) // PRIVATE INFO
225  {
227 
229  }
230  // -------------------------------------------------
231  m_xmlUnsigned.Concatenate("</masterCredential>\n");
232 
233  m_StoreAs = OTSubcredential::credPrivateInfo; // <=== SET IT BACK TO DEFAULT
234  // BEHAVIOR. Any other state
235  // processes ONCE, and then
236  // goes back to this again.
237 }
void UpdatePublicCredentialToString(OTString &strAppendTo)
void UpdatePublicContentsToString(OTString &strAppendTo)
EXPORT void Concatenate(const char *arg,...)
Definition: OTString.cpp:1334
const OTString & GetNymID() const
OTStringXML m_xmlUnsigned
Definition: OTContract.hpp:174
const OTString & GetNymIDSource() const
void UpdatePrivateContentsToString(OTString &strAppendTo)
EXPORT bool Exists(std::string strFolder, std::string oneStr="", std::string twoStr="", std::string threeStr="")
Definition: OTStorage.cpp:584
virtual EXPORT void Release()
Definition: OTString.cpp:765
bool opentxs::OTMasterkey::VerifyAgainstSource ( ) const

Definition at line 297 of file OTMasterkey.cpp.

298 {
299  // RULE: *Any* source except for a public key, will begin with a
300  // protocol specifier. Such as:
301  //
302  // http: (a normal URL)
303  // https: (a normal URL on https)
304  // bitcoin: (a bitcoin address)
305  // namecoin: (a namecoin address)
306  // i2p: (an i2p address)
307  // tor: (a tor address)
308  // freenet: (a freenet address)
309  // cert: (Subject and Issuer DN from the cert)
310  //
311  // If NO protocol specifier is found, the source is assumed
312  // to be a public key.
313  // Public key is the default because that's the original behavior
314  // of OT anyway: the public key was hashed to form the NymID. We will
315  // continue to support this as a default, but now we are additionally
316  // also allowing other sources such as Namecoin, Freenet, etc. As int64_t
317  // as a Nym's source hashes to its correct ID, and as long as its master
318  // credentials can be verified from that same source, then all master
319  // credentials can be verified (as well as subcredentials) from any source
320  // the user prefers.
321  //
322 
323  bool bVerified = false;
324 
325  const std::string str_raw_source(m_strSourceForNymID.Get());
326  std::string str_source;
327 
328  // It's a URL.
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());
332  bVerified = VerifySource_HTTP(str_source.c_str());
333  }
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());
337  bVerified = VerifySource_HTTPS(str_source.c_str());
338  }
339  // It's a Bitcoin address.
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());
343  bVerified = VerifySource_Bitcoin(str_source.c_str());
344  }
345  // It's a Namecoin address.
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());
349  bVerified = VerifySource_Namecoin(str_source.c_str());
350  }
351  // It's a Freenet URL.
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());
355  bVerified = VerifySource_Freenet(str_source.c_str());
356  }
357  // It's a Tor URL.
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());
361  bVerified = VerifySource_TOR(str_source.c_str());
362  }
363  // It's an I2P URL.
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());
367  bVerified = VerifySource_I2P(str_source.c_str());
368  }
369  // It's the Issuer/Subject DN info from a cert issued by a traditional
370  // certificate authority.
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());
374  bVerified = VerifySource_CA(str_source.c_str());
375  }
376  else // It's presumably a public key.
377  {
378  str_source = str_raw_source;
379  bVerified = VerifySource_Pubkey(str_source.c_str());
380  }
381 
382  return bVerified;
383 }
bool VerifySource_Pubkey(const OTString strSource) const
bool VerifySource_Freenet(const OTString strSource) const
bool VerifySource_I2P(const OTString strSource) const
bool VerifySource_Namecoin(const OTString strSource) const
bool VerifySource_TOR(const OTString strSource) const
bool VerifySource_Bitcoin(const OTString strSource) const
bool VerifySource_CA(const OTString strSource) const
EXPORT const char * Get() const
Definition: OTString.cpp:1045
bool VerifySource_HTTP(const OTString strSource) const
bool VerifySource_HTTPS(const OTString strSource) const
bool opentxs::OTMasterkey::VerifyInternally ( )
virtual

Reimplemented from opentxs::OTKeyCredential.

Definition at line 245 of file OTMasterkey.cpp.

246 {
247  // Verify that m_strNymID is the same as the hash of m_strSourceForNymID.
248  //
249  // We can't use super here, since OTSubcredential::VerifyInternally will
250  // verify
251  // m_strMasterCredID against the actual Master, which is not relevant to us
252  // in
253  // OTMasterkey. But this means if we need anything else that
254  // OTKeyCredential::VerifyInternally
255  // was doing, we will have to duplicate that here as well...
256  // if (!ot_super::VerifyInternally())
257  // return false;
258  if (!VerifyNymID()) return false;
259 
260  OT_ASSERT(nullptr != m_pOwner);
261  // Verify that *this == m_pOwner->GetMasterkey() (the master credential.)
262  //
263  if (this != &(m_pOwner->GetMasterkey())) {
264  otOut << __FUNCTION__ << ": Failure: Expected *this object to be the "
265  "same as m_pOwner->GetMasterkey(), "
266  "but it wasn't.\n";
267  return false;
268  }
269 
270  // Remember this note above: ...if we need anything else that
271  // OTKeyCredential::VerifyInternally
272  // was doing, we will have to duplicate that here as well...
273  // Since we aren't calling OTKeyCredential::VerifyInternally (the super) and
274  // since that function
275  // verifies that the credential is self-signed, we must do the same
276  // verification here:
277  //
278  // Any OTKeyCredential (both master and subkeys, but no other credentials)
279  // must ** sign itself.**
280  //
281  if (!VerifySignedBySelf()) {
282  otOut << __FUNCTION__ << ": Failed verifying master credential: it's "
283  "not signed by itself (its own signing "
284  "key.)\n";
285  return false;
286  }
287 
288  return true;
289 }
OTLOG_IMPORT OTLogStream otOut
#define OT_ASSERT(x)
Definition: Assert.hpp:150
EXPORT const OTMasterkey & GetMasterkey() const
bool opentxs::OTMasterkey::VerifySource_Bitcoin ( const OTString  strSource) const

Definition at line 427 of file OTMasterkey.cpp.

428 {
429  /*
430  The source is a Bitcoin address
431  The last transfer from that address should have memo data with the hash of
432  the master credential.
433  I compare that to my own ID and they should match.
434  Alternately, to support multiple master credentials, have the last transfer
435  go to multiple addresses,
436  and each should have a memo with the master cred ID for each credential,
437  one of which should match my own.
438  If so, then I verify.
439  */
440 
441  otErr << __FUNCTION__ << ": Failure: this function has not yet been "
442  "written, so this Bitcoin source cannot be "
443  "verified.\n";
444  // return false;
445 
446  // Todo security
447  otErr << "\nNOTE: Returning TRUE for TESTING PURPOSES, as if Bitcoin had "
448  "verified."
449  "\n\n\n ----------------------- \n\n";
450 
451  return true;
452 }
OTLOG_IMPORT OTLogStream otErr
bool opentxs::OTMasterkey::VerifySource_CA ( const OTString  strSource) const

Definition at line 499 of file OTMasterkey.cpp.

500 {
501 
502  /*
503  The Source is the DN info on the Cert.
504  Therefore look at the Cert being used in this Masterkey.
505  Does it have the same DN info? Does it verify through its CA ?
506  Then it verifies.
507  */
508 
509  otErr << __FUNCTION__ << ": Failure: this function has not yet been "
510  "written, so this CA source cannot be verified.\n";
511  return false;
512 }
OTLOG_IMPORT OTLogStream otErr
bool opentxs::OTMasterkey::VerifySource_Freenet ( const OTString  strSource) const

Definition at line 475 of file OTMasterkey.cpp.

476 {
477  otErr << __FUNCTION__ << ": Failure: this function has not yet been "
478  "written, so this Freenet source cannot be "
479  "verified.\n";
480  return false;
481 }
OTLOG_IMPORT OTLogStream otErr
bool opentxs::OTMasterkey::VerifySource_HTTP ( const OTString  strSource) const

Definition at line 385 of file OTMasterkey.cpp.

386 {
387  /*
388  The source is a URL, http://blah.com/folder
389  If I download files from there, will I find my own masterkey inside?
390  If so, then I verify.
391  */
392 
393  otErr << __FUNCTION__ << ": Failure: this function has not yet been "
394  "written, so this HTTP source cannot be "
395  "verified.\n";
396  // return false;
397 
398  // Todo security
399  otErr << "\nNOTE: Returning TRUE for TESTING PURPOSES, as if HTTP source "
400  "had verified."
401  "\n\n\n ----------------------- \n\n";
402 
403  return true;
404 }
OTLOG_IMPORT OTLogStream otErr
bool opentxs::OTMasterkey::VerifySource_HTTPS ( const OTString  strSource) const

Definition at line 406 of file OTMasterkey.cpp.

407 {
408  /*
409  The source is a URL, https://blah.com/folder
410  If I download files from there, will I find my own masterkey inside?
411  If so, then I verify.
412  */
413 
414  otErr << __FUNCTION__ << ": Failure: this function has not yet been "
415  "written, so this HTTPS source cannot be "
416  "verified.\n";
417  // return false;
418 
419  // Todo security
420  otErr << "\nNOTE: Returning TRUE for TESTING PURPOSES, as if HTTPS source "
421  "had verified."
422  "\n\n\n ----------------------- \n\n";
423 
424  return true;
425 }
OTLOG_IMPORT OTLogStream otErr
bool opentxs::OTMasterkey::VerifySource_I2P ( const OTString  strSource) const

Definition at line 491 of file OTMasterkey.cpp.

492 {
493  otErr << __FUNCTION__ << ": Failure: this function has not yet been "
494  "written, so this I2P source cannot be "
495  "verified.\n";
496  return false;
497 }
OTLOG_IMPORT OTLogStream otErr
bool opentxs::OTMasterkey::VerifySource_Namecoin ( const OTString  strSource) const

Definition at line 454 of file OTMasterkey.cpp.

455 {
456  /*
457  The source is a URL, http://blah.bit/folder
458  If I download files from there, will I find my own masterkey inside?
459  If so, then I verify.
460  */
461 
462  otErr << __FUNCTION__ << ": Failure: this function has not yet been "
463  "written, so this Namecoin source cannot be "
464  "verified.\n";
465  // return false;
466 
467  // Todo security
468  otErr << "\nNOTE: Returning TRUE for TESTING PURPOSES, as if Namecoin had "
469  "verified."
470  "\n\n\n ----------------------- \n\n";
471 
472  return true;
473 }
OTLOG_IMPORT OTLogStream otErr
bool opentxs::OTMasterkey::VerifySource_Pubkey ( const OTString  strSource) const

Definition at line 514 of file OTMasterkey.cpp.

515 {
516  // Verify signed by self.
517  //
518  // Note: Whenever VerifyAgainstSource is called, VerifyInternally is also
519  // called.
520  // And VerifyInternally, for all OTKeyCredentials, verifies already that the
521  // credential has been signed by its own private signing key.
522  // Since the credential is already verified as having signed itself, there's
523  // no
524  // reason to verify that redundantly here, so we just return true.
525  //
526  return true;
527 }
bool opentxs::OTMasterkey::VerifySource_TOR ( const OTString  strSource) const

Definition at line 483 of file OTMasterkey.cpp.

484 {
485  otErr << __FUNCTION__ << ": Failure: this function has not yet been "
486  "written, so this Tor source cannot be "
487  "verified.\n";
488  return false;
489 }
OTLOG_IMPORT OTLogStream otErr

Friends And Related Function Documentation

friend class OTCredential
friend

Definition at line 183 of file OTMasterkey.hpp.


The documentation for this class was generated from the following files: