fix the length of the encrypting ssl passphrase

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1738 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-10-27 20:48:31 +00:00
parent 62452ed3c5
commit 6f7b21944c

View File

@ -1246,7 +1246,7 @@ int RsInit::LoadCertificates(bool autoLoginNT)
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, sizeof(sslPassword), 0);
gpgme_data_new_from_mem(&plain, sslPassword, strlen(sslPassword), 0);
gpgme_error_t error_reading_file = gpgme_data_new_from_stream (&cipher, sslPassphraseFile);
if (0 < authMgr->encryptText(plain, cipher)) {
std::cerr << "Encrypting went ok !" << std::endl;