mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
RsLoginHelper::createLocation expose capability of creating hidden locations
This commit is contained in:
parent
8f7bacbb35
commit
ab6a5c07cc
@ -252,12 +252,15 @@ struct RsLoginHelper
|
||||
* @param[inout] location provide input information to generate the location
|
||||
* and storage to output the data of the generated location
|
||||
* @param[in] password to protect and unlock the associated PGP key
|
||||
* @param[in] makeHidden pass true to create an hidden location
|
||||
* @param[in] makeAutoTor pass true to create an automatically configured
|
||||
* Tor hidden location
|
||||
* @param[out] errorMessage
|
||||
* @return true if success, false otherwise
|
||||
*/
|
||||
bool createLocation( RsLoginHelper::Location& location,
|
||||
const std::string& password,
|
||||
std::string& errorMessage );
|
||||
const std::string& password, bool makeHidden,
|
||||
bool makeAutoTor, std::string& errorMessage );
|
||||
|
||||
/**
|
||||
* @brief Close RetroShare session
|
||||
|
@ -1410,7 +1410,10 @@ bool RsAccounts::GetAccountDetails(const RsPeerId &id,
|
||||
return rsAccounts->getCurrentAccountDetails(id, pgpId, pgpName, pgpEmail, location);
|
||||
}
|
||||
|
||||
bool RsAccounts::createNewAccount(const RsPgpId& pgp_id, const std::string& org, const std::string& loc, const std::string& country, bool ishiddenloc, bool isautotor, const std::string& passwd, RsPeerId &sslId, std::string &errString)
|
||||
bool RsAccounts::createNewAccount(
|
||||
const RsPgpId& pgp_id, const std::string& org, const std::string& loc,
|
||||
const std::string& country, bool ishiddenloc, bool isautotor,
|
||||
const std::string& passwd, RsPeerId &sslId, std::string &errString )
|
||||
{
|
||||
return rsAccounts->GenerateSSLCertificate(pgp_id, org, loc, country, ishiddenloc, isautotor, passwd, sslId, errString);
|
||||
}
|
||||
|
@ -1967,7 +1967,7 @@ void RsLoginHelper::getLocations(std::vector<RsLoginHelper::Location>& store)
|
||||
|
||||
bool RsLoginHelper::createLocation(
|
||||
RsLoginHelper::Location& l, const std::string& password,
|
||||
std::string& errorMessage )
|
||||
bool makeHidden, bool makeAutoTor, std::string& errorMessage )
|
||||
{
|
||||
if(l.mLocationName.empty())
|
||||
{
|
||||
@ -1992,7 +1992,7 @@ bool RsLoginHelper::createLocation(
|
||||
if(!rsNotify->setDisableAskPassword(true)) return false;
|
||||
|
||||
bool ret = RsAccounts::createNewAccount(
|
||||
l.mPgpId, "", l.mLocationName, "", false, false,
|
||||
l.mPgpId, "", l.mLocationName, "", makeHidden, makeAutoTor,
|
||||
RSRandom::random_alphaNumericString(RsInit::getSslPwdLen()),
|
||||
l.mLocationId, errorMessage );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user