mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
5f28f76b07
This is not enabled by default. Instructions to enable are at the end of msg. This is 60% complete. Supports creation of certificates, adding friends and connections. Parts still to do: pgpids, p3discovery, signing and trusting peers. The main reason it is being commited is so that connections between peers can be properly tested, and development on OSX and win can start. This requires gpg and the gpgme.h development libraries, and no longer requires the custom ssl libraries. To compile it switch the configuration flags in scripts/config-linux.mk To compile XPGP (v0.4.x) enable PQI_USE_XPGP: #PQI_USE_SSLONLY = 1 PQI_USE_XPGP = 1 To compile SSL only, enable PQI_USE_SSLONLY: PQI_USE_SSLONLY = 1 #PQI_USE_XPGP = 1 To compile OpenPGP, disable both: #PQI_USE_SSLONLY = 1 #PQI_USE_XPGP = 1 and enable RS_USEPGPSSL in rsiface/rsinit.h git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1265 b45a01b8-16f6-495d-af2f-9b41ad6348cc
79 lines
2.1 KiB
C++
79 lines
2.1 KiB
C++
/* Initialisation Class (not publicly disclosed to RsIFace) */
|
|
|
|
/****
|
|
* #define RS_USE_PGPSSL 1
|
|
***/
|
|
|
|
class RsInit
|
|
{
|
|
public:
|
|
/* Commandline/Directory options */
|
|
|
|
static const char *RsConfigDirectory() ;
|
|
|
|
|
|
static bool setStartMinimised() ;
|
|
static int InitRetroShare(int argcIgnored, char **argvIgnored) ;
|
|
static int LoadCertificates(bool autoLoginNT) ;
|
|
static bool ValidateCertificate(std::string &userName) ;
|
|
static bool ValidateTrustedUser(std::string fname, std::string &userName) ;
|
|
static bool LoadPassword(std::string passwd) ;
|
|
static bool RsGenerateCertificate(std::string name, std::string org, std::string loc, std::string country, std::string passwd, std::string &errString);
|
|
static void load_check_basedir() ;
|
|
static int create_configinit() ;
|
|
static bool RsStoreAutoLogin() ;
|
|
static bool RsTryAutoLogin() ;
|
|
static bool RsClearAutoLogin(std::string basedir) ;
|
|
static void InitRsConfig() ;
|
|
|
|
static std::string getHomePath() ;
|
|
|
|
/* PGPSSL init functions */
|
|
|
|
#ifdef RS_USE_PGPSSL
|
|
static bool LoadGPGPassword(std::string id, std::string passwd);
|
|
static int GetLogins(std::list<std::string> &pgpIds);
|
|
static int GetLoginDetails(std::string id, std::string &name, std::string &email);
|
|
|
|
static std::string gpgPasswd;
|
|
#endif
|
|
|
|
/* Key Parameters that must be set before
|
|
* RetroShare will start up:
|
|
*/
|
|
static std::string load_cert;
|
|
static std::string load_key;
|
|
static std::string passwd;
|
|
|
|
static bool havePasswd; /* for Commandline password */
|
|
static bool autoLogin; /* autoLogin allowed */
|
|
static bool startMinimised; /* Icon or Full Window */
|
|
|
|
/* Win/Unix Differences */
|
|
static char dirSeperator;
|
|
|
|
/* Directories */
|
|
static std::string basedir;
|
|
static std::string homePath;
|
|
|
|
/* Listening Port */
|
|
static bool forceExtPort;
|
|
static bool forceLocalAddr;
|
|
static unsigned short port;
|
|
static char inet[256];
|
|
|
|
/* Logging */
|
|
static bool haveLogFile;
|
|
static bool outStderr;
|
|
static bool haveDebugLevel;
|
|
static int debugLevel;
|
|
static char logfname[1024];
|
|
|
|
static bool firsttime_run;
|
|
static bool load_trustedpeer;
|
|
static std::string load_trustedpeer_file;
|
|
|
|
static bool udpListenerOnly;
|
|
};
|
|
|