mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
fixed -U option in rs-nogui. Removed debug output that would ruin the terminal interface
This commit is contained in:
parent
3e3ee1a34b
commit
a5e0b1c336
5 changed files with 49 additions and 10 deletions
|
@ -5,6 +5,8 @@
|
|||
#include "util/rsdir.h"
|
||||
#include "rsaccounts.h"
|
||||
|
||||
//#define DEBUG_RSLOGINHANDLER 1
|
||||
|
||||
bool RsLoginHandler::getSSLPassword( const RsPeerId& ssl_id,
|
||||
bool enable_gpg_ask_passwd,
|
||||
std::string& ssl_passwd )
|
||||
|
@ -59,18 +61,21 @@ bool RsLoginHandler::getSSLPasswdFromGPGFile(const RsPeerId& ssl_id,std::string&
|
|||
|
||||
fclose(sslPassphraseFile);
|
||||
|
||||
#ifdef DEBUG_RSLOGINHANDLER
|
||||
std::cerr << "opening sslPassphraseFile : "
|
||||
<< getSSLPasswdFileName(ssl_id).c_str() << std::endl;
|
||||
#endif
|
||||
|
||||
std::string plain;
|
||||
if ( AuthGPG::getAuthGPG()->decryptTextFromFile( plain, getSSLPasswdFileName(ssl_id)) )
|
||||
{
|
||||
sslPassword = plain;
|
||||
|
||||
#ifdef DEBUG_RSLOGINHANDLER
|
||||
if(sslPassword.length() > 0)
|
||||
std::cerr << "Decrypting went ok !" << std::endl;
|
||||
else
|
||||
std::cerr << "Passphrase is empty!" << std::endl;
|
||||
#endif
|
||||
|
||||
return sslPassword.length() > 0 ;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue