Solve windows gpg bug and modify windows .pro project files qtcreator

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1787 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-10-30 00:46:58 +00:00
parent 49b24c2b14
commit 6fba28ee0d
4 changed files with 22 additions and 18 deletions

View file

@ -1258,11 +1258,11 @@ int RsInit::LoadCertificates(bool autoLoginNT)
std::cerr << "let's store the ssl Password into a pgp ecrypted file" << std::endl;
FILE *sslPassphraseFile = fopen(RsInitConfig::ssl_passphrase_file.c_str(), "w");
std::cerr << "opening sslPassphraseFile. : " << RsInitConfig::ssl_passphrase_file.c_str() << std::endl;
std::cerr << "opening sslPassphraseFile : " << RsInitConfig::ssl_passphrase_file.c_str() << std::endl;
gpgme_data_t cipher;
gpgme_data_t plain;
gpgme_data_new_from_mem(&plain, sslPassword, strlen(sslPassword), 0);
gpgme_error_t error_reading_file = gpgme_data_new_from_stream (&cipher, sslPassphraseFile);
gpgme_data_new_from_mem(&plain, sslPassword, strlen(sslPassword), 1);
gpgme_data_new_from_stream (&cipher, sslPassphraseFile);
if (0 < authMgr->encryptText(plain, cipher)) {
std::cerr << "Encrypting went ok !" << std::endl;
}
@ -1276,10 +1276,10 @@ int RsInit::LoadCertificates(bool autoLoginNT)
FILE *sslPassphraseFile = fopen(RsInitConfig::ssl_passphrase_file.c_str(), "r");
if (sslPassphraseFile == NULL)
{
std::cerr << "No password povided, and no sslPassphraseFile." << std::endl;
std::cerr << "No password povided, and no sslPassphraseFile : " << RsInitConfig::ssl_passphrase_file.c_str() << std::endl;
return 0;
} else {
std::cerr << "opening sslPassphraseFile." << std::endl;
std::cerr << "opening sslPassphraseFile : " << RsInitConfig::ssl_passphrase_file.c_str() << std::endl;
gpgme_data_t cipher;
gpgme_data_t plain;
gpgme_data_new (&plain);