From 6f7b21944c072cc2dd699c434cee604c60fbb182 Mon Sep 17 00:00:00 2001 From: joss17 Date: Tue, 27 Oct 2009 20:48:31 +0000 Subject: [PATCH] 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 --- libretroshare/src/rsserver/rsinit.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc index 0bb0c837e..5dfc5f56f 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -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;