mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 10:35:22 -04:00
- Fixed compile on Windows. Added new type "rs_lock_handle_t" for file locking functions.
- Added missing check of file pointer in PGPHandler::decryptTextFromFile - Added missing fclose of the ssl passphrase file in RsLoginHandler::getSSLPasswdFromGPGFile. Is this still needed, because PGPHandler::decryptTextFromFile does the same check? - Fixed possible memory leak in ops_decrypt_memory. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-OpenPGP@5222 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
dba66cdd7a
commit
f50edd228f
6 changed files with 22 additions and 16 deletions
|
@ -93,11 +93,7 @@ class RsInitConfig
|
|||
/* for certificate creation */
|
||||
//static std::string gpgPasswd;
|
||||
|
||||
#ifndef WINDOWS_SYS
|
||||
static int lockHandle;
|
||||
#else
|
||||
static HANDLE lockHandle;
|
||||
#endif
|
||||
static rs_lock_handle_t lockHandle;
|
||||
|
||||
/* These fields are needed for login */
|
||||
static std::string loginId;
|
||||
|
@ -152,11 +148,7 @@ static const int SSLPWD_LEN = 64;
|
|||
std::list<accountId> RsInitConfig::accountIds;
|
||||
std::string RsInitConfig::preferedId;
|
||||
|
||||
#ifndef WINDOWS_SYS
|
||||
int RsInitConfig::lockHandle;
|
||||
#else
|
||||
HANDLE RsInitConfig::lockHandle;
|
||||
#endif
|
||||
rs_lock_handle_t RsInitConfig::lockHandle;
|
||||
|
||||
std::string RsInitConfig::configDir;
|
||||
std::string RsInitConfig::load_cert;
|
||||
|
|
|
@ -684,6 +684,7 @@ bool RsLoginHandler::getSSLPasswdFromGPGFile(const std::string& ssl_id,std::stri
|
|||
std::cerr << "No password provided, and no sslPassphraseFile : " << getSSLPasswdFileName(ssl_id).c_str() << std::endl;
|
||||
return 0;
|
||||
}
|
||||
fclose(sslPassphraseFile);
|
||||
|
||||
std::cerr << "opening sslPassphraseFile : " << getSSLPasswdFileName(ssl_id).c_str() << std::endl;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue