mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-13 23:58:59 -05:00
Lots of little changes to libretroshare. Improvements mainly focused
on configuration storage and loading: * Improved Configuration Manager (almost finished) * Mutex protections for Configuration system * added Configuration storage to p3ConnectMgr. * added Configuration storage to p3MsgService. * bugfixes in p3GeneralConfig. * Added Config Save notification where necessary. * added safe FinalConfigSave before exit(). * added RsPeerNetItem + RsPeerStunItem (serialiser) * reordered startup for correct config loading. * enabled Loading of certs in AuthXPGP. * move sockaddr_clear() to util/rsnet.h * switched p3MsgService sendMessage checking to pqiMonitor syste,. * corrected pqiarchive saving of PeerIds. * added setNetworkMode() & setVisState() to p3ConnectMgr. * added Mutex protection to p3ranking. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@336 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
2c69fd7eaf
commit
806b8285f2
36 changed files with 1712 additions and 599 deletions
|
|
@ -79,7 +79,7 @@ virtual bool active() = 0;
|
|||
virtual int InitAuth(const char *srvr_cert, const char *priv_key,
|
||||
const char *passwd) = 0;
|
||||
virtual bool CloseAuth() = 0;
|
||||
virtual int setConfigDirectories(const char *cdir, const char *ndir) = 0;
|
||||
virtual int setConfigDirectories(std::string confFile, std::string neighDir) = 0;
|
||||
|
||||
/* get Certificate Ids */
|
||||
|
||||
|
|
@ -95,6 +95,10 @@ virtual bool isAuthenticated(std::string id) = 0;
|
|||
virtual std::string getName(std::string id) = 0;
|
||||
virtual bool getDetails(std::string id, pqiAuthDetails &details) = 0;
|
||||
|
||||
/* High Level Load/Save Configuration */
|
||||
virtual bool saveCertificates() = 0;
|
||||
virtual bool loadCertificates() = 0;
|
||||
|
||||
/* Load/Save certificates */
|
||||
|
||||
virtual bool LoadCertificateFromString(std::string pem, std::string &id) = 0;
|
||||
|
|
@ -117,6 +121,8 @@ virtual bool TrustCertificate(std::string id, bool trust) = 0;
|
|||
/* Sign / Encrypt / Verify Data (TODO) */
|
||||
//virtual bool encryptData(std::string recipientId, std::string plaindata, std::string &result);
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -132,7 +138,7 @@ virtual bool active();
|
|||
virtual int InitAuth(const char *srvr_cert, const char *priv_key,
|
||||
const char *passwd);
|
||||
virtual bool CloseAuth();
|
||||
virtual int setConfigDirectories(const char *cdir, const char *ndir);
|
||||
virtual int setConfigDirectories(std::string confFile, std::string neighDir);
|
||||
|
||||
/* get Certificate Ids */
|
||||
|
||||
|
|
@ -148,8 +154,11 @@ virtual bool isAuthenticated(std::string id);
|
|||
virtual std::string getName(std::string id);
|
||||
virtual bool getDetails(std::string id, pqiAuthDetails &details);
|
||||
|
||||
/* Load/Save certificates */
|
||||
/* High Level Load/Save Configuration */
|
||||
virtual bool saveCertificates();
|
||||
virtual bool loadCertificates();
|
||||
|
||||
/* Load/Save certificates */
|
||||
virtual bool LoadCertificateFromString(std::string pem, std::string &id);
|
||||
virtual std::string SaveCertificateToString(std::string id);
|
||||
virtual bool LoadCertificateFromFile(std::string filename, std::string &id);
|
||||
|
|
@ -164,6 +173,7 @@ virtual bool SignCertificate(std::string id);
|
|||
virtual bool RevokeCertificate(std::string id);
|
||||
virtual bool TrustCertificate(std::string id, bool trust);
|
||||
|
||||
|
||||
std::string mOwnId;
|
||||
std::map<std::string, pqiAuthDetails> mPeerList;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue