The password dialog can be canceled.

Fixed an error when cancel the login password dialog at startup. RetroShare did not start after this.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4537 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-08-05 20:45:09 +00:00
parent b1ac8bc9d2
commit 687b2ecd36
5 changed files with 24 additions and 13 deletions

View file

@ -1481,10 +1481,17 @@ int RsInit::LoadCertificates(bool autoLoginNT)
//check if password is already in memory
if(RsInitConfig::passwd == "")
RsLoginHandler::getSSLPassword(RsInitConfig::preferedId,true,RsInitConfig::passwd) ;
else
RsLoginHandler::checkAndStoreSSLPasswdIntoGPGFile(RsInitConfig::preferedId,RsInitConfig::passwd) ;
if(RsInitConfig::passwd == "") {
if (RsLoginHandler::getSSLPassword(RsInitConfig::preferedId,true,RsInitConfig::passwd) == false) {
std::cerr << "RsLoginHandler::getSSLPassword() Failed!";
return 0 ;
}
} else {
if (RsLoginHandler::checkAndStoreSSLPasswdIntoGPGFile(RsInitConfig::preferedId,RsInitConfig::passwd) == false) {
std::cerr << "RsLoginHandler::checkAndStoreSSLPasswdIntoGPGFile() Failed!";
return 0;
}
}
std::cerr << "RsInitConfig::load_key.c_str() : " << RsInitConfig::load_key.c_str() << std::endl;